Update dynamic_state test to Vulkan version v210
authorscygan <slawomir.cygan@intel.com>
Wed, 9 Dec 2015 15:52:18 +0000 (16:52 +0100)
committerscygan <slawomir.cygan@intel.com>
Wed, 9 Dec 2015 15:52:18 +0000 (16:52 +0100)
22 files changed:
external/vulkancts/modules/vulkan/dynamic-state/vktDynamicStateImageObjectUtil.hpp [deleted file]
external/vulkancts/modules/vulkan/dynamic_state/CMakeLists.txt [moved from external/vulkancts/modules/vulkan/dynamic-state/CMakeLists.txt with 100% similarity]
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateBaseClass.hpp [moved from external/vulkancts/modules/vulkan/dynamic-state/vktDynamicStateBaseClass.hpp with 86% similarity]
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateBufferObjectUtil.cpp [moved from external/vulkancts/modules/vulkan/dynamic-state/vktDynamicStateBufferObjectUtil.cpp with 81% similarity]
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateBufferObjectUtil.hpp [moved from external/vulkancts/modules/vulkan/dynamic-state/vktDynamicStateBufferObjectUtil.hpp with 77% similarity]
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateCBTests.cpp [moved from external/vulkancts/modules/vulkan/dynamic-state/vktDynamicStateCBTests.cpp with 84% similarity]
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateCBTests.hpp [moved from external/vulkancts/modules/vulkan/dynamic-state/vktDynamicStateCBTests.hpp with 100% similarity]
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateCreateInfoUtil.cpp [moved from external/vulkancts/modules/vulkan/dynamic-state/vktDynamicStateCreateInfoUtil.cpp with 52% similarity]
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateCreateInfoUtil.hpp [moved from external/vulkancts/modules/vulkan/dynamic-state/vktDynamicStateCreateInfoUtil.hpp with 56% similarity]
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateDSTests.cpp [moved from external/vulkancts/modules/vulkan/dynamic-state/vktDynamicStateDSTests.cpp with 87% similarity]
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateDSTests.hpp [moved from external/vulkancts/modules/vulkan/dynamic-state/vktDynamicStateDSTests.hpp with 100% similarity]
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateGeneralTests.cpp [moved from external/vulkancts/modules/vulkan/dynamic-state/vktDynamicStateGeneralTests.cpp with 86% similarity]
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateGeneralTests.hpp [moved from external/vulkancts/modules/vulkan/dynamic-state/vktDynamicStateGeneralTests.hpp with 100% similarity]
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateImageObjectUtil.cpp [moved from external/vulkancts/modules/vulkan/dynamic-state/vktDynamicStateImageObjectUtil.cpp with 57% similarity]
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateImageObjectUtil.hpp [new file with mode: 0644]
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateRSTests.cpp [moved from external/vulkancts/modules/vulkan/dynamic-state/vktDynamicStateRSTests.cpp with 84% similarity]
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateRSTests.hpp [moved from external/vulkancts/modules/vulkan/dynamic-state/vktDynamicStateRSTests.hpp with 100% similarity]
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateTestCaseUtil.hpp [moved from external/vulkancts/modules/vulkan/dynamic-state/vktDynamicStateTestCaseUtil.hpp with 100% similarity]
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateTests.cpp [moved from external/vulkancts/modules/vulkan/dynamic-state/vktDynamicStateTests.cpp with 100% similarity]
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateTests.hpp [moved from external/vulkancts/modules/vulkan/dynamic-state/vktDynamicStateTests.hpp with 100% similarity]
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateVPTests.cpp [moved from external/vulkancts/modules/vulkan/dynamic-state/vktDynamicStateVPTests.cpp with 85% similarity]
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateVPTests.hpp [moved from external/vulkancts/modules/vulkan/dynamic-state/vktDynamicStateVPTests.hpp with 100% similarity]

diff --git a/external/vulkancts/modules/vulkan/dynamic-state/vktDynamicStateImageObjectUtil.hpp b/external/vulkancts/modules/vulkan/dynamic-state/vktDynamicStateImageObjectUtil.hpp
deleted file mode 100644 (file)
index 5969a29..0000000
+++ /dev/null
@@ -1,296 +0,0 @@
-#ifndef _VKT_DYNAMIC_STATE_IMAGEOBJECTUTIL_HPP
-#define _VKT_DYNAMIC_STATE_IMAGEOBJECTUTIL_HPP
-/*------------------------------------------------------------------------
- * Vulkan Conformance Tests
- * ------------------------
- *
- * Copyright (c) 2015 The Khronos Group Inc.
- * Copyright (c) 2015 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and/or associated documentation files (the
- * "Materials"), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice(s) and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
- *
- * The Materials are Confidential Information as defined by the
- * Khronos Membership Agreement until designated non-confidential by Khronos,
- * at which point this condition clause shall be removed.
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
- *
- *//*!
- * \file
- * \brief Image Object Util
- *//*--------------------------------------------------------------------*/
-
-#include "vkDefs.hpp"
-#include "vkMemUtil.hpp"
-#include "vkRefUtil.hpp"
-
-#include "deSharedPtr.hpp"
-
-#include "tcuTexture.hpp"
-
-namespace vkt
-{
-namespace DynamicState
-{
-
-class MemoryOp
-{
-public:
-       static void pack (int                                   pixelSize,
-                                         int                                   width,
-                                         int                                   height,
-                                         int                                   depth,
-                                     vk::VkDeviceSize          rowPitch,
-                                         vk::VkDeviceSize              depthPitch,
-                                         const void *                  srcBuffer,
-                                         void *                                destBuffer);
-
-       static void unpack (int                                 pixelSize,
-                                               int                                     width,
-                                               int                                     height,
-                                               int                                     depth,
-                                               vk::VkDeviceSize        rowPitch,
-                                               vk::VkDeviceSize        depthPitch,
-                                               const void *            srcBuffer,
-                                               void *                          destBuffer);
-};
-
-
-class Image
-{
-public:
-       static de::SharedPtr<Image> Create (const vk::DeviceInterface &vk, vk::VkDevice device, const vk::VkImageCreateInfo &createInfo);
-
-       static de::SharedPtr<Image> CreateAndAlloc (const vk::DeviceInterface   &vk,
-                                                                                               vk::VkDevice                    device,
-                                                                                               const vk::VkImageCreateInfo     &createInfo,
-                                                                                               vk::Allocator                   &allocator,
-                                                                                               vk::MemoryRequirement   memoryRequirement = vk::MemoryRequirement::Any);
-
-       tcu::ConstPixelBufferAccess readSurface (vk::VkQueue                    queue,
-                                                                                        vk::Allocator                  &allocator,
-                                                                                        vk::VkImageLayout              layout,
-                                                                                        vk::VkOffset3D                 offset,
-                                                                                        int                                    width,
-                                                                                        int                                    height,
-                                                                                        vk::VkImageAspect              aspect,
-                                                                                        unsigned int                   mipLevel = 0,
-                                                                                        unsigned int                   arrayElement = 0);
-
-       tcu::ConstPixelBufferAccess readSurface1D (vk::VkQueue                  queue,
-                                                                                          vk::Allocator                &allocator,
-                                                                                          vk::VkImageLayout    layout,
-                                                                                          vk::VkOffset3D               offset,
-                                                                                          int                                  width,
-                                                                                          vk::VkImageAspect    aspect,
-                                                                                          unsigned int                 mipLevel = 0,
-                                                                                          unsigned int                 arrayElement = 0);
-
-       tcu::ConstPixelBufferAccess readVolume (vk::VkQueue                     queue,
-                                                                                       vk::Allocator           &allocator,
-                                                                                       vk::VkImageLayout       layout,
-                                                                                       vk::VkOffset3D          offset,
-                                                                                       int                                     width,
-                                                                                       int                                     height,
-                                                                                       int                                     depth,
-                                                                                       vk::VkImageAspect       aspect,
-                                                                                       unsigned int            mipLevel = 0,
-                                                                                       unsigned int            arrayElement = 0);
-
-
-       tcu::ConstPixelBufferAccess readSurfaceLinear (vk::VkOffset3D           offset,
-                                                                                                  int                                  width,
-                                                                                                  int                                  height,
-                                                                                                  int                                  depth,
-                                                                                                  vk::VkImageAspect    aspect,
-                                                                                                  unsigned int                 mipLevel = 0,
-                                                                                                  unsigned int                 arrayElement = 0);
-
-       void read (vk::VkQueue                  queue,
-                          vk::Allocator                &allocator,
-                          vk::VkImageLayout    layout,
-                          vk::VkOffset3D               offset,
-                          int                                  width,
-                          int                                  height,
-                          int                                  depth,
-                          unsigned int                 mipLevel,
-                          unsigned int                 arrayElement,
-                          vk::VkImageAspect    aspect,
-                          vk::VkImageType              type,
-                          void *                               data);
-
-       void readUsingBuffer (vk::VkQueue                       queue,
-                                                 vk::Allocator                 &allocator,
-                                                 vk::VkImageLayout             layout,
-                                                 vk::VkOffset3D                offset,
-                                                 int                                   width,
-                                                 int                                   height,
-                                                 int                                   depth,
-                                                 unsigned int                  mipLevel,
-                                                 unsigned int                  arrayElement,
-                                                 vk::VkImageAspect             aspect,
-                                                 void *                                data);
-
-       void readLinear (vk::VkOffset3D                 offset,
-                                        int                                    width,
-                                        int                                    height,
-                                        int                                    depth,
-                                        unsigned int                   mipLevel,
-                                        unsigned int                   arrayElement,
-                                        vk::VkImageAspect              aspect,
-                                        void *                                 data);
-
-       void uploadVolume (const tcu::ConstPixelBufferAccess    &access,
-                                          vk::VkQueue                                                  queue,
-                                          vk::Allocator                                                &allocator,
-                                          vk::VkImageLayout                                    layout,
-                                          vk::VkOffset3D                                               offset,
-                                          vk::VkImageAspect                                    aspect,
-                                          unsigned int                                                 mipLevel = 0,
-                                          unsigned int                                                 arrayElement = 0);
-
-       void uploadSurface (const tcu::ConstPixelBufferAccess   &access,
-                                               vk::VkQueue                                                     queue,
-                                               vk::Allocator                                           &allocator,
-                                               vk::VkImageLayout                                       layout,
-                                               vk::VkOffset3D                                          offset,
-                                               vk::VkImageAspect                                       aspect,
-                                               unsigned int                                            mipLevel = 0,
-                                               unsigned int                                            arrayElement = 0);
-
-       void uploadSurface1D (const tcu::ConstPixelBufferAccess &access,
-                                                 vk::VkQueue                                           queue,
-                                                 vk::Allocator                                         &allocator,
-                                                 vk::VkImageLayout                                     layout,
-                                                 vk::VkOffset3D                                        offset,
-                                                 vk::VkImageAspect                                     aspect,
-                                                 unsigned int                                          mipLevel = 0,
-                                                 unsigned int                                          arrayElement = 0);
-
-       void uploadSurfaceLinear (const tcu::ConstPixelBufferAccess     &access,
-                                                         vk::VkOffset3D                                        offset,
-                                                         int                                                           width,
-                                                         int                                                           height,
-                                                         int                                                           depth,
-                                                         vk::VkImageAspect                                     aspect,
-                                                         unsigned int                                          mipLevel = 0,
-                                                         unsigned int                                          arrayElement = 0);
-
-       void upload     (vk::VkQueue                    queue,
-                                vk::Allocator                  &allocator,
-                                vk::VkImageLayout              layout,
-                                vk::VkOffset3D                 offset,
-                                int                                    width,
-                                int                                    height,
-                                int                                    depth,
-                                unsigned int                   mipLevel,
-                                unsigned int                   arrayElement,
-                                vk::VkImageAspect              aspect,
-                                vk::VkImageType                type,
-                                const void *                   data);
-
-       void uploadUsingBuffer (vk::VkQueue                     queue,
-                                                       vk::Allocator           &allocator,
-                                                       vk::VkImageLayout       layout,
-                                                       vk::VkOffset3D          offset,
-                                                       int                                     width,
-                                                       int                                     height,
-                                                       int                                     depth,
-                                                       unsigned int            mipLevel,
-                                                       unsigned int            arrayElement,
-                                                       vk::VkImageAspect       aspect,
-                                                       const void *            data);
-
-       void uploadLinear (vk::VkOffset3D               offset,
-                                          int                                  width,
-                                          int                                  height,
-                                          int                                  depth,
-                                          unsigned int                 mipLevel,
-                                          unsigned int                 arrayElement,
-                                          vk::VkImageAspect    aspect,
-                                          const void *                 data);
-
-       de::SharedPtr<Image> copyToLinearImage (vk::VkQueue                     queue,
-                                                                                       vk::Allocator           &allocator,
-                                                                                       vk::VkImageLayout       layout,
-                                                                                       vk::VkOffset3D          offset,
-                                                                                       int                                     width,
-                                                                                       int                                     height,
-                                                                                       int                                     depth,
-                                                                                       unsigned int            mipLevel,
-                                                                                       unsigned int            arrayElement,
-                                                                                       vk::VkImageAspect       aspect,
-                                                                                       vk::VkImageType         type);
-
-       inline const vk::VkFormat &     getFormat (void) const
-       {
-               return m_format;
-       }
-
-       inline vk::VkImage object (void) const { return *m_object; }
-
-       void bindMemory (de::MovePtr<vk::Allocation> allocation);
-
-       inline vk::Allocation getBoundMemory (void) const { return *m_allocation; }
-
-private:
-       vk::VkDeviceSize getPixelOffset (vk::VkOffset3D         offset,
-                                                                        vk::VkDeviceSize       rowPitch,
-                                                                        vk::VkDeviceSize       depthPitch,
-                                                                        unsigned int           mipLevel,
-                                                                        unsigned int           arrayElement);
-
-       Image (const vk::DeviceInterface        &vk,
-                  vk::VkDevice                                 device,
-                  vk::VkFormat                                 format,
-                  const vk::VkExtent3D                 &extend,
-                  deUint32                                             mipLevels,
-                  deUint32                                             arraySize,
-                  vk::Move<vk::VkImage>                object);
-
-       Image                           (const Image &other);   // Not allowed!
-       Image &operator=        (const Image &other);   // Not allowed!
-
-       de::MovePtr<vk::Allocation>     m_allocation;    
-       vk::Unique<vk::VkImage>         m_object;
-
-       vk::VkFormat                            m_format;
-       vk::VkExtent3D                          m_extent;
-       deUint32                                        m_mipLevels;
-       deUint32                                        m_arraySize;
-
-       std::vector<deUint8>            m_pixelAccessData;
-
-       const vk::DeviceInterface       &m_vk;
-       vk::VkDevice                            m_device;
-};
-
-void transition2DImage (const vk::DeviceInterface &vk, vk::VkCmdBuffer cmdBuffer, vk::VkImage image, vk::VkImageAspectFlags aspectMask, vk::VkImageLayout oldLayout, vk::VkImageLayout newLayout);
-
-void initialTransitionColor2DImage (const vk::DeviceInterface &vk, vk::VkCmdBuffer cmdBuffer, vk::VkImage image, vk::VkImageLayout layout);
-
-void initialTransitionDepth2DImage (const vk::DeviceInterface &vk, vk::VkCmdBuffer cmdBuffer, vk::VkImage image, vk::VkImageLayout layout);
-
-void initialTransitionStencil2DImage (const vk::DeviceInterface &vk, vk::VkCmdBuffer cmdBuffer, vk::VkImage image, vk::VkImageLayout layout);
-
-void initialTransitionDepthStencil2DImage (const vk::DeviceInterface &vk, vk::VkCmdBuffer cmdBuffer, vk::VkImage image, vk::VkImageLayout layout);
-
-} //DynamicState
-} //vkt
-
-#endif // _VKT_DYNAMIC_STATE_IMAGEOBJECTUTIL_HPP
@@ -45,9 +45,9 @@
 #include "vkRefUtil.hpp"
 #include "vkImageUtil.hpp"
 
+#include "vktDynamicStateCreateInfoUtil.hpp"
 #include "vktDynamicStateImageObjectUtil.hpp"
 #include "vktDynamicStateBufferObjectUtil.hpp"
-#include "vktDynamicStateCreateInfoUtil.hpp"
 #include "vkPrograms.hpp"
 
 namespace vkt
@@ -79,9 +79,6 @@ struct Vec4RGBA
        tcu::Vec4 position;
        tcu::Vec4 color;
 };
-
-vk::Move<vk::VkShader> createShader(const vk::DeviceInterface &vk, const vk::VkDevice device, 
-                                                                       const vk::VkShaderModule module, const char* name, vk::VkShaderStage stage);
        
 class DynamicStateBaseClass : public TestInstance
 {
@@ -119,8 +116,8 @@ protected:
        PipelineCreateInfo::VertexInputState                    m_vertexInputState;
        de::SharedPtr<Buffer>                                                   m_vertexBuffer;
 
-       vk::Move<vk::VkCmdPool>                                                 m_cmdPool;
-       vk::Move<vk::VkCmdBuffer>                                               m_cmdBuffer;
+       vk::Move<vk::VkCommandPool>                                             m_cmdPool;
+       vk::Move<vk::VkCommandBuffer>                                   m_cmdBuffer;
 
        vk::Move<vk::VkFramebuffer>                                             m_framebuffer;
        vk::Move<vk::VkRenderPass>                                              m_renderPass;
@@ -140,10 +137,10 @@ protected:
                m_pipelineLayout = vk::createPipelineLayout(m_vk, device, &pipelineLayoutCreateInfo);
 
                const vk::VkExtent3D targetImageExtent = { WIDTH, HEIGHT, 1 };
-               const ImageCreateInfo targetImageCreateInfo(vk::VK_IMAGE_TYPE_2D, m_colorAttachmentFormat, targetImageExtent, 1, 1, 1
-                       vk::VK_IMAGE_TILING_OPTIMAL, vk::VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | vk::VK_IMAGE_USAGE_TRANSFER_SOURCE_BIT);
+               const ImageCreateInfo targetImageCreateInfo(vk::VK_IMAGE_TYPE_2D, m_colorAttachmentFormat, targetImageExtent, 1, 1, vk::VK_SAMPLE_COUNT_1_BIT
+                       vk::VK_IMAGE_TILING_OPTIMAL, vk::VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | vk::VK_IMAGE_USAGE_TRANSFER_SRC_BIT);
 
-               m_colorTargetImage = Image::CreateAndAlloc(m_vk, device, targetImageCreateInfo, m_context.getDefaultAllocator());
+               m_colorTargetImage = Image::createAndAlloc(m_vk, device, targetImageCreateInfo, m_context.getDefaultAllocator());
 
                const ImageViewCreateInfo colorTargetViewInfo(m_colorTargetImage->object(), vk::VK_IMAGE_VIEW_TYPE_2D, m_colorAttachmentFormat);
                m_colorTargetView = vk::createImageView(m_vk, device, &colorTargetViewInfo);
@@ -151,7 +148,7 @@ protected:
                RenderPassCreateInfo renderPassCreateInfo;
                renderPassCreateInfo.addAttachment(AttachmentDescription(
                        m_colorAttachmentFormat,
-                       1,
+                       vk::VK_SAMPLE_COUNT_1_BIT,
                        vk::VK_ATTACHMENT_LOAD_OP_LOAD,
                        vk::VK_ATTACHMENT_STORE_OP_STORE,
                        vk::VK_ATTACHMENT_LOAD_OP_DONT_CARE,
@@ -194,7 +191,7 @@ protected:
                {
                        0,
                        sizeof(tcu::Vec4) * 2,
-                       vk::VK_VERTEX_INPUT_STEP_RATE_VERTEX,
+                       vk::VK_VERTEX_INPUT_RATE_VERTEX,
                };
 
                const vk::VkVertexInputAttributeDescription vertexInputAttributeDescriptions[2] =
@@ -220,7 +217,7 @@ protected:
                        vertexInputAttributeDescriptions);
 
                const vk::VkDeviceSize dataSize = m_data.size() * sizeof(Vec4RGBA);
-               m_vertexBuffer = Buffer::CreateAndAlloc(m_vk, device, BufferCreateInfo(dataSize,
+               m_vertexBuffer = Buffer::createAndAlloc(m_vk, device, BufferCreateInfo(dataSize,
                        vk::VK_BUFFER_USAGE_VERTEX_BUFFER_BIT), m_context.getDefaultAllocator(), vk::MemoryRequirement::HostVisible);
 
                unsigned char *ptr = reinterpret_cast<unsigned char *>(m_vertexBuffer->getBoundMemory().getHostPtr());
@@ -234,27 +231,29 @@ protected:
                const CmdPoolCreateInfo cmdPoolCreateInfo(queueFamilyIndex);
                m_cmdPool = vk::createCommandPool(m_vk, device, &cmdPoolCreateInfo);
 
-               const CmdBufferCreateInfo cmdBufCreateInfo(*m_cmdPool, vk::VK_CMD_BUFFER_LEVEL_PRIMARY, 0);
-               m_cmdBuffer = vk::createCommandBuffer(m_vk, device, &cmdBufCreateInfo);
+               const vk::VkCommandBufferAllocateInfo cmdBufferAllocateInfo =
+               {
+                       vk::VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO,     // VkStructureType                      sType;
+                       DE_NULL,                                                                                        // const void*                          pNext;
+                       *m_cmdPool,                                                                                     // VkCommandPool                        commandPool;
+                       vk::VK_COMMAND_BUFFER_LEVEL_PRIMARY,                            // VkCommandBufferLevel         level;
+                       1u,                                                                                                     // deUint32                                     bufferCount;
+               };
+               m_cmdBuffer = vk::allocateCommandBuffer(m_vk, device, &cmdBufferAllocateInfo);
 
                initPipeline(device);
        }
 
        virtual void initPipeline (const vk::VkDevice device)
        {
-               const vk::Unique<vk::VkShader> vs(createShader(m_vk, device,
-                       *createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_vertexShaderName), 0),
-                       "main", vk::VK_SHADER_STAGE_VERTEX));
-
-               const vk::Unique<vk::VkShader> fs(createShader(m_vk, device,
-                       *createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_fragmentShaderName), 0),
-                       "main", vk::VK_SHADER_STAGE_FRAGMENT));
+               const vk::Unique<vk::VkShaderModule> vs(createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_vertexShaderName), 0));
+               const vk::Unique<vk::VkShaderModule> fs(createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_fragmentShaderName), 0));
 
                const PipelineCreateInfo::ColorBlendState::Attachment vkCbAttachmentState;
 
                PipelineCreateInfo pipelineCreateInfo(*m_pipelineLayout, *m_renderPass, 0, 0);
-               pipelineCreateInfo.addShader(PipelineCreateInfo::PipelineShaderStage(*vs, vk::VK_SHADER_STAGE_VERTEX));
-               pipelineCreateInfo.addShader(PipelineCreateInfo::PipelineShaderStage(*fs, vk::VK_SHADER_STAGE_FRAGMENT));
+               pipelineCreateInfo.addShader(PipelineCreateInfo::PipelineShaderStage(*vs, "main", vk::VK_SHADER_STAGE_VERTEX_BIT));
+               pipelineCreateInfo.addShader(PipelineCreateInfo::PipelineShaderStage(*fs, "main", vk::VK_SHADER_STAGE_FRAGMENT_BIT));
                pipelineCreateInfo.addState(PipelineCreateInfo::VertexInputState(m_vertexInputState));
                pipelineCreateInfo.addState(PipelineCreateInfo::InputAssemblerState(m_topology));
                pipelineCreateInfo.addState(PipelineCreateInfo::ColorBlendState(1, &vkCbAttachmentState));
@@ -292,14 +291,14 @@ protected:
                const vk::VkRect2D renderArea = { { 0, 0 }, { WIDTH, HEIGHT } };
                const RenderPassBeginInfo renderPassBegin(*m_renderPass, *m_framebuffer, renderArea);
 
-               m_vk.cmdBeginRenderPass(*m_cmdBuffer, &renderPassBegin, vk::VK_RENDER_PASS_CONTENTS_INLINE);
+               m_vk.cmdBeginRenderPass(*m_cmdBuffer, &renderPassBegin, vk::VK_SUBPASS_CONTENTS_INLINE);
        }
 
        void setDynamicViewportState (const deUint32 width, const deUint32 height)
        {
                vk::VkViewport viewport;
-               viewport.originX = 0;
-               viewport.originY = 0;
+               viewport.x = 0;
+               viewport.y = 0;
                viewport.width = static_cast<float>(width);
                viewport.height = static_cast<float>(height);
                viewport.minDepth = 0.0f;
@@ -321,20 +320,20 @@ protected:
                m_vk.cmdSetScissor(*m_cmdBuffer, viewportCount, pScissors);
        }
 
-       void setDynamicRasterState (const float lineWidth = 1.0f, 
-                                                               const float depthBias = 0.0f, 
+       void setDynamicRasterizationState (const float lineWidth = 1.0f, 
+                                                               const float depthBiasConstantFactor = 0.0f, 
                                                                const float depthBiasClamp = 0.0f, 
-                                                               const float slopeScaledDepthBias = 0.0f)
+                                                               const float depthBiasSlopeFactor = 0.0f)
        {
                m_vk.cmdSetLineWidth(*m_cmdBuffer, lineWidth);
-               m_vk.cmdSetDepthBias(*m_cmdBuffer, depthBias, depthBiasClamp, slopeScaledDepthBias);
+               m_vk.cmdSetDepthBias(*m_cmdBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor);
        }
 
        void setDynamicBlendState (const float const1 = 0.0f, const float const2 = 0.0f, 
                                                           const float const3 = 0.0f, const float const4 = 0.0f)
        {
-               float blendConstants[4] = { const1, const2, const3, const4 };
-               m_vk.cmdSetBlendConstants(*m_cmdBuffer, blendConstants);
+               float blendConstantsants[4] = { const1, const2, const3, const4 };
+               m_vk.cmdSetBlendConstants(*m_cmdBuffer, blendConstantsants);
        }
 
        void setDynamicDepthStencilState (const float minDepthBounds = -1.0f, 
@@ -54,31 +54,27 @@ Buffer::Buffer (const vk::DeviceInterface &vk, vk::VkDevice device, vk::Move<vk:
 
 void Buffer::bindMemory (de::MovePtr<vk::Allocation> allocation)
 {
-       if (allocation)
-       {
-               VK_CHECK(m_vk.bindBufferMemory(m_device, *m_object, allocation->getMemory(), allocation->getOffset()));
-       }
-       else
-       {
-               VK_CHECK(m_vk.bindBufferMemory(m_device, *m_object, DE_NULL, 0));
-       }
+       DE_ASSERT(allocation);
+       VK_CHECK(m_vk.bindBufferMemory(m_device, *m_object, allocation->getMemory(), allocation->getOffset()));
+
+       DE_ASSERT(!m_allocation);
        m_allocation = allocation;
 }
 
-de::SharedPtr<Buffer> Buffer::CreateAndAlloc (const vk::DeviceInterface &vk,
-                                                                                        vk::VkDevice device,
-                                                                                        const vk::VkBufferCreateInfo &createInfo,
-                                                                                        vk::Allocator &allocator,
-                                                                                        vk::MemoryRequirement memoryRequirement)
+de::SharedPtr<Buffer> Buffer::createAndAlloc (const vk::DeviceInterface &vk,
+       vk::VkDevice device,
+       const vk::VkBufferCreateInfo &createInfo,
+       vk::Allocator &allocator,
+       vk::MemoryRequirement memoryRequirement)
 {
-       de::SharedPtr<Buffer> ret = Create(vk, device, createInfo);
+       de::SharedPtr<Buffer> ret = create(vk, device, createInfo);
 
        vk::VkMemoryRequirements bufferRequirements = vk::getBufferMemoryRequirements(vk, device, ret->object());
        ret->bindMemory(allocator.allocate(bufferRequirements, memoryRequirement));
        return ret;
 }
 
-de::SharedPtr<Buffer> Buffer::Create (const vk::DeviceInterface &vk,
+de::SharedPtr<Buffer> Buffer::create (const vk::DeviceInterface &vk,
                                                                          vk::VkDevice device,
                                                                          const vk::VkBufferCreateInfo &createInfo)
 {
@@ -50,31 +50,33 @@ class Buffer
 {
 public:
 
-       static de::SharedPtr<Buffer> Create (const vk::DeviceInterface& vk, vk::VkDevice device, const vk::VkBufferCreateInfo &createInfo);
+       static de::SharedPtr<Buffer> create                     (const vk::DeviceInterface& vk, vk::VkDevice device, const vk::VkBufferCreateInfo &createInfo);
 
-       static de::SharedPtr<Buffer> CreateAndAlloc (const vk::DeviceInterface&         vk,
+       static de::SharedPtr<Buffer> createAndAlloc (const vk::DeviceInterface&         vk,
                                                                                                 vk::VkDevice                                   device,
                                                                                                 const vk::VkBufferCreateInfo&  createInfo,
                                                                                                 vk::Allocator&                                 allocator,
                                                                                                 vk::MemoryRequirement                  allocationMemoryProperties = vk::MemoryRequirement::Any);
 
-       Buffer (const vk::DeviceInterface &vk, vk::VkDevice device, vk::Move<vk::VkBuffer> object);
+                                                               Buffer                  (const vk::DeviceInterface &vk, vk::VkDevice device, vk::Move<vk::VkBuffer> object);
 
-       inline vk::VkBuffer object (void) const { return *m_object; }
 
-       void bindMemory (de::MovePtr<vk::Allocation> allocation);
-       inline vk::Allocation getBoundMemory (void) const { return *m_allocation; }
+       void                                            bindMemory              (de::MovePtr<vk::Allocation> allocation);
+
+
+       vk::VkBuffer                            object                  (void) const                                                            { return *m_object;             }
+       vk::Allocation                          getBoundMemory  (void) const                                                            { return *m_allocation; }
 
 private:
 
-       Buffer                          (const Buffer &other);  // Not allowed!
-       Buffer &operator=       (const Buffer &other);  // Not allowed!
+       Buffer                                                                          (const Buffer& other);  // Not allowed!
+       Buffer                                          &operator=              (const Buffer& other);  // Not allowed!
 
 
        de::MovePtr<vk::Allocation>             m_allocation;
        vk::Unique<vk::VkBuffer>                m_object;
 
-       const   vk::DeviceInterface &   m_vk;
+       const   vk::DeviceInterface   m_vk;
                        vk::VkDevice                    m_device;
 };
 
@@ -66,23 +66,18 @@ public:
 
        virtual void initPipeline (const vk::VkDevice device)
        {
-               const vk::Unique<vk::VkShader> vs(createShader(m_vk, device,
-                       *createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_vertexShaderName), 0),
-                       "main", vk::VK_SHADER_STAGE_VERTEX));
-
-               const vk::Unique<vk::VkShader> fs(createShader(m_vk, device,
-                       *createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_fragmentShaderName), 0),
-                       "main", vk::VK_SHADER_STAGE_FRAGMENT));
-
+               const vk::Unique<vk::VkShaderModule> vs (createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_vertexShaderName), 0));
+               const vk::Unique<vk::VkShaderModule> fs (createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_fragmentShaderName), 0));
+               
                const vk::VkPipelineColorBlendAttachmentState VkPipelineColorBlendAttachmentState =
                        PipelineCreateInfo::ColorBlendState::Attachment(
                        vk::VK_TRUE,
-                       vk::VK_BLEND_SRC_ALPHA, vk::VK_BLEND_CONSTANT_COLOR, vk::VK_BLEND_OP_ADD,
-                       vk::VK_BLEND_SRC_ALPHA, vk::VK_BLEND_CONSTANT_ALPHA, vk::VK_BLEND_OP_ADD);
+                       vk::VK_BLEND_FACTOR_SRC_ALPHA, vk::VK_BLEND_FACTOR_CONSTANT_COLOR, vk::VK_BLEND_OP_ADD,
+                       vk::VK_BLEND_FACTOR_SRC_ALPHA, vk::VK_BLEND_FACTOR_CONSTANT_ALPHA, vk::VK_BLEND_OP_ADD);
 
                PipelineCreateInfo pipelineCreateInfo(*m_pipelineLayout, *m_renderPass, 0, 0);
-               pipelineCreateInfo.addShader(PipelineCreateInfo::PipelineShaderStage(*vs, vk::VK_SHADER_STAGE_VERTEX));
-               pipelineCreateInfo.addShader(PipelineCreateInfo::PipelineShaderStage(*fs, vk::VK_SHADER_STAGE_FRAGMENT));
+               pipelineCreateInfo.addShader(PipelineCreateInfo::PipelineShaderStage(*vs, "main", vk::VK_SHADER_STAGE_VERTEX_BIT));
+               pipelineCreateInfo.addShader(PipelineCreateInfo::PipelineShaderStage(*fs, "main", vk::VK_SHADER_STAGE_FRAGMENT_BIT));
                pipelineCreateInfo.addState(PipelineCreateInfo::VertexInputState(m_vertexInputState));
                pipelineCreateInfo.addState(PipelineCreateInfo::InputAssemblerState(m_topology));
                pipelineCreateInfo.addState(PipelineCreateInfo::ColorBlendState(1, &VkPipelineColorBlendAttachmentState));
@@ -105,7 +100,7 @@ public:
 
                // bind states here
                setDynamicViewportState(WIDTH, HEIGHT);
-               setDynamicRasterState();
+               setDynamicRasterizationState();
                setDynamicDepthStencilState();
                setDynamicBlendState(0.33f, 0.1f, 0.66f, 0.5f);
 
@@ -120,8 +115,18 @@ public:
                m_vk.cmdEndRenderPass(*m_cmdBuffer);
                m_vk.endCommandBuffer(*m_cmdBuffer);
 
-               const vk::VkCmdBuffer cmdBuffer = *m_cmdBuffer;
-               VK_CHECK(m_vk.queueSubmit(queue, 1, &cmdBuffer, DE_NULL));
+               vk::VkSubmitInfo submitInfo =
+               {
+                       vk::VK_STRUCTURE_TYPE_SUBMIT_INFO,      // VkStructureType                      sType;\r
+                       DE_NULL,                                                        // const void*                          pNext;\r
+                       0,                                                                      // deUint32                                     waitSemaphoreCount;\r
+                       DE_NULL,                                                        // const VkSemaphore*           pWaitSemaphores;\r
+                       1,                                                                      // deUint32                                     commandBufferCount;\r
+                       &m_cmdBuffer.get(),                                     // const VkCommandBuffer*       pCommandBuffers;\r
+                       0,                                                                      // deUint32                                     signalSemaphoreCount;\r
+                       DE_NULL                                                         // const VkSemaphore*           pSignalSemaphores;\r
+               };
+               m_vk.queueSubmit(queue, 1, &submitInfo, DE_NULL);
                VK_CHECK(m_vk.queueWaitIdle(queue));
 
                //validation
@@ -149,7 +154,7 @@ public:
 
                        const vk::VkOffset3D zeroOffset = { 0, 0, 0 };
                        const tcu::ConstPixelBufferAccess renderedFrame = m_colorTargetImage->readSurface(queue, m_context.getDefaultAllocator(),
-                               vk::VK_IMAGE_LAYOUT_GENERAL, zeroOffset, WIDTH, HEIGHT, vk::VK_IMAGE_ASPECT_COLOR);
+                               vk::VK_IMAGE_LAYOUT_GENERAL, zeroOffset, WIDTH, HEIGHT, vk::VK_IMAGE_ASPECT_COLOR_BIT);
 
                        qpTestResult res = QP_TEST_RESULT_PASS;
 
@@ -42,23 +42,23 @@ namespace vkt
 namespace DynamicState
 {
 
-ImageSubresourceRange::ImageSubresourceRange ( vk::VkImageAspectFlags  _aspectMask,
-                                                                                               deUint32                                _baseMipLevel,
-                                                                                               deUint32                                _mipLevels,
-                                                                                               deUint32                                _baseArrayLayer,
-                                                                                               deUint32                                _arraySize)
+ImageSubresourceRange::ImageSubresourceRange (vk::VkImageAspectFlags   _aspectMask,
+                                                                                         deUint32                                      _baseMipLevel,
+                                                                                         deUint32                                      _levelCount,
+                                                                                         deUint32                                      _baseArrayLayer,
+                                                                                         deUint32                                      _layerCount)
 {
        aspectMask              = _aspectMask;
        baseMipLevel    = _baseMipLevel;
-       mipLevels               = _mipLevels;
+       levelCount              = _levelCount;
        baseArrayLayer  = _baseArrayLayer;
-       arraySize               = _arraySize;
+       layerCount              = _layerCount;
 }
 
-ChannelMapping::ChannelMapping (vk::VkChannelSwizzle _r,
-                                                               vk::VkChannelSwizzle _g,
-                                                               vk::VkChannelSwizzle _b,
-                                                               vk::VkChannelSwizzle _a)
+ComponentMapping::ComponentMapping (vk::VkComponentSwizzle _r,
+                                                                   vk::VkComponentSwizzle _g,
+                                                                   vk::VkComponentSwizzle _b,
+                                                                   vk::VkComponentSwizzle _a)
 {
        r = _r;
        g = _g;
@@ -66,64 +66,49 @@ ChannelMapping::ChannelMapping (vk::VkChannelSwizzle _r,
        a = _a;
 }
 
-ImageViewCreateInfo::ImageViewCreateInfo (                     vk::VkImage                                             _image,
-                                                                                                       vk::VkImageViewType                             _viewType,
-                                                                                                       vk::VkFormat                                    _format,
-                                                                                       const   vk::VkImageSubresourceRange&    _subresourceRange,
-                                                                                       const   vk::VkChannelMapping&                   _channels,
-                                                                                                       vk::VkImageViewCreateFlags              _flags)
+ImageViewCreateInfo::ImageViewCreateInfo (vk::VkImage                                                  _image,
+                                                                                 vk::VkImageViewType                                   _viewType,
+                                                                                 vk::VkFormat                                                  _format,
+                                                                                 const vk::VkImageSubresourceRange&    _subresourceRange,
+                                                                                 const vk::VkComponentMapping&                 _components,
+                                                                                 vk::VkImageViewCreateFlags                    _flags)
 {
        sType = vk::VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
        pNext = DE_NULL;
+       flags                           = 0u;
        image                           = _image;
        viewType                        = _viewType;
        format                          = _format;
-       channels.r                      = _channels.r;
-       channels.g                      = _channels.g;
-       channels.b                      = _channels.b;
-       channels.a                      = _channels.a;
+       components.r            = _components.r;
+       components.g            = _components.g;
+       components.b            = _components.b;
+       components.a            = _components.a;
        subresourceRange        = _subresourceRange;
        flags                           = _flags;
 }
 
-ImageViewCreateInfo::ImageViewCreateInfo (                     vk::VkImage                                     _image,
-                                                                                                       vk::VkImageViewType                     _viewType,
-                                                                                                       vk::VkFormat                            _format,
-                                                                                       const   vk::VkChannelMapping&           _channels,
-                                                                                                       vk::VkImageViewCreateFlags      _flags)
+ImageViewCreateInfo::ImageViewCreateInfo (vk::VkImage                                  _image,
+                                                                                 vk::VkImageViewType                   _viewType,
+                                                                                 vk::VkFormat                                  _format,
+                                                                                 const vk::VkComponentMapping& _components,
+                                                                                 vk::VkImageViewCreateFlags    _flags)
 {
        sType = vk::VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
        pNext = DE_NULL;
-       image           = _image;
-       viewType        = _viewType;
-       format          = _format;
-       channels.r      = _channels.r;
-       channels.g      = _channels.g;
-       channels.b      = _channels.b;
-       channels.a      = _channels.a;
+       flags                   = 0u;
+       image                   = _image;
+       viewType                = _viewType;
+       format                  = _format;
+       components.r    = _components.r;
+       components.g    = _components.g;
+       components.b    = _components.b;
+       components.a    = _components.a;
 
        vk::VkImageAspectFlags aspectFlags;
        const tcu::TextureFormat tcuFormat = vk::mapVkFormat(_format);
 
        switch (tcuFormat.order)
        {
-               case tcu::TextureFormat::R:\r
-               case tcu::TextureFormat::A:\r
-               case tcu::TextureFormat::I:\r
-               case tcu::TextureFormat::L:\r
-               case tcu::TextureFormat::LA:\r
-               case tcu::TextureFormat::RG:\r
-               case tcu::TextureFormat::RA:\r
-               case tcu::TextureFormat::RGB:\r
-               case tcu::TextureFormat::RGBA:\r
-               case tcu::TextureFormat::ARGB:\r
-               case tcu::TextureFormat::BGRA:\r
-               case tcu::TextureFormat::sR:\r
-               case tcu::TextureFormat::sRG:\r
-               case tcu::TextureFormat::sRGB:\r
-               case tcu::TextureFormat::sRGBA:
-                       aspectFlags = vk::VK_IMAGE_ASPECT_COLOR_BIT;
-                       break;
                case tcu::TextureFormat::D:
                        aspectFlags = vk::VK_IMAGE_ASPECT_DEPTH_BIT;
                        break;
@@ -134,7 +119,8 @@ ImageViewCreateInfo::ImageViewCreateInfo (                  vk::VkImage                                     _image,
                        aspectFlags = vk::VK_IMAGE_ASPECT_STENCIL_BIT | vk::VK_IMAGE_ASPECT_DEPTH_BIT;
                        break;
                default:
-                       TCU_FAIL("unhandled format");
+                       aspectFlags = vk::VK_IMAGE_ASPECT_COLOR_BIT;
+                       break;
        }
 
        subresourceRange = ImageSubresourceRange(aspectFlags);;
@@ -156,44 +142,45 @@ BufferViewCreateInfo::BufferViewCreateInfo (vk::VkBuffer  _buffer,
 }
 
 
-BufferCreateInfo::BufferCreateInfo (           vk::VkDeviceSize                _size,
-                                                                                       vk::VkBufferUsageFlags  _usage,
-                                                                                       vk::VkSharingMode               _sharingMode,
-                                                                                       deUint32                                _queueFamilyCount,
-                                                                       const   deUint32*                               _pQueueFamilyIndices,
-                                                                                       vk::VkBufferCreateFlags _flags)
+BufferCreateInfo::BufferCreateInfo (vk::VkDeviceSize           _size,
+                                                                       vk::VkBufferUsageFlags  _usage,
+                                                                       vk::VkSharingMode               _sharingMode,
+                                                                       deUint32                                _queueFamilyIndexCount,
+                                                                       const deUint32*                 _pQueueFamilyIndices,
+                                                                       vk::VkBufferCreateFlags _flags)
 {   
        sType = vk::VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO;
        pNext = DE_NULL;
-       size                            = _size;
-       usage                           = _usage;
-       flags                           = _flags;
-       sharingMode                     = _sharingMode;
-       queueFamilyCount        = _queueFamilyCount;
+       size                                    = _size;
+       usage                                   = _usage;
+       flags                                   = _flags;
+       sharingMode                             = _sharingMode;
+       queueFamilyIndexCount   = _queueFamilyIndexCount;
 
-       if (_queueFamilyCount)
+       if (_queueFamilyIndexCount)
        {
                m_queueFamilyIndices = std::vector<deUint32>(
-                       _pQueueFamilyIndices, _pQueueFamilyIndices + _queueFamilyCount);
+                       _pQueueFamilyIndices, _pQueueFamilyIndices + _queueFamilyIndexCount);
                pQueueFamilyIndices = &m_queueFamilyIndices[0];
-       } else
+       }
+       else
+       {
                pQueueFamilyIndices = _pQueueFamilyIndices;
-
-   
+       }   
 }
 
 BufferCreateInfo::BufferCreateInfo (const BufferCreateInfo &other)
 {
-       sType                           = other.sType;
-       pNext                           = other.pNext;
-       size                            = other.size;
-       usage                           = other.usage;
-       flags                           = other.flags;
-       sharingMode                     = other.sharingMode;
-       queueFamilyCount        = other.queueFamilyCount;
+       sType                                   = other.sType;
+       pNext                                   = other.pNext;
+       size                                    = other.size;
+       usage                                   = other.usage;
+       flags                                   = other.flags;
+       sharingMode                             = other.sharingMode;
+       queueFamilyIndexCount   = other.queueFamilyIndexCount;
 
-       m_queueFamilyIndices = other.m_queueFamilyIndices;
-       DE_ASSERT(m_queueFamilyIndices.size() == queueFamilyCount);
+       m_queueFamilyIndices    = other.m_queueFamilyIndices;
+       DE_ASSERT(m_queueFamilyIndices.size() == queueFamilyIndexCount);
 
        if (m_queueFamilyIndices.size())
        {
@@ -207,17 +194,17 @@ BufferCreateInfo::BufferCreateInfo (const BufferCreateInfo &other)
 
 BufferCreateInfo & BufferCreateInfo::operator= (const BufferCreateInfo &other)
 {
-       sType                                   = other.sType;
-       pNext                                   = other.pNext;
-       size                                    = other.size;
-       usage                                   = other.usage;
-       flags                                   = other.flags;
-       sharingMode                             = other.sharingMode;
-       queueFamilyCount                = other.queueFamilyCount;
+       sType                                           = other.sType;
+       pNext                                           = other.pNext;
+       size                                            = other.size;
+       usage                                           = other.usage;
+       flags                                           = other.flags;
+       sharingMode                                     = other.sharingMode;
+       queueFamilyIndexCount           = other.queueFamilyIndexCount;
 
-       m_queueFamilyIndices    = other.m_queueFamilyIndices;
+       m_queueFamilyIndices            = other.m_queueFamilyIndices;
 
-       DE_ASSERT(m_queueFamilyIndices.size() == queueFamilyCount);
+       DE_ASSERT(m_queueFamilyIndices.size() == queueFamilyIndexCount);
 
        if (m_queueFamilyIndices.size())
        {
@@ -231,37 +218,38 @@ BufferCreateInfo & BufferCreateInfo::operator= (const BufferCreateInfo &other)
        return *this;
 }
 
-ImageCreateInfo::ImageCreateInfo (                     vk::VkImageType                 _imageType,
-                                                                                       vk::VkFormat                    _format,
-                                                                                       vk::VkExtent3D                  _extent,
-                                                                                       deUint32                                _mipLevels,
-                                                                                       deUint32                                _arraySize,
-                                                                                       deUint32                                _samples,
-                                                                                       vk::VkImageTiling               _tiling,
-                                                                                       vk::VkImageUsageFlags   _usage,
-                                                                                       vk::VkSharingMode               _sharingMode,
-                                                                                       deUint32                                _queueFamilyCount,
-                                                                       const   deUint32*                               _pQueueFamilyIndices,
-                                                                                       vk::VkImageCreateFlags  _flags, 
-                                                                                       vk::VkImageLayout               _initialLayout)
-{
-       if (_queueFamilyCount)
+ImageCreateInfo::ImageCreateInfo (vk::VkImageType                      _imageType,
+                                                                 vk::VkFormat                          _format,
+                                                                 vk::VkExtent3D                        _extent,
+                                                                 deUint32                                      _mipLevels,
+                                                                 deUint32                                      _arrayLayers,
+                                                                 vk::VkSampleCountFlagBits     _samples,
+                                                                 vk::VkImageTiling                     _tiling,
+                                                                 vk::VkImageUsageFlags         _usage,
+                                                                 vk::VkSharingMode                     _sharingMode,
+                                                                 deUint32                                      _queueFamilyIndexCount,
+                                                                 const deUint32*                       _pQueueFamilyIndices,
+                                                                 vk::VkImageCreateFlags        _flags,
+                                                                 vk::VkImageLayout                     _initialLayout)
+{
+       if (_queueFamilyIndexCount)
        {
-               m_queueFamilyIndices = std::vector<deUint32>(_pQueueFamilyIndices, _pQueueFamilyIndices + _queueFamilyCount);
+               m_queueFamilyIndices = std::vector<deUint32>(_pQueueFamilyIndices, _pQueueFamilyIndices + _queueFamilyIndexCount);
        }
 
        sType = vk::VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO;
        pNext = DE_NULL;
-       imageType                       = _imageType;
-       format                          = _format;
-       extent                          = _extent;
-       mipLevels                       = _mipLevels;
-       arraySize                       = _arraySize;
-       samples                         = _samples;
-       tiling                          = _tiling;
-       usage                           = _usage;
-       sharingMode                     = _sharingMode;
-       queueFamilyCount        = _queueFamilyCount;
+       flags                                   = _flags;
+       imageType                               = _imageType;
+       format                                  = _format;
+       extent                                  = _extent;
+       mipLevels                               = _mipLevels;
+       arrayLayers                             = _arrayLayers;
+       samples                                 = _samples;
+       tiling                                  = _tiling;
+       usage                                   = _usage;
+       sharingMode                             = _sharingMode;
+       queueFamilyIndexCount   = _queueFamilyIndexCount;
 
        if (m_queueFamilyIndices.size())
        {
@@ -271,19 +259,18 @@ ImageCreateInfo::ImageCreateInfo (                        vk::VkImageType                 _imageType,
        {
                pQueueFamilyIndices = DE_NULL;
        }
-
-       flags                   = _flags;
        initialLayout   = _initialLayout;
 }
 
-FramebufferCreateInfo::FramebufferCreateInfo (                 vk::VkRenderPass                                _renderPass,
-                                                                                               const   std::vector<vk::VkImageView>&   atachments, 
-                                                                                                               deUint32                                                _width,
-                                                                                                               deUint32                                                _height,
-                                                                                                               deUint32                                                _layers)
+FramebufferCreateInfo::FramebufferCreateInfo (vk::VkRenderPass                                         _renderPass,
+                                                                                         const std::vector<vk::VkImageView>&   atachments, 
+                                                                                         deUint32                                                              _width,
+                                                                                         deUint32                                                              _height,
+                                                                                         deUint32                                                              _layers)
 {
        sType = vk::VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO;
        pNext = DE_NULL;
+       flags = 0u;
 
        renderPass              = _renderPass;
        attachmentCount = static_cast<deUint32>(atachments.size());
@@ -311,6 +298,7 @@ RenderPassCreateInfo::RenderPassCreateInfo (const std::vector<vk::VkAttachmentDe
 {
        sType = vk::VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO;
        pNext = DE_NULL;
+       flags = 0; 
 
        attachmentCount = static_cast<deUint32>(m_attachments.size());
        pAttachments    = &m_attachmentsStructs[0];
@@ -320,12 +308,12 @@ RenderPassCreateInfo::RenderPassCreateInfo (const std::vector<vk::VkAttachmentDe
        pDependencies   = &m_dependiencesStructs[0];
 }
 
-RenderPassCreateInfo::RenderPassCreateInfo (           deUint32                                                _attachmentCount,
-                                                                                       const   vk::VkAttachmentDescription*    _pAttachments,
-                                                                                                       deUint32                                                _subpassCount,
-                                                                                       const   vk::VkSubpassDescription*               _pSubpasses,
-                                                                                                       deUint32                                                _dependencyCount,
-                                                                                       const   vk::VkSubpassDependency*                _pDependiences)
+RenderPassCreateInfo::RenderPassCreateInfo (deUint32                                                   _attachmentCount,
+                                                                                       const vk::VkAttachmentDescription*      _pAttachments,
+                                                                                       deUint32                                                        _subpassCount,
+                                                                                       const vk::VkSubpassDescription*         _pSubpasses,
+                                                                                       deUint32                                                        _dependencyCount,
+                                                                                       const vk::VkSubpassDependency*          _pDependiences)
 {
 
        m_attachments   = std::vector<AttachmentDescription>(_pAttachments, _pAttachments + _attachmentCount);
@@ -338,6 +326,7 @@ RenderPassCreateInfo::RenderPassCreateInfo (                deUint32                                                _attachmentCount,
 
        sType = vk::VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO;
        pNext = DE_NULL;
+       flags = 0;
 
        attachmentCount = static_cast<deUint32>(m_attachments.size());
 
@@ -401,10 +390,10 @@ RenderPassCreateInfo::addDependency (vk::VkSubpassDependency dependency)
        pDependencies                   = &m_dependiencesStructs[0];
 }
 
-RenderPassBeginInfo::RenderPassBeginInfo (                     vk::VkRenderPass                                _renderPass,
-                                                                                                       vk::VkFramebuffer                               _framebuffer,
-                                                                                                       vk::VkRect2D                                    _renderArea,
-                                                                                       const   std::vector<vk::VkClearValue>&  _clearValues)
+RenderPassBeginInfo::RenderPassBeginInfo (vk::VkRenderPass                                             _renderPass,
+                                                                                 vk::VkFramebuffer                                             _framebuffer,
+                                                                                 vk::VkRect2D                                                  _renderArea,
+                                                                                 const std::vector<vk::VkClearValue>&  _clearValues)
 {
 
        m_clearValues   = _clearValues;
@@ -420,33 +409,23 @@ RenderPassBeginInfo::RenderPassBeginInfo (                        vk::VkRenderPass                                _renderPass,
 
 CmdPoolCreateInfo::CmdPoolCreateInfo (deUint32 _queueFamilyIndex, unsigned int _flags)
 {
-       sType = vk::VK_STRUCTURE_TYPE_CMD_POOL_CREATE_INFO;
+       sType = vk::VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
        pNext = DE_NULL;
 
        queueFamilyIndex = _queueFamilyIndex;
-       flags                    = _flags;
-}
-
-CmdBufferCreateInfo::CmdBufferCreateInfo (vk::VkCmdPool _pool, vk::VkCmdBufferLevel _level, unsigned int _flags)
-{
-       sType   = vk::VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO;
-       pNext   = DE_NULL;
-       cmdPool = _pool;
-       level   = _level;
-       flags   = _flags;
+       flags                           = _flags;
 }
 
-AttachmentDescription::AttachmentDescription ( vk::VkFormat                    _format,
-                                                                                               deUint32                                _samples,
-                                                                                               vk::VkAttachmentLoadOp  _loadOp,
-                                                                                               vk::VkAttachmentStoreOp _storeOp,
-                                                                                               vk::VkAttachmentLoadOp  _stencilLoadOp,
-                                                                                               vk::VkAttachmentStoreOp _stencilStoreOp,
-                                                                                               vk::VkImageLayout               _initialLayout,
-                                                                                               vk::VkImageLayout               _finalLayout)
+AttachmentDescription::AttachmentDescription (vk::VkFormat                             _format,
+                                                                                         vk::VkSampleCountFlagBits     _samples,
+                                                                                         vk::VkAttachmentLoadOp        _loadOp,
+                                                                                         vk::VkAttachmentStoreOp       _storeOp,
+                                                                                         vk::VkAttachmentLoadOp        _stencilLoadOp,
+                                                                                         vk::VkAttachmentStoreOp       _stencilStoreOp,
+                                                                                         vk::VkImageLayout                     _initialLayout,
+                                                                                         vk::VkImageLayout                     _finalLayout)
 {
-       sType = vk::VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION;
-       pNext = DE_NULL;
+       flags = 0;
        format                  = _format;
        samples                 = _samples;
        loadOp                  = _loadOp;
@@ -459,12 +438,7 @@ AttachmentDescription::AttachmentDescription (     vk::VkFormat                    _format,
 
 AttachmentDescription::AttachmentDescription (const vk::VkAttachmentDescription &rhs)
 {
-
-       DE_ASSERT(rhs.sType == vk::VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION);
-       DE_ASSERT(rhs.pNext == DE_NULL);
-
-       sType                   = rhs.sType;
-       pNext                   = rhs.pNext;
+       flags                   = rhs.flags;
        format                  = rhs.format;
        samples                 = rhs.samples;
        loadOp                  = rhs.loadOp;
@@ -487,223 +461,230 @@ AttachmentReference::AttachmentReference (void)
        layout = vk::VK_IMAGE_LAYOUT_UNDEFINED;
 }
 
-SubpassDescription::SubpassDescription(                        vk::VkPipelineBindPoint                 _pipelineBindPoint,
-                                                                                               vk::VkSubpassDescriptionFlags   _flags,
-                                                                                               deUint32                                                _inputCount,
-                                                                               const   vk::VkAttachmentReference*              _inputAttachments,
-                                                                                               deUint32                                                _colorCount,
-                                                                               const   vk::VkAttachmentReference*              _colorAttachments,
-                                                                               const   vk::VkAttachmentReference*              _resolveAttachments,
-                                                                                               vk::VkAttachmentReference               _depthStencilAttachment,
-                                                                                               deUint32                                                _preserveCount,
-                                                                               const   vk::VkAttachmentReference*              _preserveAttachments)
+SubpassDescription::SubpassDescription (vk::VkPipelineBindPoint                                _pipelineBindPoint,
+                                                                               vk::VkSubpassDescriptionFlags           _flags,
+                                                                               deUint32                                                        _inputAttachmentCount,
+                                                                               const vk::VkAttachmentReference*        _inputAttachments,
+                                                                               deUint32                                                        _colorAttachmentCount,
+                                                                               const vk::VkAttachmentReference*        _colorAttachments,
+                                                                               const vk::VkAttachmentReference*        _resolveAttachments,
+                                                                               vk::VkAttachmentReference                       depthStencilAttachment,
+                                                                               deUint32                                                        _preserveAttachmentCount,
+                                                                               const vk::VkAttachmentReference*        _preserveAttachments)
 {
-       m_InputAttachments = std::vector<vk::VkAttachmentReference>(_inputAttachments, _inputAttachments + _inputCount);
-       m_ColorAttachments = std::vector<vk::VkAttachmentReference>(_colorAttachments, _colorAttachments + _colorCount);
+       m_inputAttachments = std::vector<vk::VkAttachmentReference>(_inputAttachments, _inputAttachments + _inputAttachmentCount);
+       m_colorAttachments = std::vector<vk::VkAttachmentReference>(_colorAttachments, _colorAttachments + _colorAttachmentCount);
 
        if (_resolveAttachments)
        {
-               m_ResolveAttachments = std::vector<vk::VkAttachmentReference>(_resolveAttachments, _resolveAttachments + _colorCount);
+               m_resolveAttachments = std::vector<vk::VkAttachmentReference>(_resolveAttachments, _resolveAttachments + _colorAttachmentCount);
        }
 
-       m_PreserveAttachments = std::vector<vk::VkAttachmentReference>(_preserveAttachments, _preserveAttachments + _preserveCount);
+       m_preserveAttachments = std::vector<vk::VkAttachmentReference>(_preserveAttachments, _preserveAttachments + _preserveAttachmentCount);
 
-       sType = vk::VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION;
-       pNext = DE_NULL;
+       m_depthStencilAttachment = depthStencilAttachment;
+
+       flags = _flags;
        pipelineBindPoint               = _pipelineBindPoint;
-       flags                                   = _flags;
-       inputCount                              = _inputCount;
+       inputAttachmentCount    = _inputAttachmentCount;
        pInputAttachments               = DE_NULL;
-       colorCount                              = _colorCount;
+       colorAttachmentCount    = _colorAttachmentCount;
        pColorAttachments               = DE_NULL;
        pResolveAttachments             = DE_NULL;
-       depthStencilAttachment  = _depthStencilAttachment;
+       pDepthStencilAttachment = &m_depthStencilAttachment;
        pPreserveAttachments    = DE_NULL;
-       preserveCount                   = _preserveCount;
+       preserveAttachmentCount = _preserveAttachmentCount;
 
-       if (m_InputAttachments.size()) {
-               pInputAttachments = &m_InputAttachments[0];
+       if (m_inputAttachments.size()) {
+               pInputAttachments = &m_inputAttachments[0];
        }
 
-       if (m_ColorAttachments.size()) {
-               pColorAttachments = &m_ColorAttachments[0];
+       if (m_colorAttachments.size()) {
+               pColorAttachments = &m_colorAttachments[0];
        }
 
-       if (m_ResolveAttachments.size()) {
-               pResolveAttachments = &m_ResolveAttachments[0];
+       if (m_resolveAttachments.size()) {
+               pResolveAttachments = &m_resolveAttachments[0];
        }
 
-       if (m_PreserveAttachments.size()) {
-               pPreserveAttachments = &m_PreserveAttachments[0];
+       if (m_preserveAttachments.size()) {
+               pPreserveAttachments = &m_preserveAttachments[0];
        }
 }
 
-SubpassDescription::SubpassDescription (const vk::VkSubpassDescription &rhs)
+SubpassDescription::SubpassDescription (const vk::VkSubpassDescriptionrhs)
 {
-
-       DE_ASSERT(rhs.sType == vk::VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION);
-       DE_ASSERT(rhs.pNext == DE_NULL);
-
        *static_cast<vk::VkSubpassDescription*>(this) = rhs;
 
-       m_InputAttachments = std::vector<vk::VkAttachmentReference>(
-               rhs.pInputAttachments, rhs.pInputAttachments + rhs.inputCount);
+       m_inputAttachments = std::vector<vk::VkAttachmentReference>(
+               rhs.pInputAttachments, rhs.pInputAttachments + rhs.inputAttachmentCount);
 
-       m_ColorAttachments = std::vector<vk::VkAttachmentReference>(
-               rhs.pColorAttachments, rhs.pColorAttachments + rhs.colorCount);
+       m_colorAttachments = std::vector<vk::VkAttachmentReference>(
+               rhs.pColorAttachments, rhs.pColorAttachments + rhs.colorAttachmentCount);
 
        if (rhs.pResolveAttachments) {
-               m_ResolveAttachments = std::vector<vk::VkAttachmentReference>(
-                       rhs.pResolveAttachments, rhs.pResolveAttachments + rhs.colorCount);
+               m_resolveAttachments = std::vector<vk::VkAttachmentReference>(
+                       rhs.pResolveAttachments, rhs.pResolveAttachments + rhs.colorAttachmentCount);
+       }
+       m_preserveAttachments = std::vector<vk::VkAttachmentReference>(
+               rhs.pPreserveAttachments, rhs.pPreserveAttachments + rhs.preserveAttachmentCount);
+
+       if (rhs.pDepthStencilAttachment)
+       {
+               m_depthStencilAttachment = *rhs.pDepthStencilAttachment;
        }
-       m_PreserveAttachments = std::vector<vk::VkAttachmentReference>(
-               rhs.pPreserveAttachments, rhs.pPreserveAttachments + rhs.preserveCount);
 
-       if (m_InputAttachments.size()) {
-               pInputAttachments = &m_InputAttachments[0];
+       if (m_inputAttachments.size()) {
+               pInputAttachments = &m_inputAttachments[0];
        }
-       if (m_ColorAttachments.size()) {
-               pColorAttachments = &m_ColorAttachments[0];
+       if (m_colorAttachments.size()) {
+               pColorAttachments = &m_colorAttachments[0];
        }
 
-       if (m_ResolveAttachments.size()) {
-               pResolveAttachments = &m_ResolveAttachments[0];
+       if (m_resolveAttachments.size()) {
+               pResolveAttachments = &m_resolveAttachments[0];
        }
 
-       if (m_PreserveAttachments.size()) {
-               pPreserveAttachments = &m_PreserveAttachments[0];
+       pDepthStencilAttachment = &m_depthStencilAttachment;
+
+       if (m_preserveAttachments.size()) {
+               pPreserveAttachments = &m_preserveAttachments[0];
        }
 }
 
-SubpassDescription::SubpassDescription (const SubpassDescription &rhs) {
+SubpassDescription::SubpassDescription (const SubpassDescriptionrhs) {
        *this = rhs;
 }
 
-SubpassDescription &SubpassDescription::operator= (const SubpassDescription &rhs)
+SubpassDescription& SubpassDescription::operator= (const SubpassDescription& rhs)
 {
        *static_cast<vk::VkSubpassDescription*>(this) = rhs;
 
-       m_InputAttachments              = rhs.m_InputAttachments;
-       m_ColorAttachments              = rhs.m_ColorAttachments;
-       m_ResolveAttachments    = rhs.m_ResolveAttachments;
-       m_PreserveAttachments   = rhs.m_PreserveAttachments;
+       m_inputAttachments              = rhs.m_inputAttachments;
+       m_colorAttachments              = rhs.m_colorAttachments;
+       m_resolveAttachments    = rhs.m_resolveAttachments;
+       m_preserveAttachments   = rhs.m_preserveAttachments;
+       m_depthStencilAttachment = rhs.m_depthStencilAttachment;
 
-       if (m_InputAttachments.size()) {
-               pInputAttachments = &m_InputAttachments[0];
+       if (m_inputAttachments.size()) {
+               pInputAttachments = &m_inputAttachments[0];
        }
-       if (m_ColorAttachments.size()) {
-               pColorAttachments = &m_ColorAttachments[0];
+       if (m_colorAttachments.size()) {
+               pColorAttachments = &m_colorAttachments[0];
        }
 
-       if (m_ResolveAttachments.size()) {
-               pResolveAttachments = &m_ResolveAttachments[0];
+       if (m_resolveAttachments.size()) {
+               pResolveAttachments = &m_resolveAttachments[0];
        }
 
-       if (m_PreserveAttachments.size()) {
-               pPreserveAttachments = &m_PreserveAttachments[0];
+       pDepthStencilAttachment = &m_depthStencilAttachment;
+
+       if (m_preserveAttachments.size()) {
+               pPreserveAttachments = &m_preserveAttachments[0];
        }
 
        return *this;
 }
 
-SubpassDependency::SubpassDependency ( deUint32                                        _srcSubpass,
-                                                                               deUint32                                        _destSubpass,
-                                                                               vk::VkPipelineStageFlags        _srcStageMask,
-                                                                               vk::VkPipelineStageFlags        _destStageMask,
-                                                                               vk::VkMemoryOutputFlags         _outputMask,
-                                                                               vk::VkMemoryInputFlags          _inputMask,
-                                                                               vk::VkBool32                            _byRegion)
+SubpassDependency::SubpassDependency (deUint32                                 _srcSubpass,
+                                                                         deUint32                                      _dstSubpass,
+                                                                         vk::VkPipelineStageFlags      _srcStageMask,
+                                                                         vk::VkPipelineStageFlags      _dstStageMask,
+                                                                         vk::VkAccessFlags                     _srcAccessMask,
+                                                                         vk::VkAccessFlags                     _dstAccessMask,
+                                                                         vk::VkDependencyFlags         _dependencyFlags)
 {
-
-       sType = vk::VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY;
-       pNext = DE_NULL;
        srcSubpass              = _srcSubpass;
-       destSubpass             = _destSubpass;
+       dstSubpass              = _dstSubpass;
        srcStageMask    = _srcStageMask;
-       destStageMask   = _destStageMask;
-       outputMask              = _outputMask;
-       inputMask               = _inputMask;
-       byRegion                = _byRegion;
+       dstStageMask    = _dstStageMask;
+       srcAccessMask   = _srcAccessMask;
+       dstAccessMask   = _dstAccessMask;
+       dependencyFlags = _dependencyFlags;
 }
 
 SubpassDependency::SubpassDependency (const vk::VkSubpassDependency &rhs)
 {
-
-       DE_ASSERT(rhs.sType == vk::VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY);
-       DE_ASSERT(rhs.pNext == DE_NULL);
-
-       sType = rhs.sType;
-       pNext = DE_NULL;
        srcSubpass              = rhs.srcSubpass;
-       destSubpass             = rhs.destSubpass;
+       dstSubpass              = rhs.dstSubpass;
        srcStageMask    = rhs.srcStageMask;
-       destStageMask   = rhs.destStageMask;
-       outputMask              = rhs.outputMask;
-       inputMask               = rhs.inputMask;
-       byRegion                = rhs.byRegion;
+       dstStageMask    = rhs.dstStageMask;
+       srcAccessMask   = rhs.srcAccessMask;
+       dstAccessMask   = rhs.dstAccessMask;
+       dependencyFlags = rhs.dependencyFlags;
 }
 
-CmdBufferBeginInfo::CmdBufferBeginInfo (vk::VkCmdBufferOptimizeFlags _flags)
+CmdBufferBeginInfo::CmdBufferBeginInfo (vk::VkCommandBufferUsageFlags _flags)
 {
-       sType = vk::VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO;
+       sType = vk::VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
        pNext = DE_NULL;
-       renderPass      = DE_NULL;
-       subpass         = 0;
-       framebuffer = DE_NULL;
-       flags           = _flags;
+       renderPass                              = DE_NULL;
+       subpass                                 = 0;
+       framebuffer                             = DE_NULL;
+       flags                                   = _flags;
+       occlusionQueryEnable    = false;
+       queryFlags                              = 0u;
+       pipelineStatistics              = 0u;
 }
 
-CmdBufferBeginInfo::CmdBufferBeginInfo (vk::VkRenderPass                               _renderPass,
-                                                                               deUint32                                                _subpass,
-                                                                               vk::VkFramebuffer                               _framebuffer,
-                                                                               vk::VkCmdBufferOptimizeFlags    _flags)
+CmdBufferBeginInfo::CmdBufferBeginInfo (vk::VkRenderPass                                       _renderPass,
+                                                                               deUint32                                                        _subpass,
+                                                                               vk::VkFramebuffer                                       _framebuffer,
+                                                                               vk::VkCommandBufferUsageFlags           _flags,
+                                                                               bool                                                            _occlusionQueryEnable,\r
+                                                                               vk::VkQueryControlFlags                         _queryFlags,\r
+                                                                               vk::VkQueryPipelineStatisticFlags       _pipelineStatistics)
 {
 
-       sType = vk::VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO;
+       sType = vk::VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
        pNext = DE_NULL;
-       renderPass      = _renderPass;
-       subpass         = _subpass;
-       framebuffer = _framebuffer;
-       flags           = _flags;
+       renderPass                              = _renderPass;
+       subpass                                 = _subpass;
+       framebuffer                             = _framebuffer;
+       flags                                   = _flags;
+       occlusionQueryEnable    = _occlusionQueryEnable;
+       queryFlags                              = _queryFlags;
+       pipelineStatistics              = _pipelineStatistics;
 }
 
-DescriptorPoolCreateInfo::DescriptorPoolCreateInfo (const      std::vector<vk::VkDescriptorTypeCount>& typeCounts,\r
-                                                                                                                       vk::VkDescriptorPoolUsage                               _poolUsage,\r
-                                                                                                                       deUint32                                                                _maxSets)
-       : m_typeCounts(typeCounts)
+DescriptorPoolCreateInfo::DescriptorPoolCreateInfo (const std::vector<vk::VkDescriptorPoolSize>&       poolSizeCounts,
+                                                                                                       vk::VkDescriptorPoolCreateFlags                                 _flags,
+                                                                                                       deUint32                                                                                _maxSets)
+       : m_poolSizeCounts(poolSizeCounts)
 {
        sType = vk::VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO;
        pNext = DE_NULL;
-       poolUsage       = _poolUsage;
-       maxSets         = _maxSets;
-       count           = static_cast<deUint32>(m_typeCounts.size());
-       pTypeCount      = &m_typeCounts[0];
+       flags                   = _flags;
+       maxSets                 = _maxSets;
+       poolSizeCount   = static_cast<deUint32>(m_poolSizeCounts.size());
+       pPoolSizes              = &m_poolSizeCounts[0];
 }
 
 DescriptorPoolCreateInfo& DescriptorPoolCreateInfo::addDescriptors (vk::VkDescriptorType type, deUint32 count)
 {
-       vk::VkDescriptorTypeCount typeCount = { type, count };
-       m_typeCounts.push_back(typeCount);
+       vk::VkDescriptorPoolSize descriptorTypeCount = { type, count };
+       m_poolSizeCounts.push_back(descriptorTypeCount);
 
-       count           = static_cast<deUint32>(m_typeCounts.size());
-       pTypeCount      = &m_typeCounts[0];
+       poolSizeCount   = static_cast<deUint32>(m_poolSizeCounts.size());
+       pPoolSizes              = &m_poolSizeCounts[0];
 
        return *this;
 }
 
-DescriptorSetLayoutCreateInfo::DescriptorSetLayoutCreateInfo (deUint32 _count, const vk::VkDescriptorSetLayoutBinding* _pBinding)
+DescriptorSetLayoutCreateInfo::DescriptorSetLayoutCreateInfo (deUint32 _bindingCount, const vk::VkDescriptorSetLayoutBinding* _pBindings)
 {
        sType = vk::VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO;
        pNext = DE_NULL;
-       count = _count;
-       pBinding = _pBinding;
+       flags = 0;
+       bindingCount = _bindingCount;
+       pBinding         = _pBindings;
 }
 
 
 PipelineLayoutCreateInfo::PipelineLayoutCreateInfo (deUint32                                                   _descriptorSetCount,
-                                                                                                       const   vk::VkDescriptorSetLayout*      _pSetLayouts,
-                                                                                                                       deUint32                                        _pushConstantRangeCount,
-                                                                                                       const   vk::VkPushConstantRange*        _pPushConstantRanges)
+                                                                                                       const vk::VkDescriptorSetLayout*        _pSetLayouts,
+                                                                                                       deUint32                                                        _pushConstantRangeCount,
+                                                                                                       const vk::VkPushConstantRange*          _pPushConstantRanges)
        : m_pushConstantRanges(_pPushConstantRanges, _pPushConstantRanges + _pushConstantRangeCount)
 {
        for (unsigned int i = 0; i < _descriptorSetCount; i++)
@@ -713,8 +694,8 @@ PipelineLayoutCreateInfo::PipelineLayoutCreateInfo (deUint32                                                        _descriptorSe
 
        sType = vk::VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
        pNext = DE_NULL;
-       descriptorSetCount              = static_cast<deUint32>(m_setLayouts.size());
-       pSetLayouts                             = descriptorSetCount > 0 ? &m_setLayouts[0] : DE_NULL;
+       setLayoutCount                  = static_cast<deUint32>(m_setLayouts.size());
+       pSetLayouts                             = setLayoutCount > 0 ? &m_setLayouts[0] : DE_NULL;
        pushConstantRangeCount  = static_cast<deUint32>(m_pushConstantRanges.size());
 
        if (m_pushConstantRanges.size()) {
@@ -726,18 +707,18 @@ PipelineLayoutCreateInfo::PipelineLayoutCreateInfo (deUint32                                                      _descriptorSe
        }
 }
 
-PipelineLayoutCreateInfo::PipelineLayoutCreateInfo (   const   std::vector<vk::VkDescriptorSetLayout>& setLayouts,
-                                                                                                                               deUint32                                                                _pushConstantRangeCount,
-                                                                                                               const   vk::VkPushConstantRange*                                _pPushConstantRanges)
+PipelineLayoutCreateInfo::PipelineLayoutCreateInfo (const std::vector<vk::VkDescriptorSetLayout>&      setLayouts,
+                                                                                                       deUint32                                                                                _pushConstantRangeCount,
+                                                                                                       const vk::VkPushConstantRange*                                  _pPushConstantRanges)
        : m_setLayouts                  (setLayouts)
        , m_pushConstantRanges  (_pPushConstantRanges, _pPushConstantRanges + _pushConstantRangeCount)
 {
        sType = vk::VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
        pNext = DE_NULL;
 
-       descriptorSetCount = static_cast<deUint32>(m_setLayouts.size());
+       setLayoutCount = static_cast<deUint32>(m_setLayouts.size());
 
-       if (descriptorSetCount)
+       if (setLayoutCount)
        {
                pSetLayouts = &m_setLayouts[0];
        }
@@ -757,33 +738,37 @@ PipelineLayoutCreateInfo::PipelineLayoutCreateInfo (      const   std::vector<vk::VkDes
 }
 
 
-PipelineCreateInfo::PipelineShaderStage::PipelineShaderStage (vk::VkShader _shader, vk::VkShaderStage _stage)
+PipelineCreateInfo::PipelineShaderStage::PipelineShaderStage (vk::VkShaderModule _module, const char* _pName, vk::VkShaderStageFlagBits _stage)
 {
        sType = vk::VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
        pNext = DE_NULL;
+       flags = 0u;
        stage                           = _stage;
-       shader                          = _shader;
+       module                          = _module;
+       pName                           = _pName;
        pSpecializationInfo = DE_NULL;
 }
 
-PipelineCreateInfo::VertexInputState::VertexInputState (               deUint32                                                                _bindingCount,
-                                                                                                               const   vk::VkVertexInputBindingDescription*    _pVertexBindingDescriptions,
-                                                                                                                               deUint32                                                                _attributeCount,
-                                                                                                               const   vk::VkVertexInputAttributeDescription*  _pVertexAttributeDescriptions)
+PipelineCreateInfo::VertexInputState::VertexInputState (deUint32                                                                               _vertexBindingDescriptionCount,
+                                                                                                               const vk::VkVertexInputBindingDescription*              _pVertexBindingDescriptions,
+                                                                                                               deUint32                                                                                _vertexAttributeDescriptionCount,
+                                                                                                               const vk::VkVertexInputAttributeDescription*    _pVertexAttributeDescriptions)
 {
        sType = vk::VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO;
        pNext = DE_NULL;
-       bindingCount                                    = _bindingCount;
+       flags                                                   = 0u;
+       vertexBindingDescriptionCount   = _vertexBindingDescriptionCount;
        pVertexBindingDescriptions              = _pVertexBindingDescriptions;
-       attributeCount                                  = _attributeCount;
+       vertexAttributeDescriptionCount = _vertexAttributeDescriptionCount;
        pVertexAttributeDescriptions    = _pVertexAttributeDescriptions;
 }
 
-PipelineCreateInfo::InputAssemblerState::InputAssemblerState ( vk::VkPrimitiveTopology _topology,
-                                                                                                                               vk::VkBool32                    _primitiveRestartEnable)
+PipelineCreateInfo::InputAssemblerState::InputAssemblerState (vk::VkPrimitiveTopology  _topology,
+                                                                                                                         vk::VkBool32                          _primitiveRestartEnable)
 {
        sType = vk::VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO;
        pNext = DE_NULL;
+       flags                                   = 0u;
        topology                                = _topology;
        primitiveRestartEnable  = _primitiveRestartEnable;
 }
@@ -795,171 +780,169 @@ PipelineCreateInfo::TesselationState::TesselationState (deUint32 _patchControlPo
        patchControlPoints = _patchControlPoints;
 }
 
-PipelineCreateInfo::ViewportState::ViewportState (     deUint32                                        _viewportCount,
-                                                                                                       std::vector<vk::VkViewport> _viewports,
-                                                                                                       std::vector<vk::VkRect2D>       _scissors)
+PipelineCreateInfo::ViewportState::ViewportState (deUint32                                             _viewportCount,
+                                                                                                 std::vector<vk::VkViewport>   _viewports,
+                                                                                                 std::vector<vk::VkRect2D>             _scissors)
 {
        sType = vk::VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO;
        pNext = DE_NULL;
-       viewportCount   = _viewportCount;\r
-       scissorCount    = _viewportCount;\r
-       \r
-       if (!_viewports.size())\r
-       {\r
-               m_viewports.resize(viewportCount);\r
-               deMemset(&m_viewports[0], 0, sizeof(m_viewports[0]) * m_viewports.size());\r
-       }\r
-       else\r
-       {\r
-               m_viewports = _viewports;\r
-       }\r
-\r
-       if (!_scissors.size())\r
-       {\r
-               m_scissors.resize(scissorCount);\r
-               deMemset(&m_scissors[0], 0, sizeof(m_scissors[0]) * m_scissors.size());\r
-       }\r
-       else\r
-       {\r
-               m_scissors = _scissors;\r
-       }\r
-\r
-       pViewports      = &m_viewports[0];\r
+       flags                   = 0u;
+       viewportCount   = _viewportCount;
+       scissorCount    = _viewportCount;
+       
+       if (!_viewports.size())
+       {
+               m_viewports.resize(viewportCount);
+               deMemset(&m_viewports[0], 0, sizeof(m_viewports[0]) * m_viewports.size());
+       }
+       else
+       {
+               m_viewports = _viewports;
+       }
+
+       if (!_scissors.size())
+       {
+               m_scissors.resize(scissorCount);
+               deMemset(&m_scissors[0], 0, sizeof(m_scissors[0]) * m_scissors.size());
+       }
+       else
+       {
+               m_scissors = _scissors;
+       }
+
+       pViewports      = &m_viewports[0];
        pScissors       = &m_scissors[0];
 }
 
 PipelineCreateInfo::ViewportState::ViewportState (const ViewportState &other)
 {
-       sType                   = other.sType;\r
+       sType                   = other.sType;
        pNext                   = other.pNext;
-       viewportCount   = other.viewportCount;\r
+       viewportCount   = other.viewportCount;
        scissorCount    = other.scissorCount;
 
        m_viewports = std::vector<vk::VkViewport>(other.pViewports, other.pViewports + viewportCount);
        m_scissors      = std::vector<vk::VkRect2D>(other.pScissors, other.pScissors + scissorCount);
 
-       pViewports      = &m_viewports[0];\r
+       pViewports      = &m_viewports[0];
        pScissors       = &m_scissors[0];
 }
 
 PipelineCreateInfo::ViewportState & PipelineCreateInfo::ViewportState::operator= (const ViewportState &other)
 {
-       sType                   = other.sType;\r
+       sType                   = other.sType;
        pNext                   = other.pNext;
-       viewportCount   = other.viewportCount;\r
+       viewportCount   = other.viewportCount;
        scissorCount    = other.scissorCount;
 
        m_viewports             = std::vector<vk::VkViewport>(other.pViewports, other.pViewports + scissorCount);
        m_scissors              = std::vector<vk::VkRect2D>(other.pScissors, other.pScissors + scissorCount);
 
-       pViewports              = &m_viewports[0];\r
+       pViewports              = &m_viewports[0];
        pScissors               = &m_scissors[0];
        return *this;
 }
 
-PipelineCreateInfo::RasterizerState::RasterizerState ( vk::VkBool32    _depthClipEnable,
-                                                                                                               vk::VkBool32    _rasterizerDiscardEnable,
-                                                                                                               vk::VkFillMode  _fillMode,
-                                                                                                               vk::VkCullMode  _cullMode,
-                                                                                                               vk::VkFrontFace _frontFace,
-                                                                                                               vk::VkBool32    _depthBiasEnable,\r
-                                                                                                               float                   _depthBias,
-                                                                                                               float                   _depthBiasClamp,
-                                                                                                               float                   _slopeScaledDepthBias,
-                                                                                                               float                   _lineWidth)
+PipelineCreateInfo::RasterizerState::RasterizerState (vk::VkBool32                     _depthClampEnable,
+                                                                                                         vk::VkBool32                  _rasterizerDiscardEnable,
+                                                                                                         vk::VkPolygonMode             _polygonMode,
+                                                                                                         vk::VkCullModeFlags   _cullMode,
+                                                                                                         vk::VkFrontFace               _frontFace,
+                                                                                                         vk::VkBool32                  _depthBiasEnable,
+                                                                                                         float                                 _depthBiasConstantFactor,
+                                                                                                         float                                 _depthBiasClamp,
+                                                                                                         float                                 _depthBiasSlopeFactor,
+                                                                                                         float                                 _lineWidth)
 {
-       sType = vk::VK_STRUCTURE_TYPE_PIPELINE_RASTER_STATE_CREATE_INFO;
+       sType = vk::VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO;
        pNext = DE_NULL;
-       depthClipEnable                 = _depthClipEnable;
+       flags                                   = 0u;
+       depthClampEnable                = _depthClampEnable;
        rasterizerDiscardEnable = _rasterizerDiscardEnable;
-       fillMode                                = _fillMode;
+       polygonMode                             = _polygonMode;
        cullMode                                = _cullMode;
        frontFace                               = _frontFace;
 
-       depthBiasEnable                 = _depthBiasEnable;\r
-       depthBias                               = _depthBias;
+       depthBiasEnable                 = _depthBiasEnable;
+       depthBiasConstantFactor = _depthBiasConstantFactor;
        depthBiasClamp                  = _depthBiasClamp;
-       slopeScaledDepthBias    = _slopeScaledDepthBias;
+       depthBiasSlopeFactor    = _depthBiasSlopeFactor;
        lineWidth                               = _lineWidth;
 }
 
-PipelineCreateInfo::MultiSampleState::MultiSampleState (               deUint32                                                _rasterSamples,
-                                                                                                                               vk::VkBool32                                    _sampleShadingEnable,
-                                                                                                                               float                                                   _minSampleShading,
-                                                                                                               const   std::vector<vk::VkSampleMask>&  _sampleMask)
+PipelineCreateInfo::MultiSampleState::MultiSampleState (vk::VkSampleCountFlagBits                              _rasterizationSamples,
+                                                                                                               vk::VkBool32                                                    _sampleShadingEnable,
+                                                                                                               float                                                                   _minSampleShading,
+                                                                                                               const std::vector<vk::VkSampleMask>&    _sampleMask,
+                                                                                                               bool                                                                    _alphaToCoverageEnable, 
+                                                                                                               bool                                                                    _alphaToOneEnable)
        : m_sampleMask(_sampleMask)
 {
        sType = vk::VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO;
        pNext = DE_NULL;
-       rasterSamples           = _rasterSamples;
-       sampleShadingEnable = _sampleShadingEnable;
-       minSampleShading        = _minSampleShading;
-       pSampleMask                     = &m_sampleMask[0];
+       flags                                   = 0u;
+       rasterizationSamples    = _rasterizationSamples;
+       sampleShadingEnable             = _sampleShadingEnable;
+       minSampleShading                = _minSampleShading;
+       pSampleMask                             = &m_sampleMask[0];
+       alphaToCoverageEnable   = _alphaToCoverageEnable;
+       alphaToOneEnable                = _alphaToOneEnable;
 }
 
 PipelineCreateInfo::MultiSampleState::MultiSampleState (const MultiSampleState &other)
 {
-       sType                           = other.sType;\r
-       pNext                           = other.pNext;\r
-       rasterSamples           = other.rasterSamples;\r
-       sampleShadingEnable     = other.sampleShadingEnable;\r
-       minSampleShading        = other.minSampleShading;\r
-       \r
-       const size_t sampleMaskArrayLen = (sizeof(vk::VkSampleMask) * 8 + other.rasterSamples) / (sizeof(vk::VkSampleMask) * 8);
+       sType                                   = other.sType;
+       pNext                                   = other.pNext;
+       rasterizationSamples    = other.rasterizationSamples;
+       sampleShadingEnable             = other.sampleShadingEnable;
+       minSampleShading                = other.minSampleShading;
+       
+       const size_t sampleMaskArrayLen = (sizeof(vk::VkSampleMask) * 8 + other.rasterizationSamples) / (sizeof(vk::VkSampleMask) * 8);
 
-       m_sampleMask    = std::vector<vk::VkSampleMask>(other.pSampleMask, other.pSampleMask + sampleMaskArrayLen);\r
+       m_sampleMask    = std::vector<vk::VkSampleMask>(other.pSampleMask, other.pSampleMask + sampleMaskArrayLen);
        pSampleMask             = &m_sampleMask[0];
 }
 
 PipelineCreateInfo::MultiSampleState& PipelineCreateInfo::MultiSampleState::operator= (const MultiSampleState & other)
 {
-       sType = other.sType;\r
-       pNext = other.pNext;\r
-       rasterSamples           = other.rasterSamples;\r
-       sampleShadingEnable = other.sampleShadingEnable;\r
-       minSampleShading        = other.minSampleShading;\r
-\r
-       const size_t sampleMaskArrayLen = (sizeof(vk::VkSampleMask) * 8 + other.rasterSamples) / (sizeof(vk::VkSampleMask) * 8);
+       sType = other.sType;
+       pNext = other.pNext;
+       rasterizationSamples    = other.rasterizationSamples;
+       sampleShadingEnable             = other.sampleShadingEnable;
+       minSampleShading                = other.minSampleShading;
 
-       m_sampleMask    = std::vector<vk::VkSampleMask>(other.pSampleMask, other.pSampleMask + sampleMaskArrayLen);\r
+       const size_t sampleMaskArrayLen = (sizeof(vk::VkSampleMask) * 8 + other.rasterizationSamples) / (sizeof(vk::VkSampleMask) * 8);
+
+       m_sampleMask    = std::vector<vk::VkSampleMask>(other.pSampleMask, other.pSampleMask + sampleMaskArrayLen);
        pSampleMask             = &m_sampleMask[0];
 
        return *this;
 }
 
-PipelineCreateInfo::ColorBlendState::ColorBlendState ( const   std::vector<vk::VkPipelineColorBlendAttachmentState>&   _attachments,
-                                                                                                                               vk::VkBool32                                                                                    _alphaToCoverageEnable,
-                                                                                                                               vk::VkBool32                                                                                    _logicOpEnable,
-                                                                                                                               vk::VkLogicOp                                                                                   _logicOp,
-                                                                                                                               vk::VkBool32                                                                                    _alphaToOneEnable)
+PipelineCreateInfo::ColorBlendState::ColorBlendState (const std::vector<vk::VkPipelineColorBlendAttachmentState>&      _attachments,
+                                                                                                         vk::VkBool32                                                                                                  _logicOpEnable,
+                                                                                                         vk::VkLogicOp                                                                                                 _logicOp)
        : m_attachments(_attachments)
 {
        sType = vk::VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO;
        pNext = DE_NULL; 
-       alphaToCoverageEnable   = _alphaToCoverageEnable;
-       alphaToOneEnable                = _alphaToOneEnable;
+       flags                                   = 0u;
        logicOpEnable                   = _logicOpEnable;
        logicOp                                 = _logicOp;
        attachmentCount                 = static_cast<deUint32>(m_attachments.size());
        pAttachments                    = &m_attachments[0];
 }
 
-PipelineCreateInfo::ColorBlendState::ColorBlendState (                 deUint32                                                                        _attachmentCount,
-                                                                                                               const   vk::VkPipelineColorBlendAttachmentState*        _attachments,
-                                                                                                                               vk::VkBool32                                                            _alphaToCoverageEnable,
-                                                                                                                               vk::VkBool32                                                            _logicOpEnable,
-                                                                                                                               vk::VkLogicOp                                                           _logicOp,
-                                                                                                                               vk::VkBool32                                                            _alphaToOneEnable)
+PipelineCreateInfo::ColorBlendState::ColorBlendState (deUint32                                                                                 _attachmentCount,
+                                                                                                         const vk::VkPipelineColorBlendAttachmentState*        _attachments,
+                                                                                                         vk::VkBool32                                                                          _logicOpEnable,
+                                                                                                         vk::VkLogicOp                                                                         _logicOp)
        : m_attachments(_attachments, _attachments + _attachmentCount)
 {
        sType = vk::VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO;
        pNext   = DE_NULL; 
-       alphaToCoverageEnable   = _alphaToCoverageEnable;
-       alphaToOneEnable                = _alphaToOneEnable;
-
        logicOpEnable                   = _logicOpEnable;
        logicOp                                 = _logicOp;
-       attachmentCount                 = _attachmentCount;
        attachmentCount                 = static_cast<deUint32>(m_attachments.size());
        pAttachments                    = &m_attachments[0];
 }
@@ -969,75 +952,74 @@ PipelineCreateInfo::ColorBlendState::ColorBlendState (const vk::VkPipelineColorB
 {
        sType = createInfo.sType;
        pNext = createInfo.pNext;
-       alphaToCoverageEnable   = createInfo.alphaToCoverageEnable;
        logicOpEnable                   = createInfo.logicOpEnable;
        logicOp                                 = createInfo.logicOp;
        attachmentCount                 = static_cast<deUint32>(m_attachments.size());
        pAttachments                    = &m_attachments[0];
 }
 
-PipelineCreateInfo::ColorBlendState::ColorBlendState (const ColorBlendState &createInfo, std::vector<float> _blendConst)
+PipelineCreateInfo::ColorBlendState::ColorBlendState (const ColorBlendState &createInfo, std::vector<float> _blendConstants)
        : m_attachments (createInfo.pAttachments, createInfo.pAttachments + createInfo.attachmentCount)
 {
        sType = createInfo.sType;
        pNext = createInfo.pNext;
-       alphaToCoverageEnable   = createInfo.alphaToCoverageEnable;
        logicOpEnable                   = createInfo.logicOpEnable;
        logicOp                                 = createInfo.logicOp;
        attachmentCount                 = static_cast<deUint32>(m_attachments.size());
        pAttachments                    = &m_attachments[0];
-       deMemcpy(blendConst, &_blendConst[0], 4 * sizeof(float));
+       deMemcpy(blendConstants, &_blendConstants[0], 4 * sizeof(float));
 }
 
-PipelineCreateInfo::ColorBlendState::Attachment::Attachment (  vk::VkBool32    _blendEnable,
-                                                                                                                               vk::VkBlend             _srcBlendColor,
-                                                                                                                               vk::VkBlend             _destBlendColor,
-                                                                                                                               vk::VkBlendOp   _blendOpColor,
-                                                                                                                               vk::VkBlend             _srcBlendAlpha,
-                                                                                                                               vk::VkBlend             _destBlendAlpha,
-                                                                                                                               vk::VkBlendOp   _blendOpAlpha,
-                                                                                                                               deUint8                 _channelWriteMask)
+PipelineCreateInfo::ColorBlendState::Attachment::Attachment (vk::VkBool32              _blendEnable,
+                                                                                                                        vk::VkBlendFactor      _srcColorBlendFactor,
+                                                                                                                        vk::VkBlendFactor      _dstColorBlendFactor,
+                                                                                                                        vk::VkBlendOp          _colorBlendOp,
+                                                                                                                        vk::VkBlendFactor      _srcAlphaBlendFactor,
+                                                                                                                        vk::VkBlendFactor      _dstAlphaBlendFactor,
+                                                                                                                        vk::VkBlendOp          _alphaBlendOp,
+                                                                                                                        deUint8                        _colorWriteMask)
 {
        blendEnable                     = _blendEnable;
-       srcBlendColor           = _srcBlendColor;
-       destBlendColor          = _destBlendColor;
-       blendOpColor            = _blendOpColor;
-       srcBlendAlpha           = _srcBlendAlpha;
-       destBlendAlpha          = _destBlendAlpha;
-       blendOpAlpha            = _blendOpAlpha;
-       channelWriteMask        = _channelWriteMask;
-}
-
-PipelineCreateInfo::DepthStencilState::StencilOpState::StencilOpState (        vk::VkStencilOp _stencilFailOp,
-                                                                                                                                               vk::VkStencilOp _stencilPassOp,
-                                                                                                                                               vk::VkStencilOp _stencilDepthFailOp,
-                                                                                                                                               vk::VkCompareOp _stencilCompareOp,
-                                                                                                                                               deUint32                _stencilCompareMask,\r
-                                                                                                                                               deUint32                _stencilWriteMask,\r
-                                                                                                                                               deUint32                _stencilReference)
-{
-       stencilFailOp           = _stencilFailOp;
-       stencilPassOp           = _stencilPassOp;
-       stencilDepthFailOp      = _stencilDepthFailOp;
-       stencilCompareOp        = _stencilCompareOp;
-\r
-       stencilCompareMask      = _stencilCompareMask;
-       stencilWriteMask        = _stencilWriteMask;
-       stencilReference        = _stencilReference;
-}
-
-PipelineCreateInfo::DepthStencilState::DepthStencilState (vk::VkBool32 _depthTestEnable,
-       vk::VkBool32 _depthWriteEnable,
-       vk::VkCompareOp _depthCompareOp,
-       vk::VkBool32 _depthBoundsTestEnable,
-       vk::VkBool32 _stencilTestEnable,
-       StencilOpState _front,
-       StencilOpState _back,
-       float _minDepthBounds,
-       float _maxDepthBounds)
+       srcColorBlendFactor     = _srcColorBlendFactor;
+       dstColorBlendFactor     = _dstColorBlendFactor;
+       colorBlendOp            = _colorBlendOp;
+       srcAlphaBlendFactor     = _srcAlphaBlendFactor;
+       dstAlphaBlendFactor     = _dstAlphaBlendFactor;
+       alphaBlendOp            = _alphaBlendOp;
+       colorWriteMask  = _colorWriteMask;
+}
+
+PipelineCreateInfo::DepthStencilState::StencilOpState::StencilOpState (vk::VkStencilOp _failOp,
+                                                                                                                                          vk::VkStencilOp      _passOp,
+                                                                                                                                          vk::VkStencilOp      _depthFailOp,
+                                                                                                                                          vk::VkCompareOp      _compareOp,
+                                                                                                                                          deUint32                     _compareMask,
+                                                                                                                                          deUint32                     _writeMask,
+                                                                                                                                          deUint32                     _reference)
+{
+       failOp          = _failOp;
+       passOp          = _passOp;
+       depthFailOp     = _depthFailOp;
+       compareOp       = _compareOp;
+
+       compareMask     = _compareMask;
+       writeMask       = _writeMask;
+       reference       = _reference;
+}
+
+PipelineCreateInfo::DepthStencilState::DepthStencilState (vk::VkBool32         _depthTestEnable,
+                                                                                                                 vk::VkBool32          _depthWriteEnable,
+                                                                                                                 vk::VkCompareOp       _depthCompareOp,
+                                                                                                                 vk::VkBool32          _depthBoundsTestEnable,
+                                                                                                                 vk::VkBool32          _stencilTestEnable,
+                                                                                                                 StencilOpState        _front,
+                                                                                                                 StencilOpState        _back,
+                                                                                                                 float                         _minDepthBounds,
+                                                                                                                 float                         _maxDepthBounds)
 {
        sType = vk::VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO;
        pNext = DE_NULL;
+       flags                                   = 0u;
        depthTestEnable                 = _depthTestEnable;
        depthWriteEnable                = _depthWriteEnable;
        depthCompareOp                  = _depthCompareOp;
@@ -1071,7 +1053,7 @@ PipelineCreateInfo::DynamicState::DynamicState (const std::vector<vk::VkDynamicS
 
 PipelineCreateInfo::DynamicState::DynamicState (const DynamicState &other)
 {
-       sType = other.sType;\r
+       sType = other.sType;
        pNext = other.pNext;
 
        dynamicStateCount = other.dynamicStateCount;
@@ -1082,7 +1064,7 @@ PipelineCreateInfo::DynamicState::DynamicState (const DynamicState &other)
 
 PipelineCreateInfo::DynamicState & PipelineCreateInfo::DynamicState::operator= (const DynamicState &other)
 {
-       sType = other.sType;\r
+       sType = other.sType;
        pNext = other.pNext;
 
        dynamicStateCount = other.dynamicStateCount;
@@ -1098,15 +1080,14 @@ PipelineCreateInfo::PipelineCreateInfo (vk::VkPipelineLayout            _layout,
                                                                                int                                                     _subpass,
                                                                                vk::VkPipelineCreateFlags       _flags)
 {
-       memset(static_cast<vk::VkGraphicsPipelineCreateInfo *>(this), 0,
+       deMemset(static_cast<vk::VkGraphicsPipelineCreateInfo *>(this), 0,
                sizeof(vk::VkGraphicsPipelineCreateInfo));
 
        sType = vk::VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO;
        pNext = DE_NULL;
+       flags                           = _flags;
        renderPass                      = _renderPass;
        subpass                         = _subpass;
-
-       flags                           = _flags;
        layout                          = _layout;
        basePipelineHandle      = DE_NULL;
        basePipelineIndex       = 0;
@@ -1125,79 +1106,61 @@ PipelineCreateInfo& PipelineCreateInfo::addShader (const vk::VkPipelineShaderSta
 
 PipelineCreateInfo& PipelineCreateInfo::addState (const vk::VkPipelineVertexInputStateCreateInfo& state)
 {
-       m_vertexInputState = de::SharedPtr<vk::VkPipelineVertexInputStateCreateInfo>(
-               new vk::VkPipelineVertexInputStateCreateInfo(state));
-
-       pVertexInputState = m_vertexInputState.get();
+       m_vertexInputState      = state;
+       pVertexInputState       = &m_vertexInputState;
 
        return *this;
 }
 
 PipelineCreateInfo& PipelineCreateInfo::addState (const vk::VkPipelineInputAssemblyStateCreateInfo& state)
 {
-       m_iputAssemblyState = de::SharedPtr<vk::VkPipelineInputAssemblyStateCreateInfo>(
-               new vk::VkPipelineInputAssemblyStateCreateInfo(state));
-
-       pInputAssemblyState = m_iputAssemblyState.get();
+       m_inputAssemblyState = state;
+       pInputAssemblyState = &m_inputAssemblyState;
 
        return *this;
 }
 
 PipelineCreateInfo& PipelineCreateInfo::addState (const vk::VkPipelineColorBlendStateCreateInfo& state)
 {
-       m_colorBlendStateAttachments = std::vector<vk::VkPipelineColorBlendAttachmentState>(
-               state.pAttachments, state.pAttachments + state.attachmentCount);
-
-       m_colorBlendState = de::SharedPtr<vk::VkPipelineColorBlendStateCreateInfo>(
-               new vk::VkPipelineColorBlendStateCreateInfo(state));
-
-       m_colorBlendState->pAttachments = &m_colorBlendStateAttachments[0];
-
-       pColorBlendState = m_colorBlendState.get();
+       m_colorBlendStateAttachments    = std::vector<vk::VkPipelineColorBlendAttachmentState>(state.pAttachments, state.pAttachments + state.attachmentCount);
+       m_colorBlendState                               = state;
+       m_colorBlendState.pAttachments  = &m_colorBlendStateAttachments[0];
+       pColorBlendState                                = &m_colorBlendState;
 
        return *this;
 }
 
 PipelineCreateInfo& PipelineCreateInfo::addState (const vk::VkPipelineViewportStateCreateInfo& state)
 {
-       m_viewports = std::vector<vk::VkViewport>(state.pViewports, state.pViewports + state.viewportCount);
-       m_scissors      = std::vector<vk::VkRect2D>(state.pScissors, state.pScissors + state.scissorCount);
-
-       m_viewportState = de::SharedPtr<vk::VkPipelineViewportStateCreateInfo>(
-               new vk::VkPipelineViewportStateCreateInfo(state));
-
-       m_viewportState->pViewports = &m_viewports[0];
-       m_viewportState->pScissors      = &m_scissors[0];
-
-       pViewportState = m_viewportState.get();
+       m_viewports                                     = std::vector<vk::VkViewport>(state.pViewports, state.pViewports + state.viewportCount);
+       m_scissors                                      = std::vector<vk::VkRect2D>(state.pScissors, state.pScissors + state.scissorCount);
+       m_viewportState                         = state;
+       m_viewportState.pViewports      = &m_viewports[0];
+       m_viewportState.pScissors       = &m_scissors[0];
+       pViewportState                          = &m_viewportState;
 
        return *this;
 }
 
 PipelineCreateInfo& PipelineCreateInfo::addState (const vk::VkPipelineDepthStencilStateCreateInfo& state)
 {
-       m_dynamicDepthStencilState = de::SharedPtr<vk::VkPipelineDepthStencilStateCreateInfo>(
-               new vk::VkPipelineDepthStencilStateCreateInfo(state));
-
-       pDepthStencilState = m_dynamicDepthStencilState.get();
-
+       m_dynamicDepthStencilState      = state;
+       pDepthStencilState                      = &m_dynamicDepthStencilState;
        return *this;
 }
 
 PipelineCreateInfo& PipelineCreateInfo::addState (const vk::VkPipelineTessellationStateCreateInfo& state)
 {
-       m_tessState = de::SharedPtr<vk::VkPipelineTessellationStateCreateInfo>(
-               new vk::VkPipelineTessellationStateCreateInfo(state));
-
-       pTessellationState = m_tessState.get();
+       m_tessState                     = state;
+       pTessellationState      = &m_tessState;
 
        return *this;
 }
 
-PipelineCreateInfo& PipelineCreateInfo::addState (const vk::VkPipelineRasterStateCreateInfo& state)
+PipelineCreateInfo& PipelineCreateInfo::addState (const vk::VkPipelineRasterizationStateCreateInfo& state)
 {
-       m_rasterState   = de::SharedPtr<vk::VkPipelineRasterStateCreateInfo>(new vk::VkPipelineRasterStateCreateInfo(state));
-       pRasterState    = m_rasterState.get();
+       m_rasterState           = state;
+       pRasterizationState     = &m_rasterState;
 
        return *this;
 }
@@ -1205,49 +1168,45 @@ PipelineCreateInfo& PipelineCreateInfo::addState (const vk::VkPipelineRasterStat
 PipelineCreateInfo& PipelineCreateInfo::addState (const vk::VkPipelineMultisampleStateCreateInfo& state)
 {
 
-       const size_t sampleMaskArrayLen = (sizeof(vk::VkSampleMask) * 8 + state.rasterSamples) / ( sizeof(vk::VkSampleMask) * 8 );
+       const size_t sampleMaskArrayLen = (sizeof(vk::VkSampleMask) * 8 + state.rasterizationSamples) / ( sizeof(vk::VkSampleMask) * 8 );
        m_multisampleStateSampleMask    = std::vector<vk::VkSampleMask>(state.pSampleMask, state.pSampleMask + sampleMaskArrayLen);
-
-       m_multisampleState = de::SharedPtr<vk::VkPipelineMultisampleStateCreateInfo>(new vk::VkPipelineMultisampleStateCreateInfo(state));
-
-       m_multisampleState->pSampleMask = &m_multisampleStateSampleMask[0];
-       
-       pMultisampleState = m_multisampleState.get();
+       m_multisampleState                              = state;
+       m_multisampleState.pSampleMask  = &m_multisampleStateSampleMask[0];
+       pMultisampleState                               = &m_multisampleState;
 
        return *this;
 }
 PipelineCreateInfo& PipelineCreateInfo::addState (const vk::VkPipelineDynamicStateCreateInfo& state)
 {
-       m_dynamicStates = std::vector<vk::VkDynamicState>(state.pDynamicStates, state.pDynamicStates + state.dynamicStateCount);
-       m_dynamicState  = de::SharedPtr<vk::VkPipelineDynamicStateCreateInfo>(new vk::VkPipelineDynamicStateCreateInfo(state));
-
-       m_dynamicState->pDynamicStates = &m_dynamicStates[0];
-
-       pDynamicState = m_dynamicState.get();
+       m_dynamicStates                                 = std::vector<vk::VkDynamicState>(state.pDynamicStates, state.pDynamicStates + state.dynamicStateCount);
+       m_dynamicState                                  = state;
+       m_dynamicState.pDynamicStates   = &m_dynamicStates[0];
+       pDynamicState                                   = &m_dynamicState;
 
        return *this;
 }
 
-SamplerCreateInfo::SamplerCreateInfo ( vk::VkTexFilter                 _magFilter,
-                                                                               vk::VkTexFilter                 _minFilter,
-                                                                               vk::VkTexMipmapMode             _mipMode,
-                                                                               vk::VkTexAddressMode    _addressModeU,
-                                                                               vk::VkTexAddressMode    _addressModeV,
-                                                                               vk::VkTexAddressMode    _addressModeW,
-                                                                               float                                   _mipLodBias,
-                                                                               float                                   _maxAnisotropy,
-                                                                               vk::VkBool32                    _compareEnable,
-                                                                               vk::VkCompareOp                 _compareOp,
-                                                                               float                                   _minLod,
-                                                                               float                                   _maxLod,
-                                                                               vk::VkBorderColor               _borderColor,
-                                                                               vk::VkBool32                    _unnormalizedCoordinates)
+SamplerCreateInfo::SamplerCreateInfo (vk::VkFilter                             _magFilter,
+                                                                        vk::VkFilter                           _minFilter,
+                                                                        vk::VkSamplerMipmapMode        _mipmapMode,
+                                                                        vk::VkSamplerAddressMode       _addressModeU,
+                                                                        vk::VkSamplerAddressMode       _addressModeV,
+                                                                        vk::VkSamplerAddressMode       _addressModeW,
+                                                                        float                                          _mipLodBias,
+                                                                        float                                          _maxAnisotropy,
+                                                                        vk::VkBool32                           _compareEnable,
+                                                                        vk::VkCompareOp                        _compareOp,
+                                                                        float                                          _minLod,
+                                                                        float                                          _maxLod,
+                                                                        vk::VkBorderColor                      _borderColor,
+                                                                        vk::VkBool32                           _unnormalizedCoordinates)
 {
        sType                                   = vk::VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO;
        pNext                                   = DE_NULL;
+       flags                                   = 0u;
        magFilter                               = _magFilter;
        minFilter                               = _minFilter;
-       mipMode                                 = _mipMode;
+       mipmapMode                              = _mipmapMode;
        addressModeU                    = _addressModeU;
        addressModeV                    = _addressModeV;
        addressModeW                    = _addressModeW;
@@ -1260,6 +1219,5 @@ SamplerCreateInfo::SamplerCreateInfo (    vk::VkTexFilter                 _magFilter,
        borderColor                             = _borderColor;
        unnormalizedCoordinates = _unnormalizedCoordinates;
 }
-
 } // DynamicState
 } // vkt
@@ -52,18 +52,18 @@ class ImageSubresourceRange : public vk::VkImageSubresourceRange
 public:
        ImageSubresourceRange ( vk::VkImageAspectFlags  aspectMask,
                                                        deUint32                                baseMipLevel    = 0,
-                                                       deUint32                                mipLevels               = 1,
+                                                       deUint32                                levelCount              = 1,
                                                        deUint32                                baseArrayLayer  = 0,
-                                                       deUint32                                arraySize               = 1);
+                                                       deUint32                                layerCount              = 1);
 };
 
-class ChannelMapping : public vk::VkChannelMapping
+class ComponentMapping : public vk::VkComponentMapping
 {
 public:
-       ChannelMapping (        vk::VkChannelSwizzle r = vk::VK_CHANNEL_SWIZZLE_R,
-                                               vk::VkChannelSwizzle g = vk::VK_CHANNEL_SWIZZLE_G,
-                                               vk::VkChannelSwizzle b = vk::VK_CHANNEL_SWIZZLE_B,
-                                               vk::VkChannelSwizzle a = vk::VK_CHANNEL_SWIZZLE_A);
+       ComponentMapping (      vk::VkComponentSwizzle r = vk::VK_COMPONENT_SWIZZLE_R,
+                                               vk::VkComponentSwizzle g = vk::VK_COMPONENT_SWIZZLE_G,
+                                               vk::VkComponentSwizzle b = vk::VK_COMPONENT_SWIZZLE_B,
+                                               vk::VkComponentSwizzle a = vk::VK_COMPONENT_SWIZZLE_A);
 };
 
 class ImageViewCreateInfo : public vk::VkImageViewCreateInfo
@@ -73,13 +73,13 @@ public:
                                                                vk::VkImageViewType                             viewType,
                                                                vk::VkFormat                                    format,
                                                const   vk::VkImageSubresourceRange&    subresourceRange,
-                                               const   vk::VkChannelMapping&                   channels                        = ChannelMapping(),
+                                               const   vk::VkComponentMapping&                 components                      = ComponentMapping(),
                                                                vk::VkImageViewCreateFlags              flags                           = 0);
 
        ImageViewCreateInfo (           vk::VkImage                                             image,
                                                                vk::VkImageViewType                             viewType,
                                                                vk::VkFormat                                    format,
-                                               const   vk::VkChannelMapping&                   channels                        = ChannelMapping(),
+                                               const   vk::VkComponentMapping&                 components                      = ComponentMapping(),
                                                                vk::VkImageViewCreateFlags              flags                           = 0);
 };
 
@@ -97,10 +97,10 @@ class BufferCreateInfo : public vk::VkBufferCreateInfo
 public:
        BufferCreateInfo (              vk::VkDeviceSize                        size,
                                                        vk::VkBufferCreateFlags         usage,
-                                                       vk::VkSharingMode                       sharingMode                     = vk::VK_SHARING_MODE_EXCLUSIVE,
-                                                       deUint32                                        queueFamilyCount        = 0,
-                                        const  deUint32*                                       pQueueFamilyIndices = DE_NULL, 
-                                                       vk::VkBufferCreateFlags         flags                           = 0);
+                                                       vk::VkSharingMode                       sharingMode                             = vk::VK_SHARING_MODE_EXCLUSIVE,
+                                                       deUint32                                        queueFamilyIndexCount   = 0,
+                                                       const   deUint32*                       pQueueFamilyIndices             = DE_NULL, 
+                                                       vk::VkBufferCreateFlags         flags                                   = 0);
 
        BufferCreateInfo                        (const BufferCreateInfo &other);        
        BufferCreateInfo &operator=     (const BufferCreateInfo &other);
@@ -113,19 +113,19 @@ private:
 class ImageCreateInfo : public vk::VkImageCreateInfo
 {
 public:
-       ImageCreateInfo (               vk::VkImageType                 imageType,
-                                                       vk::VkFormat                    format,
-                                                       vk::VkExtent3D                  extent,
-                                                       deUint32                                mipLevels,
-                                                       deUint32                                arraySize,
-                                                       deUint32                                samples,
-                                                       vk::VkImageTiling               tiling,
-                                                       vk::VkImageUsageFlags   usage,
-                                                       vk::VkSharingMode               sharingMode                     = vk::VK_SHARING_MODE_EXCLUSIVE,
-                                                       deUint32                                queueFamilyCount        = 0,
-                                       const   deUint32*                               pQueueFamilyIndices = DE_NULL,
-                                                       vk::VkImageCreateFlags  flags                           = 0, 
-                                                       vk::VkImageLayout               initialLayout           = vk::VK_IMAGE_LAYOUT_UNDEFINED);
+       ImageCreateInfo (               vk::VkImageType                         imageType,
+                                                       vk::VkFormat                            format,
+                                                       vk::VkExtent3D                          extent,
+                                                       deUint32                                        mipLevels,
+                                                       deUint32                                        arrayLayers,
+                                                       vk::VkSampleCountFlagBits       samples,
+                                                       vk::VkImageTiling                       tiling,
+                                                       vk::VkImageUsageFlags           usage,
+                                                       vk::VkSharingMode                       sharingMode                             = vk::VK_SHARING_MODE_EXCLUSIVE,
+                                                       deUint32                                        queueFamilyIndexCount   = 0,
+                                       const   deUint32*                                       pQueueFamilyIndices             = DE_NULL,
+                                                       vk::VkImageCreateFlags          flags                                   = 0, 
+                                                       vk::VkImageLayout                       initialLayout                   = vk::VK_IMAGE_LAYOUT_UNDEFINED);
 
 private:
        ImageCreateInfo                         (const ImageCreateInfo &other);
@@ -148,11 +148,11 @@ class AttachmentDescription : public vk::VkAttachmentDescription
 {
 public:
        AttachmentDescription ( vk::VkFormat                            format,
-                                                       deUint32                                        samples,
-                                                       vk::VkAttachmentLoadOp  loadOp,
-                                                       vk::VkAttachmentStoreOp storeOp,
-                                                       vk::VkAttachmentLoadOp  stencilLoadOp,
-                                                       vk::VkAttachmentStoreOp stencilStoreOp,
+                                                       vk::VkSampleCountFlagBits       samples,
+                                                       vk::VkAttachmentLoadOp          loadOp,
+                                                       vk::VkAttachmentStoreOp         storeOp,
+                                                       vk::VkAttachmentLoadOp          stencilLoadOp,
+                                                       vk::VkAttachmentStoreOp         stencilStoreOp,
                                                        vk::VkImageLayout                       initialLayout,
                                                        vk::VkImageLayout                       finalLayout);
 
@@ -171,36 +171,38 @@ class SubpassDescription : public vk::VkSubpassDescription
 public:
        SubpassDescription (            vk::VkPipelineBindPoint                 pipelineBindPoint,
                                                                vk::VkSubpassDescriptionFlags   flags,
-                                                               deUint32                                                inputCount,
+                                                               deUint32                                                inputAttachmentCount,
                                                const   vk::VkAttachmentReference*              inputAttachments,
-                                                               deUint32                                                colorCount,
-                                          const        vk::VkAttachmentReference*              colorAttachments,
-                                          const        vk::VkAttachmentReference*              resolveAttachments,
+                                                               deUint32                                                colorAttachmentCount,
+                                               const   vk::VkAttachmentReference*              colorAttachments,
+                                               const   vk::VkAttachmentReference*              resolveAttachments,
                                                                vk::VkAttachmentReference               depthStencilAttachment,
-                                                               deUint32                                                preserveCount,
-                                          const        vk::VkAttachmentReference*              preserveAttachments);
+                                                               deUint32                                                preserveAttachmentCount,
+                                               const   vk::VkAttachmentReference*              preserveAttachments);
 
-       SubpassDescription                              (const vk::VkSubpassDescription &other);
-       SubpassDescription                              (const SubpassDescription &other);
-       SubpassDescription &operator=   (const SubpassDescription &other);
+       SubpassDescription                              (const vk::VkSubpassDescriptionother);
+       SubpassDescription                              (const SubpassDescriptionother);
+       SubpassDescription& operator=   (const SubpassDescription& other);
 
 private:
-       std::vector<vk::VkAttachmentReference> m_InputAttachments;
-       std::vector<vk::VkAttachmentReference> m_ColorAttachments;
-       std::vector<vk::VkAttachmentReference> m_ResolveAttachments;
-       std::vector<vk::VkAttachmentReference> m_PreserveAttachments;
+       std::vector<vk::VkAttachmentReference>  m_inputAttachments;
+       std::vector<vk::VkAttachmentReference>  m_colorAttachments;
+       std::vector<vk::VkAttachmentReference>  m_resolveAttachments;
+       std::vector<vk::VkAttachmentReference>  m_preserveAttachments;
+
+       vk::VkAttachmentReference                               m_depthStencilAttachment;
 };
 
 class SubpassDependency : public vk::VkSubpassDependency
 {
 public:
        SubpassDependency (     deUint32                                        srcSubpass,
-                                               deUint32                                        destSubpass,
+                                               deUint32                                        dstSubpass,
                                                vk::VkPipelineStageFlags        srcStageMask,
-                                               vk::VkPipelineStageFlags        destStageMask,
-                                               vk::VkMemoryOutputFlags         outputMask,
-                                               vk::VkMemoryInputFlags          inputMask,
-                                               vk::VkBool32                            byRegion);
+                                               vk::VkPipelineStageFlags        dstStageMask,
+                                               vk::VkAccessFlags                       srcAccessMask,
+                                               vk::VkAccessFlags                       dstAccessMask,
+                                               vk::VkDependencyFlags           dependencyFlags);
 
        SubpassDependency (const vk::VkSubpassDependency& other);
 };
@@ -224,13 +226,13 @@ public:
        void addDependency      (vk::VkSubpassDependency dependency);
 
 private:
-       std::vector<AttachmentDescription>       m_attachments;
-       std::vector<SubpassDescription>          m_subpasses;
-       std::vector<SubpassDependency>           m_dependiences;
+       std::vector<AttachmentDescription>                      m_attachments;
+       std::vector<SubpassDescription>                         m_subpasses;
+       std::vector<SubpassDependency>                          m_dependiences;
 
-       std::vector<vk::VkAttachmentDescription> m_attachmentsStructs;
-       std::vector<vk::VkSubpassDescription>    m_subpassesStructs;
-       std::vector<vk::VkSubpassDependency>     m_dependiencesStructs;
+       std::vector<vk::VkAttachmentDescription>        m_attachmentsStructs;
+       std::vector<vk::VkSubpassDescription>           m_subpassesStructs;
+       std::vector<vk::VkSubpassDependency>            m_dependiencesStructs;
 
        RenderPassCreateInfo                    (const RenderPassCreateInfo &other); //Not allowed!
        RenderPassCreateInfo &operator= (const RenderPassCreateInfo &other); //Not allowed!
@@ -251,58 +253,55 @@ private:
        RenderPassBeginInfo &operator=  (const RenderPassBeginInfo &other); //Not allowed!
 };
 
-class CmdPoolCreateInfo : public vk::VkCmdPoolCreateInfo
+class CmdPoolCreateInfo : public vk::VkCommandPoolCreateInfo
 {
 public:
        CmdPoolCreateInfo (deUint32 queueFamilyIndex,
-               vk::VkCmdPoolCreateFlags flags = vk::VK_CMD_POOL_CREATE_RESET_COMMAND_BUFFER_BIT);
+               vk::VkCommandPoolCreateFlags flags = vk::VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT);
 };
 
-class CmdBufferCreateInfo : public vk::VkCmdBufferCreateInfo
+class CmdBufferBeginInfo : public vk::VkCommandBufferBeginInfo
 {
 public:
-       CmdBufferCreateInfo (vk::VkCmdPool pool, vk::VkCmdBufferLevel level, vk::VkCmdBufferCreateFlags flags);
+       CmdBufferBeginInfo (vk::VkCommandBufferUsageFlags               flags   = 0);
+       CmdBufferBeginInfo (vk::VkRenderPass                                    renderPass,
+                                               deUint32                                                        subpass,
+                                               vk::VkFramebuffer                                       framebuffer,
+                                               vk::VkCommandBufferUsageFlags           flags                                   = 0, 
+                                               bool                                                            occlusionQueryEnable    = false,
+                                               vk::VkQueryControlFlags                         queryFlags                              = 0u,
+                                               vk::VkQueryPipelineStatisticFlags       pipelineStatistics              = 0u);
 };
 
-class CmdBufferBeginInfo : public vk::VkCmdBufferBeginInfo
-{
-public:
-       CmdBufferBeginInfo (vk::VkCmdBufferOptimizeFlags        flags   = 0);
-       CmdBufferBeginInfo (vk::VkRenderPass                            renderPass,
-                                               deUint32                                                subpass,
-                                               vk::VkFramebuffer                               framebuffer,
-                                               vk::VkCmdBufferOptimizeFlags    flags   = 0);
-};
 
-
-class DescriptorTypeCount : public vk::VkDescriptorTypeCount
+class DescriptorPoolSize : public vk::VkDescriptorPoolSize
 {
 public:
-       DescriptorTypeCount (vk::VkDescriptorType _type, deUint32 _count)
+       DescriptorPoolSize (vk::VkDescriptorType _type, deUint32 _descriptorCount)
        {
-               type = _type;
-               count = _count;
+               type                    = _type;
+               descriptorCount = _descriptorCount;
        }
 };
 
 class DescriptorPoolCreateInfo : public vk::VkDescriptorPoolCreateInfo
 {
 public:
-       DescriptorPoolCreateInfo (      const   std::vector<vk::VkDescriptorTypeCount>& typeCounts,\r
-                                                                               vk::VkDescriptorPoolUsage poolUsage\r
+       DescriptorPoolCreateInfo (      const   std::vector<vk::VkDescriptorPoolSize>&  poolSizeCounts,\r
+                                                                               vk::VkDescriptorPoolCreateFlags flags\r
                                                                                deUint32 maxSets);
 
        DescriptorPoolCreateInfo& addDescriptors (vk::VkDescriptorType type, deUint32 count);
 
 private:
-       std::vector<vk::VkDescriptorTypeCount> m_typeCounts;
+       std::vector<vk::VkDescriptorPoolSize> m_poolSizeCounts;
 };
 
 
 class DescriptorSetLayoutCreateInfo : public vk::VkDescriptorSetLayoutCreateInfo
 {
 public:
-       DescriptorSetLayoutCreateInfo (deUint32 count, const vk::VkDescriptorSetLayoutBinding* pBinding);
+       DescriptorSetLayoutCreateInfo (deUint32 bindingCount, const vk::VkDescriptorSetLayoutBinding* pBindings);
 };
 
 
@@ -329,9 +328,9 @@ public:
        class VertexInputState : public vk::VkPipelineVertexInputStateCreateInfo
        {
        public:
-               VertexInputState (                      deUint32                                                                bindingCount                                    = 0,
+               VertexInputState (                      deUint32                                                                vertexBindingDescriptionCount   = 0,
                                                        const   vk::VkVertexInputBindingDescription*    pVertexBindingDescriptions              = NULL,
-                                                                       deUint32                                                                attributeCount                                  = 0,
+                                                                       deUint32                                                                vertexAttributeDescriptionCount = 0,
                                                        const   vk::VkVertexInputAttributeDescription*  pVertexAttributeDescriptions    = NULL);
        };
 
@@ -355,34 +354,36 @@ public:
                                                std::vector<vk::VkRect2D>       scissors                = std::vector<vk::VkRect2D>(0));
 
                ViewportState                           (const ViewportState &other);
-               ViewportState &operator=        (const ViewportState &other);
+               ViewportState &operator=                (const ViewportState &other);
 
                std::vector<vk::VkViewport> m_viewports;
                std::vector<vk::VkRect2D>       m_scissors;
        };
 
-       class RasterizerState : public vk::VkPipelineRasterStateCreateInfo
+       class RasterizerState : public vk::VkPipelineRasterizationStateCreateInfo
        {
        public:
-               RasterizerState (       vk::VkBool32    depthClipEnable                 = false,
-                                                       vk::VkBool32    rasterizerDiscardEnable = false,
-                                                       vk::VkFillMode  fillMode                                = vk::VK_FILL_MODE_SOLID,
-                                                       vk::VkCullMode  cullMode                                = vk::VK_CULL_MODE_NONE,
-                                                       vk::VkFrontFace frontFace                               = vk::VK_FRONT_FACE_CW,
-                                                       vk::VkBool32    depthBiasEnable                 = true,\r
-                                                       float                   depthBias                               = 0.0f,
-                                                       float                   depthBiasClamp                  = 0.0f,
-                                                       float                   slopeScaledDepthBias    = 0.0f,
-                                                       float                   lineWidth                               = 1.0f);
+               RasterizerState (       vk::VkBool32            depthClampEnable                = false,
+                                                       vk::VkBool32            rasterizerDiscardEnable = false,
+                                                       vk::VkPolygonMode       polygonMode                             = vk::VK_POLYGON_MODE_FILL,
+                                                       vk::VkCullModeFlags     cullMode                                = vk::VK_CULL_MODE_NONE,
+                                                       vk::VkFrontFace         frontFace                               = vk::VK_FRONT_FACE_CLOCKWISE,
+                                                       vk::VkBool32            depthBiasEnable                 = true,\r
+                                                       float                           depthBiasConstantFactor = 0.0f,
+                                                       float                           depthBiasClamp                  = 0.0f,
+                                                       float                           depthBiasSlopeFactor    = 0.0f,
+                                                       float                           lineWidth                               = 1.0f);
        };
 
        class MultiSampleState : public vk::VkPipelineMultisampleStateCreateInfo
        {
        public:
-               MultiSampleState (                      deUint32                rasterSamples                           = 1,
-                                                                       vk::VkBool32    sampleShadingEnable                     = false,
-                                                                       float                   minSampleShading                        = 0.0f,
-                                                       const   std::vector<vk::VkSampleMask>& sampleMask       = std::vector<vk::VkSampleMask>(1, 0xffffffff));
+               MultiSampleState (                      vk::VkSampleCountFlagBits               rasterizationSamples            = vk::VK_SAMPLE_COUNT_1_BIT,
+                                                                       vk::VkBool32                                    sampleShadingEnable                     = false,
+                                                                       float                                                   minSampleShading                        = 0.0f,
+                                                       const   std::vector<vk::VkSampleMask>&  sampleMask                                      = std::vector<vk::VkSampleMask>(1, 0xffffffff), 
+                                                       bool                                                                    alphaToCoverageEnable           = false,
+                                                       bool                                                                    alphaToOneEnable                        = false);
 
                MultiSampleState                        (const MultiSampleState &other);
                MultiSampleState &operator= (const MultiSampleState &other);
@@ -397,31 +398,27 @@ public:
                class Attachment : public vk::VkPipelineColorBlendAttachmentState
                {
                public:
-                       Attachment (vk::VkBool32        blendEnable                     = false,
-                                               vk::VkBlend             srcBlendColor           = vk::VK_BLEND_SRC_COLOR,
-                                               vk::VkBlend             destBlendColor          = vk::VK_BLEND_DEST_COLOR,
-                                               vk::VkBlendOp   blendOpColor            = vk::VK_BLEND_OP_ADD,
-                                               vk::VkBlend             srcBlendAlpha           = vk::VK_BLEND_SRC_COLOR,
-                                               vk::VkBlend             destBlendAlpha          = vk::VK_BLEND_DEST_COLOR,
-                                               vk::VkBlendOp   blendOpAlpha            = vk::VK_BLEND_OP_ADD,
-                                               deUint8                 channelWriteMask        = 0xff);
+                       Attachment (vk::VkBool32                blendEnable                     = false,
+                                               vk::VkBlendFactor       srcColorBlendFactor     = vk::VK_BLEND_FACTOR_SRC_COLOR,
+                                               vk::VkBlendFactor       dstColorBlendFactor     = vk::VK_BLEND_FACTOR_DST_COLOR,
+                                               vk::VkBlendOp           colorBlendOp            = vk::VK_BLEND_OP_ADD,
+                                               vk::VkBlendFactor       srcAlphaBlendFactor     = vk::VK_BLEND_FACTOR_SRC_COLOR,
+                                               vk::VkBlendFactor       dstAlphaBlendFactor     = vk::VK_BLEND_FACTOR_DST_COLOR,
+                                               vk::VkBlendOp           alphaBlendOp            = vk::VK_BLEND_OP_ADD,
+                                               deUint8                         colorWriteMask  = 0xff);
                };
 
                ColorBlendState (       const   std::vector<vk::VkPipelineColorBlendAttachmentState>&   attachments,
                                                                        vk::VkBool32                                                                                    alphaToCoverageEnable   = false,
-                                                                       vk::VkBool32                                                                                    logicOpEnable                   = false,
-                                                                       vk::VkLogicOp                                                                                   logicOp                                 = vk::VK_LOGIC_OP_COPY,
-                                                                       vk::VkBool32                                                                                    alphaToOneEnable                = false);
+                                                                       vk::VkLogicOp                                                                                   logicOp                                 = vk::VK_LOGIC_OP_COPY);
 
                ColorBlendState (                       deUint32                                                                                                attachmentCount,
                                                        const   vk::VkPipelineColorBlendAttachmentState*                                attachments,
-                                                                       vk::VkBool32                                                                                    alphaToCoverageEnable   = false,
                                                                        vk::VkBool32                                                                                    logicOpEnable                   = false,
-                                                                       vk::VkLogicOp                                                                                   logicOp                                 = vk::VK_LOGIC_OP_COPY,
-                                                                       vk::VkBool32                                                                                    alphaToOneEnable                = false);
+                                                                       vk::VkLogicOp                                                                                   logicOp                                 = vk::VK_LOGIC_OP_COPY);
 
                ColorBlendState (const vk::VkPipelineColorBlendStateCreateInfo &createInfo);
-               ColorBlendState (const ColorBlendState &createInfo, std::vector<float> blendConst = std::vector<float>(4));
+               ColorBlendState (const ColorBlendState &createInfo, std::vector<float> blendConstants = std::vector<float>(4));
 
        private:
                std::vector<vk::VkPipelineColorBlendAttachmentState> m_attachments;
@@ -433,13 +430,13 @@ public:
                class StencilOpState : public vk::VkStencilOpState
                {
                public:
-                       StencilOpState (vk::VkStencilOp stencilFailOp           = vk::VK_STENCIL_OP_REPLACE,
-                                                       vk::VkStencilOp stencilPassOp           = vk::VK_STENCIL_OP_REPLACE,
-                                                       vk::VkStencilOp stencilDepthFailOp      = vk::VK_STENCIL_OP_REPLACE,
-                                                       vk::VkCompareOp stencilCompareOp        = vk::VK_COMPARE_OP_ALWAYS,
-                                                       deUint32                stencilCompareMask      = 0xffffffffu,\r
-                                                       deUint32                stencilWriteMask        = 0xffffffffu,\r
-                                                       deUint32                stencilReference        = 0);
+                       StencilOpState (vk::VkStencilOp failOp          = vk::VK_STENCIL_OP_REPLACE,
+                                                       vk::VkStencilOp passOp          = vk::VK_STENCIL_OP_REPLACE,
+                                                       vk::VkStencilOp depthFailOp     = vk::VK_STENCIL_OP_REPLACE,
+                                                       vk::VkCompareOp compareOp       = vk::VK_COMPARE_OP_ALWAYS,
+                                                       deUint32                compareMask     = 0xffffffffu,\r
+                                                       deUint32                writeMask       = 0xffffffffu,\r
+                                                       deUint32                reference       = 0);
                };
 
                DepthStencilState (     vk::VkBool32    depthTestEnable                 = false,
@@ -456,7 +453,7 @@ public:
        class PipelineShaderStage : public vk::VkPipelineShaderStageCreateInfo
        {
        public:
-               PipelineShaderStage (vk::VkShader shader, vk::VkShaderStage stage);
+               PipelineShaderStage (vk::VkShaderModule shaderModule, const char* _pName, vk::VkShaderStageFlagBits stage);
        };
 
        class DynamicState : public vk::VkPipelineDynamicStateCreateInfo
@@ -472,36 +469,36 @@ public:
 
        PipelineCreateInfo(vk::VkPipelineLayout layout, vk::VkRenderPass renderPass, int subpass, vk::VkPipelineCreateFlags flags);
 
-       PipelineCreateInfo &addShader (const vk::VkPipelineShaderStageCreateInfo&               shader);
+       PipelineCreateInfoaddShader (const vk::VkPipelineShaderStageCreateInfo&               shader);
 
-       PipelineCreateInfo &addState (const vk::VkPipelineVertexInputStateCreateInfo&   state);
-       PipelineCreateInfo &addState (const vk::VkPipelineInputAssemblyStateCreateInfo& state);
-       PipelineCreateInfo &addState (const vk::VkPipelineColorBlendStateCreateInfo&    state);
-       PipelineCreateInfo &addState (const vk::VkPipelineViewportStateCreateInfo&              state);
-       PipelineCreateInfo &addState (const vk::VkPipelineDepthStencilStateCreateInfo&  state);
-       PipelineCreateInfo &addState (const vk::VkPipelineTessellationStateCreateInfo&  state);
-       PipelineCreateInfo &addState (const vk::VkPipelineRasterStateCreateInfo&                state);
-       PipelineCreateInfo &addState (const vk::VkPipelineMultisampleStateCreateInfo&   state);
-       PipelineCreateInfo &addState (const vk::VkPipelineDynamicStateCreateInfo&               state);
+       PipelineCreateInfoaddState (const vk::VkPipelineVertexInputStateCreateInfo&   state);
+       PipelineCreateInfoaddState (const vk::VkPipelineInputAssemblyStateCreateInfo& state);
+       PipelineCreateInfoaddState (const vk::VkPipelineColorBlendStateCreateInfo&    state);
+       PipelineCreateInfoaddState (const vk::VkPipelineViewportStateCreateInfo&              state);
+       PipelineCreateInfoaddState (const vk::VkPipelineDepthStencilStateCreateInfo&  state);
+       PipelineCreateInfoaddState (const vk::VkPipelineTessellationStateCreateInfo&  state);
+       PipelineCreateInfo& addState (const vk::VkPipelineRasterizationStateCreateInfo&         state);
+       PipelineCreateInfoaddState (const vk::VkPipelineMultisampleStateCreateInfo&   state);
+       PipelineCreateInfo& addState (const vk::VkPipelineDynamicStateCreateInfo&                               state);
 
 private:
-       std::vector<vk::VkPipelineShaderStageCreateInfo>                        m_shaders;
-
-       de::SharedPtr<vk::VkPipelineVertexInputStateCreateInfo>         m_vertexInputState;
-       de::SharedPtr<vk::VkPipelineInputAssemblyStateCreateInfo>       m_iputAssemblyState;
-       std::vector<vk::VkPipelineColorBlendAttachmentState>            m_colorBlendStateAttachments;
-       de::SharedPtr<vk::VkPipelineColorBlendStateCreateInfo>          m_colorBlendState;
-       de::SharedPtr<vk::VkPipelineViewportStateCreateInfo>            m_viewportState;
-       de::SharedPtr<vk::VkPipelineDepthStencilStateCreateInfo>        m_dynamicDepthStencilState;
-       de::SharedPtr<vk::VkPipelineTessellationStateCreateInfo>        m_tessState;
-       de::SharedPtr<vk::VkPipelineRasterStateCreateInfo>                      m_rasterState;
-       de::SharedPtr<vk::VkPipelineMultisampleStateCreateInfo>         m_multisampleState;
-       de::SharedPtr<vk::VkPipelineDynamicStateCreateInfo>                     m_dynamicState;
+       std::vector<vk::VkPipelineShaderStageCreateInfo>                m_shaders;
+
+       vk::VkPipelineVertexInputStateCreateInfo                                m_vertexInputState;
+       vk::VkPipelineInputAssemblyStateCreateInfo                              m_inputAssemblyState;
+       std::vector<vk::VkPipelineColorBlendAttachmentState>    m_colorBlendStateAttachments;
+       vk::VkPipelineColorBlendStateCreateInfo                                 m_colorBlendState;
+       vk::VkPipelineViewportStateCreateInfo                                   m_viewportState;
+       vk::VkPipelineDepthStencilStateCreateInfo                               m_dynamicDepthStencilState;
+       vk::VkPipelineTessellationStateCreateInfo                               m_tessState;
+       vk::VkPipelineRasterizationStateCreateInfo                              m_rasterState;
+       vk::VkPipelineMultisampleStateCreateInfo                                m_multisampleState;
+       vk::VkPipelineDynamicStateCreateInfo                                    m_dynamicState;
 
        std::vector<vk::VkDynamicState> m_dynamicStates;
 
-       std::vector<vk::VkViewport> m_viewports;
-       std::vector<vk::VkRect2D>       m_scissors;
+       std::vector<vk::VkViewport>             m_viewports;
+       std::vector<vk::VkRect2D>               m_scissors;
 
        std::vector<vk::VkSampleMask>   m_multisampleStateSampleMask;
 };
@@ -509,20 +506,20 @@ private:
 class SamplerCreateInfo : public vk::VkSamplerCreateInfo
 {
 public:
-       SamplerCreateInfo (     vk::VkTexFilter                 magFilter                               = vk::VK_TEX_FILTER_NEAREST,
-                                               vk::VkTexFilter                 minFilter                               = vk::VK_TEX_FILTER_NEAREST,
-                                               vk::VkTexMipmapMode             mipMode                                 = vk::VK_TEX_MIPMAP_MODE_NEAREST,
-                                               vk::VkTexAddressMode    addressU                                = vk::VK_TEX_ADDRESS_MODE_MIRROR,
-                                               vk::VkTexAddressMode    addressV                                = vk::VK_TEX_ADDRESS_MODE_MIRROR,
-                                               vk::VkTexAddressMode    addressW                                = vk::VK_TEX_ADDRESS_MODE_MIRROR,
-                                               float                                   mipLodBias                              = 0.0f,
-                                               float                                   maxAnisotropy                   = 1.0f,
-                                               vk::VkBool32                    compareEnable                   = false,
-                                               vk::VkCompareOp                 compareOp                               = vk::VK_COMPARE_OP_ALWAYS,
-                                               float                                   minLod                                  = 0.0f,
-                                               float                                   maxLod                                  = 16.0f,
-                                               vk::VkBorderColor               borderColor                             = vk::VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE, 
-                                               vk::VkBool32                    unnormalizedCoordinates = false);
+       SamplerCreateInfo (     vk::VkFilter                            magFilter                               = vk::VK_FILTER_NEAREST,
+                                               vk::VkFilter                            minFilter                               = vk::VK_FILTER_NEAREST,
+                                               vk::VkSamplerMipmapMode         mipmapMode                              = vk::VK_SAMPLER_MIPMAP_MODE_NEAREST,
+                                               vk::VkSamplerAddressMode        addressU                                = vk::VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT,
+                                               vk::VkSamplerAddressMode        addressV                                = vk::VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT,
+                                               vk::VkSamplerAddressMode        addressW                                = vk::VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT,
+                                               float                                           mipLodBias                              = 0.0f,
+                                               float                                           maxAnisotropy                   = 1.0f,
+                                               vk::VkBool32                            compareEnable                   = false,
+                                               vk::VkCompareOp                         compareOp                               = vk::VK_COMPARE_OP_ALWAYS,
+                                               float                                           minLod                                  = 0.0f,
+                                               float                                           maxLod                                  = 16.0f,
+                                               vk::VkBorderColor                       borderColor                             = vk::VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE, 
+                                               vk::VkBool32                            unnormalizedCoordinates = false);
 };
 
 } // DynamicState
@@ -72,19 +72,6 @@ inline tcu::Vec4 vec4Blue (void)
        return tcu::Vec4(0.0f, 0.0f, 1.0f, 1.0f);
 }
 
-vk::Move<vk::VkShader> createShader(const vk::DeviceInterface &vk, const vk::VkDevice device, 
-                                                                       const vk::VkShaderModule module, const char* name, const vk::VkShaderStage stage)
-{
-       vk::VkShaderCreateInfo createInfo;
-       createInfo.sType        = vk::VK_STRUCTURE_TYPE_SHADER_CREATE_INFO;
-       createInfo.pNext        = DE_NULL;
-       createInfo.module       = module;
-       createInfo.pName        = name;
-       createInfo.flags        = 0;
-       createInfo.stage        = stage;
-       return vk::createShader(vk, device, &createInfo);
-}
-
 namespace
 {
 
@@ -133,15 +120,15 @@ protected:
 
        de::SharedPtr<Image>                                                    m_colorTargetImage;
        vk::Move<vk::VkImageView>                                               m_colorTargetView;
-
+               
        de::SharedPtr<Image>                                                    m_depthStencilImage;
        vk::Move<vk::VkImageView>                                               m_attachmentView;
 
        PipelineCreateInfo::VertexInputState                    m_vertexInputState;
        de::SharedPtr<Buffer>                                                   m_vertexBuffer;
 
-       vk::Move<vk::VkCmdPool>                                                 m_cmdPool;
-       vk::Move<vk::VkCmdBuffer>                                               m_cmdBuffer;
+       vk::Move<vk::VkCommandPool>                                             m_cmdPool;
+       vk::Move<vk::VkCommandBuffer>                                   m_cmdBuffer;
 
        vk::Move<vk::VkFramebuffer>                                             m_framebuffer;
        vk::Move<vk::VkRenderPass>                                              m_renderPass;
@@ -151,8 +138,8 @@ protected:
 
        std::vector<Vec4RGBA>                                                   m_data;
 
-       PipelineCreateInfo::DepthStencilState           m_depthStencilState_1;
-       PipelineCreateInfo::DepthStencilState           m_depthStencilState_2;
+       PipelineCreateInfo::DepthStencilState                   m_depthStencilState_1;
+       PipelineCreateInfo::DepthStencilState                   m_depthStencilState_2;
 
        void initialize (void)
        {
@@ -162,27 +149,21 @@ protected:
                const PipelineLayoutCreateInfo pipelineLayoutCreateInfo;
                m_pipelineLayout = vk::createPipelineLayout(m_vk, device, &pipelineLayoutCreateInfo);
 
-               const vk::Unique<vk::VkShader> vs(createShader(m_vk, device,
-                       *createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_vertexShaderName), 0),
-                       "main", vk::VK_SHADER_STAGE_VERTEX));
-
-               const vk::Unique<vk::VkShader> fs(createShader(m_vk, device,
-                       *createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_fragmentShaderName), 0),
-                       "main", vk::VK_SHADER_STAGE_FRAGMENT));
-
+               const vk::Unique<vk::VkShaderModule> vs(createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_vertexShaderName), 0));
+               const vk::Unique<vk::VkShaderModule> fs(createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_fragmentShaderName), 0));
 
                const vk::VkExtent3D imageExtent = { WIDTH, HEIGHT, 1 };
-               const ImageCreateInfo targetImageCreateInfo(vk::VK_IMAGE_TYPE_2D, m_colorAttachmentFormat, imageExtent, 1, 1, 1
-                       vk::VK_IMAGE_TILING_OPTIMAL, vk::VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | vk::VK_IMAGE_USAGE_TRANSFER_SOURCE_BIT);
+               const ImageCreateInfo targetImageCreateInfo(vk::VK_IMAGE_TYPE_2D, m_colorAttachmentFormat, imageExtent, 1, 1, vk::VK_SAMPLE_COUNT_1_BIT
+                       vk::VK_IMAGE_TILING_OPTIMAL, vk::VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | vk::VK_IMAGE_USAGE_TRANSFER_SRC_BIT);
 
-               m_colorTargetImage = Image::CreateAndAlloc(m_vk, device, targetImageCreateInfo, m_context.getDefaultAllocator());
+               m_colorTargetImage = Image::createAndAlloc(m_vk, device, targetImageCreateInfo, m_context.getDefaultAllocator());
 
                const ImageCreateInfo depthStencilImageCreateInfo(
                        vk::VK_IMAGE_TYPE_2D, m_depthStencilAttachmentFormat, imageExtent,
-                       1, 1, 1, vk::VK_IMAGE_TILING_OPTIMAL,
+                       1, 1, vk::VK_SAMPLE_COUNT_1_BIT, vk::VK_IMAGE_TILING_OPTIMAL,
                        vk::VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT);
 
-               m_depthStencilImage = Image::CreateAndAlloc(m_vk, device, depthStencilImageCreateInfo, m_context.getDefaultAllocator());
+               m_depthStencilImage = Image::createAndAlloc(m_vk, device, depthStencilImageCreateInfo, m_context.getDefaultAllocator());
 
                const ImageViewCreateInfo colorTargetViewInfo(m_colorTargetImage->object(), vk::VK_IMAGE_VIEW_TYPE_2D, m_colorAttachmentFormat);
                m_colorTargetView = vk::createImageView(m_vk, device, &colorTargetViewInfo);
@@ -193,7 +174,7 @@ protected:
                RenderPassCreateInfo renderPassCreateInfo;
                renderPassCreateInfo.addAttachment(AttachmentDescription(
                        m_colorAttachmentFormat,
-                       1,
+                       vk::VK_SAMPLE_COUNT_1_BIT,
                        vk::VK_ATTACHMENT_LOAD_OP_LOAD,
                        vk::VK_ATTACHMENT_STORE_OP_STORE,
                        vk::VK_ATTACHMENT_LOAD_OP_DONT_CARE,
@@ -203,7 +184,7 @@ protected:
 
                renderPassCreateInfo.addAttachment(AttachmentDescription(
                        m_depthStencilAttachmentFormat,
-                       1,
+                       vk::VK_SAMPLE_COUNT_1_BIT,
                        vk::VK_ATTACHMENT_LOAD_OP_LOAD,
                        vk::VK_ATTACHMENT_STORE_OP_STORE,
                        vk::VK_ATTACHMENT_LOAD_OP_DONT_CARE,
@@ -225,7 +206,7 @@ protected:
 
                renderPassCreateInfo.addSubpass(SubpassDescription(
                        vk::VK_PIPELINE_BIND_POINT_GRAPHICS,
-                       vk::VK_SUBPASS_DESCRIPTION_NO_OVERDRAW_BIT,
+                       0,
                        0,
                        DE_NULL,
                        1,
@@ -241,7 +222,7 @@ protected:
                {
                        0,
                        sizeof(tcu::Vec4) * 2,
-                       vk::VK_VERTEX_INPUT_STEP_RATE_VERTEX,
+                       vk::VK_VERTEX_INPUT_RATE_VERTEX,
                };
 
                const vk::VkVertexInputAttributeDescription vertexInputAttributeDescriptions[2] =
@@ -269,8 +250,8 @@ protected:
                const PipelineCreateInfo::ColorBlendState::Attachment vkCbAttachmentState;
 
                PipelineCreateInfo pipelineCreateInfo_1(*m_pipelineLayout, *m_renderPass, 0, 0);
-               pipelineCreateInfo_1.addShader(PipelineCreateInfo::PipelineShaderStage(*vs, vk::VK_SHADER_STAGE_VERTEX));
-               pipelineCreateInfo_1.addShader(PipelineCreateInfo::PipelineShaderStage(*fs, vk::VK_SHADER_STAGE_FRAGMENT));
+               pipelineCreateInfo_1.addShader(PipelineCreateInfo::PipelineShaderStage(*vs, "main", vk::VK_SHADER_STAGE_VERTEX_BIT));
+               pipelineCreateInfo_1.addShader(PipelineCreateInfo::PipelineShaderStage(*fs, "main", vk::VK_SHADER_STAGE_FRAGMENT_BIT));
                pipelineCreateInfo_1.addState(PipelineCreateInfo::VertexInputState(m_vertexInputState));
                pipelineCreateInfo_1.addState(PipelineCreateInfo::InputAssemblerState(m_topology));
                pipelineCreateInfo_1.addState(PipelineCreateInfo::ColorBlendState(1, &vkCbAttachmentState));
@@ -281,8 +262,8 @@ protected:
                pipelineCreateInfo_1.addState(PipelineCreateInfo::DynamicState());
 
                PipelineCreateInfo pipelineCreateInfo_2(*m_pipelineLayout, *m_renderPass, 0, 0);
-               pipelineCreateInfo_2.addShader(PipelineCreateInfo::PipelineShaderStage(*vs, vk::VK_SHADER_STAGE_VERTEX));
-               pipelineCreateInfo_2.addShader(PipelineCreateInfo::PipelineShaderStage(*fs, vk::VK_SHADER_STAGE_FRAGMENT));
+               pipelineCreateInfo_2.addShader(PipelineCreateInfo::PipelineShaderStage(*vs, "main", vk::VK_SHADER_STAGE_VERTEX_BIT));
+               pipelineCreateInfo_2.addShader(PipelineCreateInfo::PipelineShaderStage(*fs, "main", vk::VK_SHADER_STAGE_FRAGMENT_BIT));
                pipelineCreateInfo_2.addState(PipelineCreateInfo::VertexInputState(m_vertexInputState));
                pipelineCreateInfo_2.addState(PipelineCreateInfo::InputAssemblerState(m_topology));
                pipelineCreateInfo_2.addState(PipelineCreateInfo::ColorBlendState(1, &vkCbAttachmentState));
@@ -304,7 +285,7 @@ protected:
                m_framebuffer = vk::createFramebuffer(m_vk, device, &framebufferCreateInfo);
 
                const vk::VkDeviceSize dataSize = m_data.size() * sizeof(Vec4RGBA);
-               m_vertexBuffer = Buffer::CreateAndAlloc(m_vk, device, BufferCreateInfo(dataSize,
+               m_vertexBuffer = Buffer::createAndAlloc(m_vk, device, BufferCreateInfo(dataSize,
                        vk::VK_BUFFER_USAGE_VERTEX_BUFFER_BIT),
                        m_context.getDefaultAllocator(), vk::MemoryRequirement::HostVisible);
 
@@ -319,8 +300,15 @@ protected:
                const CmdPoolCreateInfo cmdPoolCreateInfo(m_context.getUniversalQueueFamilyIndex());
                m_cmdPool = vk::createCommandPool(m_vk, device, &cmdPoolCreateInfo);
 
-               const CmdBufferCreateInfo cmdBufCreateInfo(*m_cmdPool, vk::VK_CMD_BUFFER_LEVEL_PRIMARY, 0);
-               m_cmdBuffer = vk::createCommandBuffer(m_vk, device, &cmdBufCreateInfo);
+               const vk::VkCommandBufferAllocateInfo cmdBufferAllocateInfo =
+               {
+                       vk::VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO,     // VkStructureType                      sType;
+                       DE_NULL,                                                                                        // const void*                          pNext;
+                       *m_cmdPool,                                                                                     // VkCommandPool                        commandPool;
+                       vk::VK_COMMAND_BUFFER_LEVEL_PRIMARY,                            // VkCommandBufferLevel         level;
+                       1u,                                                                                                     // deUint32                                     bufferCount;
+               };
+               m_cmdBuffer = vk::allocateCommandBuffer(m_vk, device, &cmdBufferAllocateInfo);
        }
 
        virtual tcu::TestStatus iterate (void)
@@ -340,7 +328,7 @@ protected:
                m_vk.beginCommandBuffer(*m_cmdBuffer, &beginInfo);
 
                initialTransitionColor2DImage(m_vk, *m_cmdBuffer, m_colorTargetImage->object(), vk::VK_IMAGE_LAYOUT_GENERAL);
-               initialTransitionDepthStencil2DImage(m_vk, *m_cmdBuffer, m_depthStencilImage->object(), vk::VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL);
+               initialTransitionDepthStencil2DImage(m_vk, *m_cmdBuffer, m_depthStencilImage->object(), vk::VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
 
                const ImageSubresourceRange subresourceRangeImage(vk::VK_IMAGE_ASPECT_COLOR_BIT);
                m_vk.cmdClearColorImage(*m_cmdBuffer, m_colorTargetImage->object(),
@@ -350,19 +338,19 @@ protected:
 
                const ImageSubresourceRange subresourceRangeDepthStencil[2] = { vk::VK_IMAGE_ASPECT_DEPTH_BIT, vk::VK_IMAGE_ASPECT_STENCIL_BIT };
                m_vk.cmdClearDepthStencilImage(*m_cmdBuffer, m_depthStencilImage->object(),
-                       vk::VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL, &depthStencilClearValue, 2, subresourceRangeDepthStencil);
+                       vk::VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &depthStencilClearValue, 2, subresourceRangeDepthStencil);
 
                const vk::VkRect2D renderArea = { { 0, 0 }, { WIDTH, HEIGHT } };
                const RenderPassBeginInfo renderPassBegin(*m_renderPass, *m_framebuffer, renderArea);
 
-               m_vk.cmdBeginRenderPass(*m_cmdBuffer, &renderPassBegin, vk::VK_RENDER_PASS_CONTENTS_INLINE);
+               m_vk.cmdBeginRenderPass(*m_cmdBuffer, &renderPassBegin, vk::VK_SUBPASS_CONTENTS_INLINE);
        }
 
        void setDynamicViewportState (const deUint32 width, const deUint32 height)
        {
                vk::VkViewport viewport;
-               viewport.originX = 0;
-               viewport.originY = 0;
+               viewport.x = 0;
+               viewport.y = 0;
                viewport.width = static_cast<float>(width);
                viewport.height = static_cast<float>(height);
                viewport.minDepth = 0.0f;
@@ -384,20 +372,20 @@ protected:
                m_vk.cmdSetScissor(*m_cmdBuffer, viewportCount, pScissors);
        }
 
-       void setDynamicRasterState(const float lineWidth = 1.0f,
-                                                          const float depthBias = 0.0f,
+       void setDynamicRasterizationState(const float lineWidth = 1.0f,
+                                                          const float depthBiasConstantFactor = 0.0f,
                                                           const float depthBiasClamp = 0.0f,
-                                                          const float slopeScaledDepthBias = 0.0f)
+                                                          const float depthBiasSlopeFactor = 0.0f)
        {
                m_vk.cmdSetLineWidth(*m_cmdBuffer, lineWidth);
-               m_vk.cmdSetDepthBias(*m_cmdBuffer, depthBias, depthBiasClamp, slopeScaledDepthBias);
+               m_vk.cmdSetDepthBias(*m_cmdBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor);
        }
 
        void setDynamicBlendState(const float const1 = 0.0f, const float const2 = 0.0f,
                                                          const float const3 = 0.0f, const float const4 = 0.0f)
        {
-               float blendConstants[4] = { const1, const2, const3, const4 };
-               m_vk.cmdSetBlendConstants(*m_cmdBuffer, blendConstants);
+               float blendConstantsants[4] = { const1, const2, const3, const4 };
+               m_vk.cmdSetBlendConstants(*m_cmdBuffer, blendConstantsants);
        }
 
        void setDynamicDepthStencilState(const float minDepthBounds = -1.0f, 
@@ -465,7 +453,7 @@ public:
 
                // set states here
                setDynamicViewportState(WIDTH, HEIGHT);
-               setDynamicRasterState();
+               setDynamicRasterizationState();
                setDynamicBlendState();
                setDynamicDepthStencilState(0.5f, 0.75f);
 
@@ -483,8 +471,18 @@ public:
                m_vk.cmdEndRenderPass(*m_cmdBuffer);
                m_vk.endCommandBuffer(*m_cmdBuffer);
 
-               const vk::VkCmdBuffer cmdBuffer = *m_cmdBuffer;
-               VK_CHECK(m_vk.queueSubmit(queue, 1, &cmdBuffer, DE_NULL));
+               vk::VkSubmitInfo submitInfo =
+               {
+                       vk::VK_STRUCTURE_TYPE_SUBMIT_INFO,      // VkStructureType                      sType;
+                       DE_NULL,                                                        // const void*                          pNext;
+                       0,                                                                      // deUint32                                     waitSemaphoreCount;
+                       DE_NULL,                                                        // const VkSemaphore*           pWaitSemaphores;
+                       1,                                                                      // deUint32                                     commandBufferCount;
+                       &m_cmdBuffer.get(),                                     // const VkCommandBuffer*       pCommandBuffers;
+                       0,                                                                      // deUint32                                     signalSemaphoreCount;
+                       DE_NULL                                                         // const VkSemaphore*           pSignalSemaphores;
+               };
+               m_vk.queueSubmit(queue, 1, &submitInfo, DE_NULL);
 
                // validation
                {
@@ -515,7 +513,7 @@ public:
 
                        const vk::VkOffset3D zeroOffset = { 0, 0, 0 };
                        const tcu::ConstPixelBufferAccess renderedFrame = m_colorTargetImage->readSurface(queue, m_context.getDefaultAllocator(),
-                               vk::VK_IMAGE_LAYOUT_GENERAL, zeroOffset, WIDTH, HEIGHT, vk::VK_IMAGE_ASPECT_COLOR);
+                               vk::VK_IMAGE_LAYOUT_GENERAL, zeroOffset, WIDTH, HEIGHT, vk::VK_IMAGE_ASPECT_COLOR_BIT);
 
                        qpTestResult res = QP_TEST_RESULT_PASS;
 
@@ -608,7 +606,7 @@ public:
 
                // set states here
                setDynamicViewportState(WIDTH, HEIGHT);
-               setDynamicRasterState();
+               setDynamicRasterizationState();
                setDynamicBlendState();
 
                const vk::VkDeviceSize vertexBufferOffset = 0;
@@ -626,8 +624,18 @@ public:
                m_vk.cmdEndRenderPass(*m_cmdBuffer);
                m_vk.endCommandBuffer(*m_cmdBuffer);
 
-               const vk::VkCmdBuffer cmdBuffer = *m_cmdBuffer;
-               VK_CHECK(m_vk.queueSubmit(queue, 1, &cmdBuffer, DE_NULL));
+               vk::VkSubmitInfo submitInfo =
+               {
+                       vk::VK_STRUCTURE_TYPE_SUBMIT_INFO,      // VkStructureType                      sType;
+                       DE_NULL,                                                        // const void*                          pNext;
+                       0,                                                                      // deUint32                                     waitSemaphoreCount;
+                       DE_NULL,                                                        // const VkSemaphore*           pWaitSemaphores;
+                       1,                                                                      // deUint32                                     commandBufferCount;
+                       &m_cmdBuffer.get(),                                     // const VkCommandBuffer*       pCommandBuffers;
+                       0,                                                                      // deUint32                                     signalSemaphoreCount;
+                       DE_NULL                                                         // const VkSemaphore*           pSignalSemaphores;
+               };
+               m_vk.queueSubmit(queue, 1, &submitInfo, DE_NULL);
 
                // validation
                {
@@ -654,7 +662,7 @@ public:
 
                        const vk::VkOffset3D zeroOffset = { 0, 0, 0 };
                        const tcu::ConstPixelBufferAccess renderedFrame = m_colorTargetImage->readSurface(queue, m_context.getDefaultAllocator(),
-                               vk::VK_IMAGE_LAYOUT_GENERAL, zeroOffset, WIDTH, HEIGHT, vk::VK_IMAGE_ASPECT_COLOR);
+                               vk::VK_IMAGE_LAYOUT_GENERAL, zeroOffset, WIDTH, HEIGHT, vk::VK_IMAGE_ASPECT_COLOR_BIT);
 
                        qpTestResult res = QP_TEST_RESULT_PASS;
 
@@ -769,7 +777,7 @@ public:
 
                // set states here
                setDynamicViewportState(WIDTH, HEIGHT);
-               setDynamicRasterState();
+               setDynamicRasterizationState();
                setDynamicBlendState();
 
                const vk::VkDeviceSize vertexBufferOffset = 0;
@@ -787,8 +795,18 @@ public:
                m_vk.cmdEndRenderPass(*m_cmdBuffer);
                m_vk.endCommandBuffer(*m_cmdBuffer);
 
-               const vk::VkCmdBuffer cmdBuffer = *m_cmdBuffer;
-               VK_CHECK(m_vk.queueSubmit(queue, 1, &cmdBuffer, DE_NULL));
+               vk::VkSubmitInfo submitInfo =
+               {
+                       vk::VK_STRUCTURE_TYPE_SUBMIT_INFO,      // VkStructureType                      sType;
+                       DE_NULL,                                                        // const void*                          pNext;
+                       0,                                                                      // deUint32                                     waitSemaphoreCount;
+                       DE_NULL,                                                        // const VkSemaphore*           pWaitSemaphores;
+                       1,                                                                      // deUint32                                     commandBufferCount;
+                       &m_cmdBuffer.get(),                                     // const VkCommandBuffer*       pCommandBuffers;
+                       0,                                                                      // deUint32                                     signalSemaphoreCount;
+                       DE_NULL                                                         // const VkSemaphore*           pSignalSemaphores;
+               };
+               m_vk.queueSubmit(queue, 1, &submitInfo, DE_NULL);
 
                // validation
                {
@@ -817,7 +835,7 @@ public:
 
                        const vk::VkOffset3D zeroOffset = { 0, 0, 0 };
                        const tcu::ConstPixelBufferAccess renderedFrame = m_colorTargetImage->readSurface(queue, m_context.getDefaultAllocator(),
-                               vk::VK_IMAGE_LAYOUT_GENERAL, zeroOffset, WIDTH, HEIGHT, vk::VK_IMAGE_ASPECT_COLOR);
+                               vk::VK_IMAGE_LAYOUT_GENERAL, zeroOffset, WIDTH, HEIGHT, vk::VK_IMAGE_ASPECT_COLOR_BIT);
 
                        qpTestResult res = QP_TEST_RESULT_PASS;
 
@@ -38,6 +38,9 @@
 #include "vktTestCaseUtil.hpp"
 #include "vktDynamicStateTestCaseUtil.hpp"
 #include "vktDynamicStateBaseClass.hpp"
+#include "vktDynamicStateCreateInfoUtil.hpp"
+#include "vktDynamicStateImageObjectUtil.hpp"
+#include "vktDynamicStateBufferObjectUtil.hpp"
 
 #include "tcuTestLog.hpp"
 #include "tcuResource.hpp"
@@ -45,8 +48,6 @@
 #include "tcuTextureUtil.hpp"
 
 #include "vkDefs.hpp"
-#include "vktDynamicStateCreateInfoUtil.hpp"
-#include "vktDynamicStateImageObjectUtil.hpp"
 
 namespace vkt
 {
@@ -83,7 +84,7 @@ public:
                vk::VkRect2D scissor_1 = { { 0, 0 }, { WIDTH / 2, HEIGHT / 2 } };
                vk::VkRect2D scissor_2 = { { WIDTH / 2, HEIGHT / 2 }, { WIDTH / 2, HEIGHT / 2 } };
 
-               setDynamicRasterState();
+               setDynamicRasterizationState();
                setDynamicBlendState();
                setDynamicDepthStencilState();
 
@@ -104,8 +105,18 @@ public:
                m_vk.cmdEndRenderPass(*m_cmdBuffer);
                m_vk.endCommandBuffer(*m_cmdBuffer);
 
-               const vk::VkCmdBuffer cmdBuffer = *m_cmdBuffer;
-               VK_CHECK(m_vk.queueSubmit(queue, 1, &cmdBuffer, DE_NULL));
+               vk::VkSubmitInfo submitInfo =
+               {
+                       vk::VK_STRUCTURE_TYPE_SUBMIT_INFO,      // VkStructureType                      sType;\r
+                       DE_NULL,                                                        // const void*                          pNext;\r
+                       0,                                                                      // deUint32                                     waitSemaphoreCount;\r
+                       DE_NULL,                                                        // const VkSemaphore*           pWaitSemaphores;\r
+                       1,                                                                      // deUint32                                     commandBufferCount;\r
+                       &m_cmdBuffer.get(),                                     // const VkCommandBuffer*       pCommandBuffers;\r
+                       0,                                                                      // deUint32                                     signalSemaphoreCount;\r
+                       DE_NULL                                                         // const VkSemaphore*           pSignalSemaphores;\r
+               };
+               m_vk.queueSubmit(queue, 1, &submitInfo, DE_NULL);
 
                //validation
                VK_CHECK(m_vk.queueWaitIdle(queue));
@@ -134,7 +145,7 @@ public:
 
                const vk::VkOffset3D zeroOffset = { 0, 0, 0 };
                const tcu::ConstPixelBufferAccess renderedFrame = m_colorTargetImage->readSurface(queue, m_context.getDefaultAllocator(),
-                       vk::VK_IMAGE_LAYOUT_GENERAL, zeroOffset, WIDTH, HEIGHT, vk::VK_IMAGE_ASPECT_COLOR);
+                       vk::VK_IMAGE_LAYOUT_GENERAL, zeroOffset, WIDTH, HEIGHT, vk::VK_IMAGE_ASPECT_COLOR_BIT);
 
                qpTestResult res = QP_TEST_RESULT_PASS;
 
@@ -176,7 +187,7 @@ public:
                vk::VkRect2D scissor_1 = { { 0, 0 }, { WIDTH / 2, HEIGHT / 2 } };
                vk::VkRect2D scissor_2 = { { WIDTH / 2, HEIGHT / 2 }, { WIDTH / 2, HEIGHT / 2 } };
 
-               setDynamicRasterState();
+               setDynamicRasterizationState();
                setDynamicBlendState();
                setDynamicDepthStencilState();
                setDynamicViewportState(1, &viewport, &scissor_1);
@@ -189,7 +200,7 @@ public:
 
                // rebind in different order
                setDynamicBlendState();
-               setDynamicRasterState();
+               setDynamicRasterizationState();
                setDynamicDepthStencilState();
 
                // bind first state
@@ -202,8 +213,18 @@ public:
                m_vk.cmdEndRenderPass(*m_cmdBuffer);
                m_vk.endCommandBuffer(*m_cmdBuffer);
 
-               const vk::VkCmdBuffer cmdBuffer = *m_cmdBuffer;
-               VK_CHECK(m_vk.queueSubmit(queue, 1, &cmdBuffer, DE_NULL));
+               vk::VkSubmitInfo submitInfo =
+               {
+                       vk::VK_STRUCTURE_TYPE_SUBMIT_INFO,      // VkStructureType                      sType;\r
+                       DE_NULL,                                                        // const void*                          pNext;\r
+                       0,                                                                      // deUint32                                     waitSemaphoreCount;\r
+                       DE_NULL,                                                        // const VkSemaphore*           pWaitSemaphores;\r
+                       1,                                                                      // deUint32                                     commandBufferCount;\r
+                       &m_cmdBuffer.get(),                                     // const VkCommandBuffer*       pCommandBuffers;\r
+                       0,                                                                      // deUint32                                     signalSemaphoreCount;\r
+                       DE_NULL                                                         // const VkSemaphore*           pSignalSemaphores;\r
+               };
+               m_vk.queueSubmit(queue, 1, &submitInfo, DE_NULL);
 
                //validation
                VK_CHECK(m_vk.queueWaitIdle(queue));
@@ -232,7 +253,7 @@ public:
 
                const vk::VkOffset3D zeroOffset = { 0, 0, 0 };
                const tcu::ConstPixelBufferAccess renderedFrame = m_colorTargetImage->readSurface(queue, m_context.getDefaultAllocator(),
-                       vk::VK_IMAGE_LAYOUT_GENERAL, zeroOffset, WIDTH, HEIGHT, vk::VK_IMAGE_ASPECT_COLOR);
+                       vk::VK_IMAGE_LAYOUT_GENERAL, zeroOffset, WIDTH, HEIGHT, vk::VK_IMAGE_ASPECT_COLOR_BIT);
 
                qpTestResult res = QP_TEST_RESULT_PASS;
 
@@ -272,19 +293,14 @@ public:
        virtual void initPipeline (const vk::VkDevice device)
        {
                // shaders
-               const vk::Unique<vk::VkShader> vs(createShader(m_vk, device,
-                       *createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_vertexShaderName), 0),
-                       "main", vk::VK_SHADER_STAGE_VERTEX));
-
-               const vk::Unique<vk::VkShader> fs(createShader(m_vk, device,
-                       *createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_fragmentShaderName), 0),
-                       "main", vk::VK_SHADER_STAGE_FRAGMENT));
-
+               const vk::Unique<vk::VkShaderModule> vs (createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_vertexShaderName), 0));
+               const vk::Unique<vk::VkShaderModule> fs (createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_fragmentShaderName), 0));
+                       
                const PipelineCreateInfo::ColorBlendState::Attachment vkCbAttachmentState;
 
                PipelineCreateInfo pipelineCreateInfo_1(*m_pipelineLayout, *m_renderPass, 0, 0);
-               pipelineCreateInfo_1.addShader(PipelineCreateInfo::PipelineShaderStage(*vs, vk::VK_SHADER_STAGE_VERTEX));
-               pipelineCreateInfo_1.addShader(PipelineCreateInfo::PipelineShaderStage(*fs, vk::VK_SHADER_STAGE_FRAGMENT));
+               pipelineCreateInfo_1.addShader(PipelineCreateInfo::PipelineShaderStage(*vs, "main", vk::VK_SHADER_STAGE_VERTEX_BIT));
+               pipelineCreateInfo_1.addShader(PipelineCreateInfo::PipelineShaderStage(*fs, "main", vk::VK_SHADER_STAGE_FRAGMENT_BIT));
                pipelineCreateInfo_1.addState(PipelineCreateInfo::VertexInputState(m_vertexInputState));
                pipelineCreateInfo_1.addState(PipelineCreateInfo::InputAssemblerState(vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP));
                pipelineCreateInfo_1.addState(PipelineCreateInfo::ColorBlendState(1, &vkCbAttachmentState));
@@ -295,8 +311,8 @@ public:
                pipelineCreateInfo_1.addState(PipelineCreateInfo::DynamicState());
 
                PipelineCreateInfo pipelineCreateInfo_2(*m_pipelineLayout, *m_renderPass, 0, 0);
-               pipelineCreateInfo_2.addShader(PipelineCreateInfo::PipelineShaderStage(*vs, vk::VK_SHADER_STAGE_VERTEX));
-               pipelineCreateInfo_2.addShader(PipelineCreateInfo::PipelineShaderStage(*fs, vk::VK_SHADER_STAGE_FRAGMENT));
+               pipelineCreateInfo_2.addShader(PipelineCreateInfo::PipelineShaderStage(*vs, "main", vk::VK_SHADER_STAGE_VERTEX_BIT));
+               pipelineCreateInfo_2.addShader(PipelineCreateInfo::PipelineShaderStage(*fs, "main", vk::VK_SHADER_STAGE_FRAGMENT_BIT));
                pipelineCreateInfo_2.addState(PipelineCreateInfo::VertexInputState(m_vertexInputState));
                pipelineCreateInfo_2.addState(PipelineCreateInfo::InputAssemblerState(vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST));
                pipelineCreateInfo_2.addState(PipelineCreateInfo::ColorBlendState(1, &vkCbAttachmentState));
@@ -322,7 +338,7 @@ public:
                const vk::VkRect2D scissor_1 = { { 0, 0 }, { WIDTH / 2, HEIGHT / 2 } };
                const vk::VkRect2D scissor_2 = { { WIDTH / 2, HEIGHT / 2 }, { WIDTH / 2, HEIGHT / 2 } };
 
-               setDynamicRasterState();
+               setDynamicRasterizationState();
                setDynamicBlendState();
                setDynamicDepthStencilState();
 
@@ -347,8 +363,18 @@ public:
                m_vk.cmdEndRenderPass(*m_cmdBuffer);
                m_vk.endCommandBuffer(*m_cmdBuffer);
 
-               const vk::VkCmdBuffer cmdBuffer = *m_cmdBuffer;
-               VK_CHECK(m_vk.queueSubmit(queue, 1, &cmdBuffer, DE_NULL));
+               vk::VkSubmitInfo submitInfo =
+               {
+                       vk::VK_STRUCTURE_TYPE_SUBMIT_INFO,      // VkStructureType                      sType;\r
+                       DE_NULL,                                                        // const void*                          pNext;\r
+                       0,                                                                      // deUint32                                     waitSemaphoreCount;\r
+                       DE_NULL,                                                        // const VkSemaphore*           pWaitSemaphores;\r
+                       1,                                                                      // deUint32                                     commandBufferCount;\r
+                       &m_cmdBuffer.get(),                                     // const VkCommandBuffer*       pCommandBuffers;\r
+                       0,                                                                      // deUint32                                     signalSemaphoreCount;\r
+                       DE_NULL                                                         // const VkSemaphore*           pSignalSemaphores;\r
+               };
+               m_vk.queueSubmit(queue, 1, &submitInfo, DE_NULL);
 
                //validation
                VK_CHECK(m_vk.queueWaitIdle(queue));
@@ -378,7 +404,7 @@ public:
 
                const vk::VkOffset3D zeroOffset = { 0, 0, 0 };
                const tcu::ConstPixelBufferAccess renderedFrame = m_colorTargetImage->readSurface(queue, m_context.getDefaultAllocator(),
-                       vk::VK_IMAGE_LAYOUT_GENERAL, zeroOffset, WIDTH, HEIGHT, vk::VK_IMAGE_ASPECT_COLOR);
+                       vk::VK_IMAGE_LAYOUT_GENERAL, zeroOffset, WIDTH, HEIGHT, vk::VK_IMAGE_ASPECT_COLOR_BIT);
 
                qpTestResult res = QP_TEST_RESULT_PASS;
 
@@ -152,86 +152,86 @@ Image::Image (const vk::DeviceInterface &vk,
                          vk::VkDevice                          device,
                          vk::VkFormat                          format,
                          const vk::VkExtent3D          &extend,
-                         deUint32                                      mipLevels,
-                         deUint32                                      arraySize,
+                         deUint32                                      levelCount,
+                         deUint32                                      layerCount,
                          vk::Move<vk::VkImage>         object)
        : m_allocation          (DE_NULL)
        , m_object                      (object)
        , m_format                      (format)
        , m_extent                      (extend)
-       , m_mipLevels           (mipLevels)
-       , m_arraySize           (arraySize)
+       , m_levelCount          (levelCount)
+       , m_layerCount          (layerCount)
        , m_vk(vk)
        , m_device(device)
 {
 }
 
-tcu::ConstPixelBufferAccess Image::readSurface (vk::VkQueue                    queue,
-                                                                                               vk::Allocator           &allocator,
-                                                                                               vk::VkImageLayout       layout,
-                                                                                               vk::VkOffset3D          offset,
-                                                                                               int                                     width,
-                                                                                               int                                     height,
-                                                                                               vk::VkImageAspect       aspect,
-                                                                                               unsigned int            mipLevel,
-                                                                                               unsigned int            arrayElement)
+tcu::ConstPixelBufferAccess Image::readSurface (vk::VkQueue                                    queue,
+                                                                                               vk::Allocator&                          allocator,
+                                                                                               vk::VkImageLayout                       layout,
+                                                                                               vk::VkOffset3D                          offset,
+                                                                                               int                                                     width,
+                                                                                               int                                                     height,
+                                                                                               vk::VkImageAspectFlagBits       aspect,
+                                                                                               unsigned int                            mipLevel,
+                                                                                               unsigned int                            arrayElement)
 {
        m_pixelAccessData.resize(width * height * vk::mapVkFormat(m_format).getPixelSize());
-       memset(m_pixelAccessData.data(), 0, m_pixelAccessData.size());
-       if (aspect == vk::VK_IMAGE_ASPECT_COLOR)
+       deMemset(m_pixelAccessData.data(), 0, m_pixelAccessData.size());
+       if (aspect == vk::VK_IMAGE_ASPECT_COLOR_BIT)
        {
                read(queue, allocator, layout, offset, width, height, 1, mipLevel, arrayElement, aspect, vk::VK_IMAGE_TYPE_2D,
                m_pixelAccessData.data());
        }
-       if (aspect == vk::VK_IMAGE_ASPECT_DEPTH || aspect == vk::VK_IMAGE_ASPECT_STENCIL)
+       if (aspect == vk::VK_IMAGE_ASPECT_DEPTH_BIT || aspect == vk::VK_IMAGE_ASPECT_STENCIL_BIT)
        {
                readUsingBuffer(queue, allocator, layout, offset, width, height, 1, mipLevel, arrayElement, aspect, m_pixelAccessData.data());
        }
        return tcu::ConstPixelBufferAccess(vk::mapVkFormat(m_format), width, height, 1, m_pixelAccessData.data());
 }
 
-tcu::ConstPixelBufferAccess Image::readVolume (vk::VkQueue                     queue,
-                                                                                          vk::Allocator                &allocator,
-                                                                                          vk::VkImageLayout    layout,
-                                                                                          vk::VkOffset3D               offset,
-                                                                                          int                                  width,
-                                                                                          int                                  height,
-                                                                                          int                                  depth,
-                                                                                          vk::VkImageAspect    aspect,
-                                                                                          unsigned int                 mipLevel,
-                                                                                          unsigned int                 arrayElement)
+tcu::ConstPixelBufferAccess Image::readVolume (vk::VkQueue                                     queue,
+                                                                                          vk::Allocator&                               allocator,
+                                                                                          vk::VkImageLayout                    layout,
+                                                                                          vk::VkOffset3D                               offset,
+                                                                                          int                                                  width,
+                                                                                          int                                                  height,
+                                                                                          int                                                  depth,
+                                                                                          vk::VkImageAspectFlagBits    aspect,
+                                                                                          unsigned int                                 mipLevel,
+                                                                                          unsigned int                                 arrayElement)
 {
        m_pixelAccessData.resize(width * height * depth * vk::mapVkFormat(m_format).getPixelSize());
-       memset(m_pixelAccessData.data(), 0, m_pixelAccessData.size());
-       if (aspect == vk::VK_IMAGE_ASPECT_COLOR)
+       deMemset(m_pixelAccessData.data(), 0, m_pixelAccessData.size());
+       if (aspect == vk::VK_IMAGE_ASPECT_COLOR_BIT)
        {
                read(queue, allocator, layout, offset, width, height, depth, mipLevel, arrayElement, aspect, vk::VK_IMAGE_TYPE_3D,
                m_pixelAccessData.data());
        }
-       if (aspect == vk::VK_IMAGE_ASPECT_DEPTH || aspect == vk::VK_IMAGE_ASPECT_STENCIL)
+       if (aspect == vk::VK_IMAGE_ASPECT_DEPTH_BIT || aspect == vk::VK_IMAGE_ASPECT_STENCIL_BIT)
        {
                readUsingBuffer(queue, allocator, layout, offset, width, height, depth, mipLevel, arrayElement, aspect, m_pixelAccessData.data());
        }
        return tcu::ConstPixelBufferAccess(vk::mapVkFormat(m_format), width, height, depth, m_pixelAccessData.data());
 }
 
-tcu::ConstPixelBufferAccess Image::readSurface1D(vk::VkQueue           queue,
-                                                                                                vk::Allocator          &allocator,
-                                                                                                vk::VkImageLayout      layout,
-                                                                                                vk::VkOffset3D         offset,
-                                                                                                int                            width,
-                                                                                                vk::VkImageAspect      aspect,
-                                                                                                unsigned int           mipLevel,
-                                                                                                unsigned int           arrayElement)
+tcu::ConstPixelBufferAccess Image::readSurface1D(vk::VkQueue                           queue,
+                                                                                                vk::Allocator&                         allocator,
+                                                                                                vk::VkImageLayout                      layout,
+                                                                                                vk::VkOffset3D                         offset,
+                                                                                                int                                            width,
+                                                                                                vk::VkImageAspectFlagBits      aspect,
+                                                                                                unsigned int                           mipLevel,
+                                                                                                unsigned int                           arrayElement)
 {
        m_pixelAccessData.resize(width * vk::mapVkFormat(m_format).getPixelSize());
-       memset(m_pixelAccessData.data(), 0, m_pixelAccessData.size());
-       if (aspect == vk::VK_IMAGE_ASPECT_COLOR)
+       deMemset(m_pixelAccessData.data(), 0, m_pixelAccessData.size());
+       if (aspect == vk::VK_IMAGE_ASPECT_COLOR_BIT)
        {
                read(queue, allocator, layout, offset, width, 1, 1, mipLevel, arrayElement, aspect, vk::VK_IMAGE_TYPE_1D,
                m_pixelAccessData.data());
        }
-       if (aspect == vk::VK_IMAGE_ASPECT_DEPTH || aspect == vk::VK_IMAGE_ASPECT_STENCIL)
+       if (aspect == vk::VK_IMAGE_ASPECT_DEPTH_BIT || aspect == vk::VK_IMAGE_ASPECT_STENCIL_BIT)
        {
                readUsingBuffer(queue, allocator, layout, offset, width, 1, 1, mipLevel, arrayElement, aspect,
                m_pixelAccessData.data());
@@ -239,20 +239,20 @@ tcu::ConstPixelBufferAccess Image::readSurface1D(vk::VkQueue              queue,
        return tcu::ConstPixelBufferAccess(vk::mapVkFormat(m_format), width, 1, 1, m_pixelAccessData.data());
 }
 
-void Image::read (vk::VkQueue                  queue,
-                                 vk::Allocator                 &allocator,
-                                 vk::VkImageLayout             layout,
-                                 vk::VkOffset3D                offset,
-                                 int                                   width,
-                                 int                                   height,
-                                 int                                   depth,
-                                 unsigned int                  mipLevel,
-                                 unsigned int                  arrayElement,
-                                 vk::VkImageAspect             aspect,
-                                 vk::VkImageType               type,
-                                 void *                                data)
+void Image::read (vk::VkQueue                                  queue,
+                                 vk::Allocator&                                allocator,
+                                 vk::VkImageLayout                             layout,
+                                 vk::VkOffset3D                                offset,
+                                 int                                                   width,
+                                 int                                                   height,
+                                 int                                                   depth,
+                                 unsigned int                                  mipLevel,
+                                 unsigned int                                  arrayElement,
+                                 vk::VkImageAspectFlagBits             aspect,
+                                 vk::VkImageType                               type,
+                                 void *                                                data)
 {
-       if (layout != vk::VK_IMAGE_LAYOUT_GENERAL && layout != vk::VK_IMAGE_LAYOUT_TRANSFER_SOURCE_OPTIMAL) 
+       if (layout != vk::VK_IMAGE_LAYOUT_GENERAL && layout != vk::VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL) 
                TCU_FAIL("Image::uploadFromSurface usage error: this function is not going to change Image layout!");
 
        de::SharedPtr<Image> stagingResource = copyToLinearImage(queue, allocator, layout, offset, width,
@@ -261,19 +261,19 @@ void Image::read (vk::VkQueue                     queue,
        stagingResource->readLinear(zeroOffset, width, height, depth, 0, 0, aspect, data);
 }
 
-void Image::readUsingBuffer (vk::VkQueue               queue,
-                                                        vk::Allocator          &allocator,
-                                                        vk::VkImageLayout      layout,
-                                                        vk::VkOffset3D         offset,
-                                                        int                            width,
-                                                        int                            height,
-                                                        int                            depth,
-                                                        unsigned int           mipLevel,
-                                                        unsigned int           arrayElement,
-                                                        vk::VkImageAspect      aspect,
-                                                        void *                         data)
+void Image::readUsingBuffer (vk::VkQueue                               queue,
+                                                        vk::Allocator&                         allocator,
+                                                        vk::VkImageLayout                      layout,
+                                                        vk::VkOffset3D                         offset,
+                                                        int                                            width,
+                                                        int                                            height,
+                                                        int                                            depth,
+                                                        unsigned int                           mipLevel,
+                                                        unsigned int                           arrayElement,
+                                                        vk::VkImageAspectFlagBits      aspect,
+                                                        void *                                         data)
 {
-       if (layout != vk::VK_IMAGE_LAYOUT_GENERAL && layout != vk::VK_IMAGE_LAYOUT_TRANSFER_SOURCE_OPTIMAL) 
+       if (layout != vk::VK_IMAGE_LAYOUT_GENERAL && layout != vk::VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL) 
                TCU_FAIL("Image::uploadFromSurface usage error: this function is not going to change Image layout!");
 
        de::SharedPtr<Buffer> stagingResource;
@@ -290,29 +290,36 @@ void Image::readUsingBuffer (vk::VkQueue          queue,
                switch (m_format)
                {
                        case vk::VK_FORMAT_D16_UNORM_S8_UINT:
-                               pixelSize = (aspect == vk::VK_IMAGE_ASPECT_DEPTH) ? 2 : 1;
+                               pixelSize = (aspect == vk::VK_IMAGE_ASPECT_DEPTH_BIT) ? 2 : 1;
                                break;
                        case  vk::VK_FORMAT_D32_SFLOAT_S8_UINT:
-                               pixelSize = (aspect == vk::VK_IMAGE_ASPECT_DEPTH) ? 4 : 1;
+                               pixelSize = (aspect == vk::VK_IMAGE_ASPECT_DEPTH_BIT) ? 4 : 1;
                                break;
-                       case vk::VK_FORMAT_D24_UNORM_X8:
+                       case vk::VK_FORMAT_X8_D24_UNORM_PACK32:
                        case vk::VK_FORMAT_D24_UNORM_S8_UINT:
-                               pixelSize = (aspect == vk::VK_IMAGE_ASPECT_DEPTH) ? 3 : 1;
+                               pixelSize = (aspect == vk::VK_IMAGE_ASPECT_DEPTH_BIT) ? 3 : 1;
                                break;
                }
                bufferSize = pixelSize*width*height*depth;
        }
 
-       BufferCreateInfo stagingBufferResourceCreateInfo(bufferSize, vk::VK_BUFFER_USAGE_TRANSFER_DESTINATION_BIT | vk::VK_BUFFER_USAGE_TRANSFER_SOURCE_BIT);
-       stagingResource = Buffer::CreateAndAlloc(m_vk, m_device, stagingBufferResourceCreateInfo, allocator, vk::MemoryRequirement::HostVisible);
+       BufferCreateInfo stagingBufferResourceCreateInfo(bufferSize, vk::VK_BUFFER_USAGE_TRANSFER_DST_BIT | vk::VK_BUFFER_USAGE_TRANSFER_SRC_BIT);
+       stagingResource = Buffer::createAndAlloc(m_vk, m_device, stagingBufferResourceCreateInfo, allocator, vk::MemoryRequirement::HostVisible);
 
        {
                #pragma message("Get queue family index")
                CmdPoolCreateInfo copyCmdPoolCreateInfo(0);
-               vk::Unique<vk::VkCmdPool> copyCmdPool(vk::createCommandPool(m_vk, m_device, &copyCmdPoolCreateInfo));
-
-               CmdBufferCreateInfo copyCmdBufCreateInfo(*copyCmdPool, vk::VK_CMD_BUFFER_LEVEL_PRIMARY, 0);
-               vk::Unique<vk::VkCmdBuffer> copyCmdBuffer(vk::createCommandBuffer(m_vk, m_device, &copyCmdBufCreateInfo));
+               vk::Unique<vk::VkCommandPool> copyCmdPool(vk::createCommandPool(m_vk, m_device, &copyCmdPoolCreateInfo));
+               
+               const vk::VkCommandBufferAllocateInfo cmdBufferAllocateInfo =
+               {
+                       vk::VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO,     // VkStructureType                      sType;
+                       DE_NULL,                                                                                        // const void*                          pNext;
+                       *copyCmdPool,                                                                           // VkCommandPool                        commandPool;
+                       vk::VK_COMMAND_BUFFER_LEVEL_PRIMARY,                            // VkCommandBufferLevel         level;
+                       1u,                                                                                                     // deUint32                                     bufferCount;
+               };
+               vk::Unique<vk::VkCommandBuffer> copyCmdBuffer(vk::allocateCommandBuffer(m_vk, m_device, &cmdBufferAllocateInfo));
 
                CmdBufferBeginInfo beginInfo;
                VK_CHECK(m_vk.beginCommandBuffer(*copyCmdBuffer, &beginInfo));
@@ -324,54 +331,26 @@ void Image::readUsingBuffer (vk::VkQueue          queue,
                        vk::VkImageMemoryBarrier barrier;
                        barrier.sType = vk::VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
                        barrier.pNext = DE_NULL;
-                       barrier.outputMask = 0;
-                       barrier.inputMask = 0;
+                       barrier.srcAccessMask = 0;
+                       barrier.dstAccessMask = 0;
                        barrier.oldLayout = vk::VK_IMAGE_LAYOUT_UNDEFINED;
                        barrier.newLayout = vk::VK_IMAGE_LAYOUT_GENERAL;
                        barrier.srcQueueFamilyIndex = vk::VK_QUEUE_FAMILY_IGNORED;
-                       barrier.destQueueFamilyIndex = vk::VK_QUEUE_FAMILY_IGNORED;
+                       barrier.dstQueueFamilyIndex = vk::VK_QUEUE_FAMILY_IGNORED;
                        barrier.image = object();
 
-                       vk::VkImageAspectFlags aspectMask = 0;
-                       if (aspect == vk::VK_IMAGE_ASPECT_COLOR)
-                       {
-                               aspectMask |= vk::VK_IMAGE_ASPECT_COLOR_BIT;
-                       }
-                       if (aspect == vk::VK_IMAGE_ASPECT_DEPTH)
-                       {
-                               aspectMask |= vk::VK_IMAGE_ASPECT_DEPTH_BIT;
-                       }
-                       if (aspect == vk::VK_IMAGE_ASPECT_STENCIL)
-                       {
-                               aspectMask |= vk::VK_IMAGE_ASPECT_STENCIL_BIT;
-                       }
-
-                       barrier.subresourceRange.aspectMask = aspectMask;
+                       barrier.subresourceRange.aspectMask = aspect;
                        barrier.subresourceRange.baseMipLevel = 0;
-                       barrier.subresourceRange.mipLevels = m_mipLevels;
+                       barrier.subresourceRange.levelCount = m_levelCount;
                        barrier.subresourceRange.baseArrayLayer = 0;
-                       barrier.subresourceRange.arraySize = m_arraySize;
+                       barrier.subresourceRange.layerCount = m_layerCount;
 
                        void* barriers[] = { &barrier };
 
-                       m_vk.cmdPipelineBarrier(*copyCmdBuffer, vk::VK_PIPELINE_STAGE_ALL_GRAPHICS, vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, 
+                       m_vk.cmdPipelineBarrier(*copyCmdBuffer, vk::VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, 
                                false, DE_LENGTH_OF_ARRAY(barriers), barriers);
                }
 
-               vk::VkImageAspectFlags aspectMask = 0;
-               if (aspect == vk::VK_IMAGE_ASPECT_COLOR)
-               {
-                       aspectMask |= vk::VK_IMAGE_ASPECT_COLOR_BIT;
-               }
-               if (aspect == vk::VK_IMAGE_ASPECT_DEPTH)
-               {
-                       aspectMask |= vk::VK_IMAGE_ASPECT_DEPTH_BIT;
-               }
-               if (aspect == vk::VK_IMAGE_ASPECT_STENCIL)
-               {
-                       aspectMask |= vk::VK_IMAGE_ASPECT_STENCIL_BIT;
-               }
-
                vk::VkBufferImageCopy region = 
                {
                        0, 0, 0,
@@ -383,7 +362,18 @@ void Image::readUsingBuffer (vk::VkQueue           queue,
                m_vk.cmdCopyImageToBuffer(*copyCmdBuffer, object(), layout, stagingResource->object(), 1, &region);
                VK_CHECK(m_vk.endCommandBuffer(*copyCmdBuffer));
 
-               VK_CHECK(m_vk.queueSubmit(queue, 1, &copyCmdBuffer.get(), DE_NULL));
+               vk::VkSubmitInfo submitInfo =
+               {
+                       vk::VK_STRUCTURE_TYPE_SUBMIT_INFO,      // VkStructureType                      sType;\r
+                       DE_NULL,                                                        // const void*                          pNext;\r
+                       0,                                                                      // deUint32                                     waitSemaphoreCount;\r
+                       DE_NULL,                                                        // const VkSemaphore*           pWaitSemaphores;\r
+                       1,                                                                      // deUint32                                     commandBufferCount;\r
+                       &copyCmdBuffer.get(),                           // const VkCommandBuffer*       pCommandBuffers;\r
+                       0,                                                                      // deUint32                                     signalSemaphoreCount;\r
+                       DE_NULL                                                         // const VkSemaphore*           pSignalSemaphores;\r
+               };
+               m_vk.queueSubmit(queue, 1, &submitInfo, DE_NULL);
 
                // TODO: make this less intrusive
                VK_CHECK(m_vk.queueWaitIdle(queue));
@@ -393,33 +383,33 @@ void Image::readUsingBuffer (vk::VkQueue          queue,
        deMemcpy(data, destPtr, bufferSize);
 }
 
-tcu::ConstPixelBufferAccess Image::readSurfaceLinear (vk::VkOffset3D           offset,
-                                                                                                         int                                   width,
-                                                                                                         int                                   height,
-                                                                                                         int                                   depth,
-                                                                                                         vk::VkImageAspect             aspect,
-                                                                                                         unsigned int                  mipLevel,
-                                                                                                         unsigned int                  arrayElement)
+tcu::ConstPixelBufferAccess Image::readSurfaceLinear (vk::VkOffset3D                           offset,
+                                                                                                         int                                                   width,
+                                                                                                         int                                                   height,
+                                                                                                         int                                                   depth,
+                                                                                                         vk::VkImageAspectFlagBits             aspect,
+                                                                                                         unsigned int                                  mipLevel,
+                                                                                                         unsigned int                                  arrayElement)
 {
        m_pixelAccessData.resize(width * height * vk::mapVkFormat(m_format).getPixelSize());
        readLinear(offset, width, height, depth, mipLevel, arrayElement, aspect, m_pixelAccessData.data());
        return tcu::ConstPixelBufferAccess(vk::mapVkFormat(m_format), width, height, 1, m_pixelAccessData.data());
 }
 
-void Image::readLinear (vk::VkOffset3D         offset,
-                                               int                                     width,
-                                               int                                     height,
-                                               int                                     depth,
-                                               unsigned int            mipLevel,
-                                               unsigned int            arrayElement,
-                                               vk::VkImageAspect       aspect,
-                                               void *                          data)
+void Image::readLinear (vk::VkOffset3D                         offset,
+                                               int                                                     width,
+                                               int                                                     height,
+                                               int                                                     depth,
+                                               unsigned int                            mipLevel,
+                                               unsigned int                            arrayElement,
+                                               vk::VkImageAspectFlagBits       aspect,
+                                               void *                                          data)
 {
        vk::VkImageSubresource imageSubResource = { aspect, mipLevel, arrayElement };
 
        vk::VkSubresourceLayout imageLayout = {};
 
-       VK_CHECK(m_vk.getImageSubresourceLayout(m_device, object(), &imageSubResource, &imageLayout));
+       m_vk.getImageSubresourceLayout(m_device, object(), &imageSubResource, &imageLayout);
 
        const char* srcPtr = reinterpret_cast<const char*>(getBoundMemory().getHostPtr());
        srcPtr += imageLayout.offset + getPixelOffset(offset, imageLayout.rowPitch, imageLayout.depthPitch, mipLevel, arrayElement);
@@ -428,54 +418,46 @@ void Image::readLinear (vk::VkOffset3D            offset,
                imageLayout.rowPitch, imageLayout.depthPitch, srcPtr, data);
 }
 
-de::SharedPtr<Image> Image::copyToLinearImage (vk::VkQueue                     queue,
-                                                                                          vk::Allocator                &allocator,
-                                                                                          vk::VkImageLayout    layout,
-                                                                                          vk::VkOffset3D               offset,
-                                                                                          int                                  width,
-                                                                                          int                                  height,
-                                                                                          int                                  depth,
-                                                                                          unsigned int                 mipLevel,
-                                                                                          unsigned int                 arrayElement,
-                                                                                          vk::VkImageAspect    aspect,
-                                                                                          vk::VkImageType              type)
+de::SharedPtr<Image> Image::copyToLinearImage (vk::VkQueue                                     queue,
+                                                                                          vk::Allocator&                               allocator,
+                                                                                          vk::VkImageLayout                    layout,
+                                                                                          vk::VkOffset3D                               offset,
+                                                                                          int                                                  width,
+                                                                                          int                                                  height,
+                                                                                          int                                                  depth,
+                                                                                          unsigned int                                 mipLevel,
+                                                                                          unsigned int                                 arrayElement,
+                                                                                          vk::VkImageAspectFlagBits    aspect,
+                                                                                          vk::VkImageType                              type)
 {
        de::SharedPtr<Image> stagingResource;
        {
                vk::VkExtent3D stagingExtent = {width, height, depth};
                ImageCreateInfo stagingResourceCreateInfo(
-                       type, m_format, stagingExtent, 1, 1, 1,
-                       vk::VK_IMAGE_TILING_LINEAR, vk::VK_IMAGE_USAGE_TRANSFER_DESTINATION_BIT);
+                       type, m_format, stagingExtent, 1, 1, vk::VK_SAMPLE_COUNT_1_BIT,
+                       vk::VK_IMAGE_TILING_LINEAR, vk::VK_IMAGE_USAGE_TRANSFER_DST_BIT);
 
-               stagingResource = Image::CreateAndAlloc(m_vk, m_device, stagingResourceCreateInfo, allocator,
+               stagingResource = Image::createAndAlloc(m_vk, m_device, stagingResourceCreateInfo, allocator,
                        vk::MemoryRequirement::HostVisible);
 
                #pragma message("Get queue family index")
                CmdPoolCreateInfo copyCmdPoolCreateInfo(0);
-               vk::Unique<vk::VkCmdPool> copyCmdPool(vk::createCommandPool(m_vk, m_device, &copyCmdPoolCreateInfo));
+               vk::Unique<vk::VkCommandPool> copyCmdPool(vk::createCommandPool(m_vk, m_device, &copyCmdPoolCreateInfo));
 
-               CmdBufferCreateInfo copyCmdBufCreateInfo(*copyCmdPool, vk::VK_CMD_BUFFER_LEVEL_PRIMARY, 0);
-               vk::Unique<vk::VkCmdBuffer> copyCmdBuffer(vk::createCommandBuffer(m_vk, m_device, &copyCmdBufCreateInfo));
+               const vk::VkCommandBufferAllocateInfo cmdBufferAllocateInfo =
+               {
+                       vk::VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO,     // VkStructureType                      sType;
+                       DE_NULL,                                                                                        // const void*                          pNext;
+                       *copyCmdPool,                                                                           // VkCommandPool                        commandPool;
+                       vk::VK_COMMAND_BUFFER_LEVEL_PRIMARY,                            // VkCommandBufferLevel         level;
+                       1u,                                                                                                     // deUint32                                     bufferCount;
+               };
+               vk::Unique<vk::VkCommandBuffer> copyCmdBuffer(vk::allocateCommandBuffer(m_vk, m_device, &cmdBufferAllocateInfo));
 
                CmdBufferBeginInfo beginInfo;
                VK_CHECK(m_vk.beginCommandBuffer(*copyCmdBuffer, &beginInfo));
 
-
-               vk::VkImageAspectFlags aspectMask = 0;
-               if (aspect == vk::VK_IMAGE_ASPECT_COLOR)
-               {
-                       aspectMask |= vk::VK_IMAGE_ASPECT_COLOR_BIT;
-               }
-               if (aspect == vk::VK_IMAGE_ASPECT_DEPTH)
-               {
-                       aspectMask |= vk::VK_IMAGE_ASPECT_DEPTH_BIT;
-               }
-               if (aspect == vk::VK_IMAGE_ASPECT_STENCIL)
-               {
-                       aspectMask |= vk::VK_IMAGE_ASPECT_STENCIL_BIT;
-               }
-
-               transition2DImage(m_vk, *copyCmdBuffer, stagingResource->object(), aspectMask, vk::VK_IMAGE_LAYOUT_UNDEFINED, vk::VK_IMAGE_LAYOUT_GENERAL);
+               transition2DImage(m_vk, *copyCmdBuffer, stagingResource->object(), aspect, vk::VK_IMAGE_LAYOUT_UNDEFINED, vk::VK_IMAGE_LAYOUT_GENERAL);
 
                const vk::VkOffset3D zeroOffset = { 0, 0, 0 };
                vk::VkImageCopy region = { {aspect, mipLevel, arrayElement, 1}, offset, {aspect, 0, 0, 1}, zeroOffset, {width, height, depth} };
@@ -483,7 +465,18 @@ de::SharedPtr<Image> Image::copyToLinearImage (vk::VkQueue                 queue,
                m_vk.cmdCopyImage(*copyCmdBuffer, object(), layout, stagingResource->object(), vk::VK_IMAGE_LAYOUT_GENERAL, 1, &region);
                VK_CHECK(m_vk.endCommandBuffer(*copyCmdBuffer));
 
-               VK_CHECK(m_vk.queueSubmit(queue, 1, &copyCmdBuffer.get(), DE_NULL));
+               vk::VkSubmitInfo submitInfo =
+               {
+                       vk::VK_STRUCTURE_TYPE_SUBMIT_INFO,      // VkStructureType                      sType;\r
+                       DE_NULL,                                                        // const void*                          pNext;\r
+                       0,                                                                      // deUint32                                     waitSemaphoreCount;\r
+                       DE_NULL,                                                        // const VkSemaphore*           pWaitSemaphores;\r
+                       1,                                                                      // deUint32                                     commandBufferCount;\r
+                       &copyCmdBuffer.get(),                           // const VkCommandBuffer*       pCommandBuffers;\r
+                       0,                                                                      // deUint32                                     signalSemaphoreCount;\r
+                       DE_NULL                                                         // const VkSemaphore*           pSignalSemaphores;\r
+               };
+               m_vk.queueSubmit(queue, 1, &submitInfo, DE_NULL);
 
                // TODO: make this less intrusive
                VK_CHECK(m_vk.queueWaitIdle(queue));
@@ -491,101 +484,101 @@ de::SharedPtr<Image> Image::copyToLinearImage (vk::VkQueue                      queue,
        return stagingResource;
 }
 
-void Image::uploadVolume(const tcu::ConstPixelBufferAccess     &access,
+void Image::uploadVolume(const tcu::ConstPixelBufferAccess&    access,
                                                 vk::VkQueue                                            queue,
-                                                vk::Allocator                                          &allocator,
+                                                vk::Allocator&                                                 allocator,
                                                 vk::VkImageLayout                                      layout,
                                                 vk::VkOffset3D                                         offset,
-                                                vk::VkImageAspect                                      aspect,
+                                                vk::VkImageAspectFlagBits                      aspect,
                                                 unsigned int                                           mipLevel,
                                                 unsigned int                                           arrayElement)
 {
-       if (aspect == vk::VK_IMAGE_ASPECT_COLOR)
+       if (aspect == vk::VK_IMAGE_ASPECT_COLOR_BIT)
        {
                upload(queue, allocator, layout, offset, access.getWidth(),
                access.getHeight(), access.getDepth(), mipLevel, arrayElement, aspect, vk::VK_IMAGE_TYPE_3D,
                access.getDataPtr());
        }
-       if (aspect == vk::VK_IMAGE_ASPECT_DEPTH || aspect == vk::VK_IMAGE_ASPECT_STENCIL)
+       if (aspect == vk::VK_IMAGE_ASPECT_DEPTH_BIT || aspect == vk::VK_IMAGE_ASPECT_STENCIL_BIT)
        {
                uploadUsingBuffer(queue, allocator, layout, offset, access.getWidth(),
                access.getHeight(), access.getDepth(), mipLevel, arrayElement, aspect, access.getDataPtr());
        }
 }
 
-void Image::uploadSurface (const tcu::ConstPixelBufferAccess   &access,
+void Image::uploadSurface (const tcu::ConstPixelBufferAccess&  access,
                                                   vk::VkQueue                                                  queue,
-                                                  vk::Allocator                                                &allocator,
+                                                  vk::Allocator&                                               allocator,
                                                   vk::VkImageLayout                                    layout,
                                                   vk::VkOffset3D                                               offset,
-                                                  vk::VkImageAspect                                    aspect,
+                                                  vk::VkImageAspectFlagBits                    aspect,
                                                   unsigned int                                                 mipLevel,
                                                   unsigned int                                                 arrayElement)
 {
-       if (aspect == vk::VK_IMAGE_ASPECT_COLOR)
+       if (aspect == vk::VK_IMAGE_ASPECT_COLOR_BIT)
        {
                upload(queue, allocator, layout, offset, access.getWidth(),
                        access.getHeight(), access.getDepth(), mipLevel, arrayElement, aspect, vk::VK_IMAGE_TYPE_2D,
                        access.getDataPtr());
        }
-       if (aspect == vk::VK_IMAGE_ASPECT_DEPTH || aspect == vk::VK_IMAGE_ASPECT_STENCIL)
+       if (aspect == vk::VK_IMAGE_ASPECT_DEPTH_BIT || aspect == vk::VK_IMAGE_ASPECT_STENCIL_BIT)
        {
                uploadUsingBuffer(queue, allocator, layout, offset, access.getWidth(),
                        access.getHeight(), access.getDepth(), mipLevel, arrayElement, aspect, access.getDataPtr());
        }
 }
 
-void Image::uploadSurface1D (const tcu::ConstPixelBufferAccess         &access,
+void Image::uploadSurface1D (const tcu::ConstPixelBufferAccess&        access,
                                                         vk::VkQueue                                            queue,
-                                                        vk::Allocator                                          &allocator,
+                                                        vk::Allocator&                                                 allocator,
                                                         vk::VkImageLayout                                      layout,
                                                         vk::VkOffset3D                                         offset,
-                                                        vk::VkImageAspect                                      aspect,
+                                                        vk::VkImageAspectFlagBits                      aspect,
                                                         unsigned int                                           mipLevel,
                                                         unsigned int                                           arrayElement)
 {
-       if (aspect == vk::VK_IMAGE_ASPECT_COLOR)
+       if (aspect == vk::VK_IMAGE_ASPECT_COLOR_BIT)
        {
                upload(queue, allocator, layout, offset, access.getWidth(),
                        access.getHeight(), access.getDepth(), mipLevel, arrayElement, aspect, vk::VK_IMAGE_TYPE_1D,
                        access.getDataPtr());
        }
-       if (aspect == vk::VK_IMAGE_ASPECT_DEPTH || aspect == vk::VK_IMAGE_ASPECT_STENCIL)
+       if (aspect == vk::VK_IMAGE_ASPECT_DEPTH_BIT || aspect == vk::VK_IMAGE_ASPECT_STENCIL_BIT)
        {
                uploadUsingBuffer(queue, allocator, layout, offset, access.getWidth(),
                        access.getHeight(), access.getDepth(), mipLevel, arrayElement, aspect, access.getDataPtr());
        }
 }
 
-void Image::uploadSurfaceLinear (const tcu::ConstPixelBufferAccess     &access,
+void Image::uploadSurfaceLinear (const tcu::ConstPixelBufferAccess&    access,
                                                                 vk::VkOffset3D                                         offset,
                                                                 int                                                            width,
                                                                 int                                                            height,
                                                                 int                                                            depth,
-                                                                vk::VkImageAspect                                      aspect,
+                                                                vk::VkImageAspectFlagBits                      aspect,
                                                                 unsigned int                                           mipLevel,
                                                                 unsigned int                                           arrayElement)
 {
        uploadLinear(offset, width, height, depth, mipLevel, arrayElement, aspect, access.getDataPtr());
 }
 
-void Image::upload (vk::VkQueue                        queue,
-                                       vk::Allocator           &allocator,
-                                       vk::VkImageLayout       layout,
-                                       vk::VkOffset3D          offset,
-                                       int                                     width,
-                                       int                                     height,
-                                       int                                     depth,
-                                       unsigned int            mipLevel,
-                                       unsigned int            arrayElement,
-                                       vk::VkImageAspect       aspect,
-                                       vk::VkImageType         type,
-                                       const void *            data)
+void Image::upload (vk::VkQueue                                        queue,
+                                       vk::Allocator&                          allocator,
+                                       vk::VkImageLayout                       layout,
+                                       vk::VkOffset3D                          offset,
+                                       int                                                     width,
+                                       int                                                     height,
+                                       int                                                     depth,
+                                       unsigned int                            mipLevel,
+                                       unsigned int                            arrayElement,
+                                       vk::VkImageAspectFlagBits       aspect,
+                                       vk::VkImageType                         type,
+                                       const void *                            data)
 {
 
        if (layout != vk::VK_IMAGE_LAYOUT_UNDEFINED
                && layout != vk::VK_IMAGE_LAYOUT_GENERAL
-               && layout != vk::VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL) 
+               && layout != vk::VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) 
        {
                TCU_FAIL("Image::uploadFromRaw usage error: this function is not going to change Image layout!");
        }
@@ -593,10 +586,10 @@ void Image::upload (vk::VkQueue                   queue,
        de::SharedPtr<Image> stagingResource;
        vk::VkExtent3D extent = {width, height, depth};
        ImageCreateInfo stagingResourceCreateInfo(
-               type, m_format, extent, 1, 1, 1,
-               vk::VK_IMAGE_TILING_LINEAR, vk::VK_IMAGE_USAGE_TRANSFER_SOURCE_BIT);
+               type, m_format, extent, 1, 1, vk::VK_SAMPLE_COUNT_1_BIT,
+               vk::VK_IMAGE_TILING_LINEAR, vk::VK_IMAGE_USAGE_TRANSFER_SRC_BIT);
 
-       stagingResource = Image::CreateAndAlloc(m_vk, m_device, stagingResourceCreateInfo, allocator,
+       stagingResource = Image::createAndAlloc(m_vk, m_device, stagingResourceCreateInfo, allocator,
                                                                vk::MemoryRequirement::HostVisible);
        
        const vk::VkOffset3D zeroOffset = { 0, 0, 0 };
@@ -605,10 +598,18 @@ void Image::upload (vk::VkQueue                   queue,
        {
                #pragma message("Get queue family index")
                CmdPoolCreateInfo copyCmdPoolCreateInfo(0);
-               vk::Unique<vk::VkCmdPool> copyCmdPool(vk::createCommandPool(m_vk, m_device, &copyCmdPoolCreateInfo));
+               vk::Unique<vk::VkCommandPool> copyCmdPool(vk::createCommandPool(m_vk, m_device, &copyCmdPoolCreateInfo));
 
-               CmdBufferCreateInfo copyCmdBufCreateInfo(*copyCmdPool, vk::VK_CMD_BUFFER_LEVEL_PRIMARY, 0);
-               vk::Unique<vk::VkCmdBuffer> copyCmdBuffer(vk::createCommandBuffer(m_vk, m_device, &copyCmdBufCreateInfo));
+               const vk::VkCommandBufferAllocateInfo cmdBufferAllocateInfo =
+               {
+                       vk::VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO,     // VkStructureType                      sType;
+                       DE_NULL,                                                                                        // const void*                          pNext;
+                       *copyCmdPool,                                                                           // VkCommandPool                        commandPool;
+                       vk::VK_COMMAND_BUFFER_LEVEL_PRIMARY,                            // VkCommandBufferLevel         level;
+                       1u,                                                                                                     // deUint32                                     bufferCount;
+               };
+
+               vk::Unique<vk::VkCommandBuffer> copyCmdBuffer(vk::allocateCommandBuffer(m_vk, m_device, &cmdBufferAllocateInfo));
 
                CmdBufferBeginInfo beginInfo;
                VK_CHECK(m_vk.beginCommandBuffer(*copyCmdBuffer, &beginInfo));
@@ -620,54 +621,26 @@ void Image::upload (vk::VkQueue                   queue,
                        vk::VkImageMemoryBarrier barrier;
                        barrier.sType = vk::VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
                        barrier.pNext = DE_NULL;
-                       barrier.outputMask = 0;
-                       barrier.inputMask = 0;
+                       barrier.srcAccessMask = 0;
+                       barrier.dstAccessMask = 0;
                        barrier.oldLayout = vk::VK_IMAGE_LAYOUT_UNDEFINED;
                        barrier.newLayout = vk::VK_IMAGE_LAYOUT_GENERAL;
                        barrier.srcQueueFamilyIndex = vk::VK_QUEUE_FAMILY_IGNORED;
-                       barrier.destQueueFamilyIndex = vk::VK_QUEUE_FAMILY_IGNORED;
+                       barrier.dstQueueFamilyIndex = vk::VK_QUEUE_FAMILY_IGNORED;
                        barrier.image = object();
 
-                       vk::VkImageAspectFlags aspectMask = 0;
-                       if (aspect == vk::VK_IMAGE_ASPECT_COLOR)
-                       {
-                               aspectMask |= vk::VK_IMAGE_ASPECT_COLOR_BIT;
-                       }
-                       if (aspect == vk::VK_IMAGE_ASPECT_DEPTH)
-                       {
-                               aspectMask |= vk::VK_IMAGE_ASPECT_DEPTH_BIT;
-                       }
-                       if (aspect == vk::VK_IMAGE_ASPECT_STENCIL)
-                       {
-                               aspectMask |= vk::VK_IMAGE_ASPECT_STENCIL_BIT;
-                       }                               
-                               
-                       barrier.subresourceRange.aspectMask = aspectMask;
+                       barrier.subresourceRange.aspectMask = aspect;
                        barrier.subresourceRange.baseMipLevel = 0;
-                       barrier.subresourceRange.mipLevels = m_mipLevels;
+                       barrier.subresourceRange.levelCount = m_levelCount;
                        barrier.subresourceRange.baseArrayLayer = 0;
-                       barrier.subresourceRange.arraySize = m_arraySize;
+                       barrier.subresourceRange.layerCount = m_layerCount;
 
                        void* barriers[] = { &barrier };
 
-                       m_vk.cmdPipelineBarrier(*copyCmdBuffer, vk::VK_PIPELINE_STAGE_ALL_GRAPHICS, vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, false, DE_LENGTH_OF_ARRAY(barriers), barriers);
-               }
-
-               vk::VkImageAspectFlags aspectMask = 0;
-               if (aspect == vk::VK_IMAGE_ASPECT_COLOR)
-               {
-                       aspectMask |= vk::VK_IMAGE_ASPECT_COLOR_BIT;
-               }
-               if (aspect == vk::VK_IMAGE_ASPECT_DEPTH)
-               {
-                       aspectMask |= vk::VK_IMAGE_ASPECT_DEPTH_BIT;
-               }
-               if (aspect == vk::VK_IMAGE_ASPECT_STENCIL)
-               {
-                       aspectMask |= vk::VK_IMAGE_ASPECT_STENCIL_BIT;
+                       m_vk.cmdPipelineBarrier(*copyCmdBuffer, vk::VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, false, DE_LENGTH_OF_ARRAY(barriers), barriers);
                }
 
-               transition2DImage(m_vk, *copyCmdBuffer, stagingResource->object(), aspectMask, vk::VK_IMAGE_LAYOUT_UNDEFINED, vk::VK_IMAGE_LAYOUT_GENERAL);
+               transition2DImage(m_vk, *copyCmdBuffer, stagingResource->object(), aspect, vk::VK_IMAGE_LAYOUT_UNDEFINED, vk::VK_IMAGE_LAYOUT_GENERAL);
 
                vk::VkImageCopy region = {{aspect, 0, 0, 1},
                                                                        zeroOffset,
@@ -679,28 +652,39 @@ void Image::upload (vk::VkQueue                   queue,
                                                                vk::VK_IMAGE_LAYOUT_GENERAL, object(), layout, 1, &region);
                VK_CHECK(m_vk.endCommandBuffer(*copyCmdBuffer));
 
-               VK_CHECK(m_vk.queueSubmit(queue, 1, &copyCmdBuffer.get(), DE_NULL));
+               vk::VkSubmitInfo submitInfo =
+               {
+                       vk::VK_STRUCTURE_TYPE_SUBMIT_INFO,      // VkStructureType                      sType;\r
+                       DE_NULL,                                                        // const void*                          pNext;\r
+                       0,                                                                      // deUint32                                     waitSemaphoreCount;\r
+                       DE_NULL,                                                        // const VkSemaphore*           pWaitSemaphores;\r
+                       1,                                                                      // deUint32                                     commandBufferCount;\r
+                       &copyCmdBuffer.get(),                           // const VkCommandBuffer*       pCommandBuffers;\r
+                       0,                                                                      // deUint32                                     signalSemaphoreCount;\r
+                       DE_NULL                                                         // const VkSemaphore*           pSignalSemaphores;\r
+               };
+               m_vk.queueSubmit(queue, 1, &submitInfo, DE_NULL);
 
                // TODO: make this less intrusive
                VK_CHECK(m_vk.queueWaitIdle(queue));
        }
 }
 
-void Image::uploadUsingBuffer (vk::VkQueue                     queue,
-                                                          vk::Allocator                &allocator,
-                                                          vk::VkImageLayout    layout,
-                                                          vk::VkOffset3D               offset,
-                                                          int                                  width,
-                                                          int                                  height,
-                                                          int                                  depth,
-                                                          unsigned int                 mipLevel,
-                                                          unsigned int                 arrayElement,
-                                                          vk::VkImageAspect    aspect,
-                                                          const void *                 data)
+void Image::uploadUsingBuffer (vk::VkQueue                                     queue,
+                                                          vk::Allocator&                               allocator,
+                                                          vk::VkImageLayout                    layout,
+                                                          vk::VkOffset3D                               offset,
+                                                          int                                                  width,
+                                                          int                                                  height,
+                                                          int                                                  depth,
+                                                          unsigned int                                 mipLevel,
+                                                          unsigned int                                 arrayElement,
+                                                          vk::VkImageAspectFlagBits    aspect,
+                                                          const void *                                 data)
 {
        if (layout != vk::VK_IMAGE_LAYOUT_UNDEFINED
                && layout != vk::VK_IMAGE_LAYOUT_GENERAL
-               && layout != vk::VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL) 
+               && layout != vk::VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) 
        {
                TCU_FAIL("Image::uploadFromRaw usage error: this function is not going to change Image layout!");
        }
@@ -716,30 +700,37 @@ void Image::uploadUsingBuffer (vk::VkQueue                        queue,
                switch (m_format)
                {
                        case vk::VK_FORMAT_D16_UNORM_S8_UINT:
-                               pixelSize = (aspect == vk::VK_IMAGE_ASPECT_DEPTH) ? 2 : 1;
+                               pixelSize = (aspect == vk::VK_IMAGE_ASPECT_DEPTH_BIT) ? 2 : 1;
                                break;
                        case  vk::VK_FORMAT_D32_SFLOAT_S8_UINT:
-                               pixelSize = (aspect == vk::VK_IMAGE_ASPECT_DEPTH) ? 4 : 1;
+                               pixelSize = (aspect == vk::VK_IMAGE_ASPECT_DEPTH_BIT) ? 4 : 1;
                                break;
-                       case vk::VK_FORMAT_D24_UNORM_X8:
+                       case vk::VK_FORMAT_X8_D24_UNORM_PACK32:
                        case vk::VK_FORMAT_D24_UNORM_S8_UINT:
-                               pixelSize = (aspect == vk::VK_IMAGE_ASPECT_DEPTH) ? 3 : 1;
+                               pixelSize = (aspect == vk::VK_IMAGE_ASPECT_DEPTH_BIT) ? 3 : 1;
                        break;
                }
                bufferSize = pixelSize*width*height*depth;
        }
-       BufferCreateInfo stagingBufferResourceCreateInfo(bufferSize, vk::VK_BUFFER_USAGE_TRANSFER_DESTINATION_BIT | vk::VK_BUFFER_USAGE_TRANSFER_SOURCE_BIT);
-       stagingResource = Buffer::CreateAndAlloc(m_vk, m_device, stagingBufferResourceCreateInfo, allocator, vk::MemoryRequirement::HostVisible);
+       BufferCreateInfo stagingBufferResourceCreateInfo(bufferSize, vk::VK_BUFFER_USAGE_TRANSFER_DST_BIT | vk::VK_BUFFER_USAGE_TRANSFER_SRC_BIT);
+       stagingResource = Buffer::createAndAlloc(m_vk, m_device, stagingBufferResourceCreateInfo, allocator, vk::MemoryRequirement::HostVisible);
        char* destPtr = reinterpret_cast<char*>(stagingResource->getBoundMemory().getHostPtr());
        deMemcpy(destPtr, data, bufferSize);
        vk::flushMappedMemoryRange(m_vk, m_device, stagingResource->getBoundMemory().getMemory(), stagingResource->getBoundMemory().getOffset(), bufferSize);
        {
                #pragma message("Get queue family index")
                CmdPoolCreateInfo copyCmdPoolCreateInfo(0);
-               vk::Unique<vk::VkCmdPool> copyCmdPool(vk::createCommandPool(m_vk, m_device, &copyCmdPoolCreateInfo));
+               vk::Unique<vk::VkCommandPool> copyCmdPool(vk::createCommandPool(m_vk, m_device, &copyCmdPoolCreateInfo));
 
-               CmdBufferCreateInfo copyCmdBufCreateInfo(*copyCmdPool, vk::VK_CMD_BUFFER_LEVEL_PRIMARY, 0);
-               vk::Unique<vk::VkCmdBuffer> copyCmdBuffer(vk::createCommandBuffer(m_vk, m_device, &copyCmdBufCreateInfo));
+               const vk::VkCommandBufferAllocateInfo cmdBufferAllocateInfo =
+               {
+                       vk::VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO,     // VkStructureType                      sType;
+                       DE_NULL,                                                                                        // const void*                          pNext;
+                       *copyCmdPool,                                                                           // VkCommandPool                        commandPool;
+                       vk::VK_COMMAND_BUFFER_LEVEL_PRIMARY,                            // VkCommandBufferLevel         level;
+                       1u,                                                                                                     // deUint32                                     bufferCount;
+               };
+               vk::Unique<vk::VkCommandBuffer> copyCmdBuffer(vk::allocateCommandBuffer(m_vk, m_device, &cmdBufferAllocateInfo));
 
                CmdBufferBeginInfo beginInfo;
                VK_CHECK(m_vk.beginCommandBuffer(*copyCmdBuffer, &beginInfo));
@@ -751,51 +742,23 @@ void Image::uploadUsingBuffer (vk::VkQueue                        queue,
                        vk::VkImageMemoryBarrier barrier;
                        barrier.sType = vk::VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
                        barrier.pNext = DE_NULL;
-                       barrier.outputMask = 0;
-                       barrier.inputMask = 0;
+                       barrier.srcAccessMask = 0;
+                       barrier.dstAccessMask = 0;
                        barrier.oldLayout = vk::VK_IMAGE_LAYOUT_UNDEFINED;
                        barrier.newLayout = vk::VK_IMAGE_LAYOUT_GENERAL;
                        barrier.srcQueueFamilyIndex = vk::VK_QUEUE_FAMILY_IGNORED;
-                       barrier.destQueueFamilyIndex = vk::VK_QUEUE_FAMILY_IGNORED;
+                       barrier.dstQueueFamilyIndex = vk::VK_QUEUE_FAMILY_IGNORED;
                        barrier.image = object();
 
-                       vk::VkImageAspectFlags aspectMask = 0;
-                       if (aspect == vk::VK_IMAGE_ASPECT_COLOR)
-                       {
-                               aspectMask |= vk::VK_IMAGE_ASPECT_COLOR_BIT;
-                       }
-                       if (aspect == vk::VK_IMAGE_ASPECT_DEPTH)
-                       {
-                               aspectMask |= vk::VK_IMAGE_ASPECT_DEPTH_BIT;
-                       }
-                       if (aspect == vk::VK_IMAGE_ASPECT_STENCIL)
-                       {
-                               aspectMask |= vk::VK_IMAGE_ASPECT_STENCIL_BIT;
-                       }
-
-                       barrier.subresourceRange.aspectMask = aspectMask;
+                       barrier.subresourceRange.aspectMask = aspect;
                        barrier.subresourceRange.baseMipLevel = 0;
-                       barrier.subresourceRange.mipLevels = m_mipLevels;
+                       barrier.subresourceRange.levelCount = m_levelCount;
                        barrier.subresourceRange.baseArrayLayer = 0;
-                       barrier.subresourceRange.arraySize = m_arraySize;
+                       barrier.subresourceRange.layerCount = m_layerCount;
 
                        void* barriers[] = { &barrier };
 
-                       m_vk.cmdPipelineBarrier(*copyCmdBuffer, vk::VK_PIPELINE_STAGE_ALL_GRAPHICS, vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, false, DE_LENGTH_OF_ARRAY(barriers), barriers);
-               }
-
-               vk::VkImageAspectFlags aspectMask = 0;
-               if (aspect == vk::VK_IMAGE_ASPECT_COLOR)
-               {
-                       aspectMask |= vk::VK_IMAGE_ASPECT_COLOR_BIT;
-               }
-               if (aspect == vk::VK_IMAGE_ASPECT_DEPTH)
-               {
-                       aspectMask |= vk::VK_IMAGE_ASPECT_DEPTH_BIT;
-               }
-               if (aspect == vk::VK_IMAGE_ASPECT_STENCIL)
-               {
-                       aspectMask |= vk::VK_IMAGE_ASPECT_STENCIL_BIT;
+                       m_vk.cmdPipelineBarrier(*copyCmdBuffer, vk::VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, false, DE_LENGTH_OF_ARRAY(barriers), barriers);
                }
 
                vk::VkBufferImageCopy region = {
@@ -809,7 +772,18 @@ void Image::uploadUsingBuffer (vk::VkQueue                 queue,
                        object(), layout, 1, &region);
                VK_CHECK(m_vk.endCommandBuffer(*copyCmdBuffer));
 
-               VK_CHECK(m_vk.queueSubmit(queue, 1, &copyCmdBuffer.get(), DE_NULL));
+               vk::VkSubmitInfo submitInfo =
+               {
+                       vk::VK_STRUCTURE_TYPE_SUBMIT_INFO,      // VkStructureType                      sType;\r
+                       DE_NULL,                                                        // const void*                          pNext;\r
+                       0,                                                                      // deUint32                                     waitSemaphoreCount;\r
+                       DE_NULL,                                                        // const VkSemaphore*           pWaitSemaphores;\r
+                       1,                                                                      // deUint32                                     commandBufferCount;\r
+                       &copyCmdBuffer.get(),                           // const VkCommandBuffer*       pCommandBuffers;\r
+                       0,                                                                      // deUint32                                     signalSemaphoreCount;\r
+                       DE_NULL                                                         // const VkSemaphore*           pSignalSemaphores;\r
+               };
+               m_vk.queueSubmit(queue, 1, &submitInfo, DE_NULL);
 
                // TODO: make this less intrusive
                VK_CHECK(m_vk.queueWaitIdle(queue));
@@ -817,21 +791,21 @@ void Image::uploadUsingBuffer (vk::VkQueue                        queue,
 }
 
 
-void Image::uploadLinear (vk::VkOffset3D       offset,
-                                                 int                           width,
-                                                 int                           height,
-                                                 int                           depth,
-                                                 unsigned int          mipLevel,
-                                                 unsigned int          arrayElement,
-                                                 vk::VkImageAspect     aspect,
-                                                 const void *          data)
+void Image::uploadLinear (vk::VkOffset3D                       offset,
+                                                 int                                           width,
+                                                 int                                           height,
+                                                 int                                           depth,
+                                                 unsigned int                          mipLevel,
+                                                 unsigned int                          arrayElement,
+                                                 vk::VkImageAspectFlagBits     aspect,
+                                                 const void *                          data)
 {
        vk::VkSubresourceLayout imageLayout;
 
        vk::VkImageSubresource imageSubResource = {aspect, mipLevel, arrayElement};
 
-       VK_CHECK(m_vk.getImageSubresourceLayout(m_device, object(), &imageSubResource,
-                                                                                                       &imageLayout));
+       m_vk.getImageSubresourceLayout(m_device, object(), &imageSubResource,
+                                                                                                       &imageLayout);
 
        char* destPtr = reinterpret_cast<char*>(getBoundMemory().getHostPtr());
 
@@ -844,13 +818,13 @@ void Image::uploadLinear (vk::VkOffset3D  offset,
 vk::VkDeviceSize Image::getPixelOffset (vk::VkOffset3D         offset,
                                                                                vk::VkDeviceSize        rowPitch,
                                                                                vk::VkDeviceSize        depthPitch,
-                                                                               unsigned int            mipLevel,
-                                                                               unsigned int            arrayElement)
+                                                                               unsigned int            level,
+                                                                               unsigned int            layer)
 {
-       if (mipLevel >= m_mipLevels
+       if (level >= m_levelCount
                TCU_FAIL("mip level too large");
 
-       if (arrayElement >= m_arraySize)
+       if (layer >= m_layerCount)
                TCU_FAIL("array element too large");
 
        vk::VkDeviceSize mipLevelSizes[32];
@@ -859,7 +833,7 @@ vk::VkDeviceSize Image::getPixelOffset (vk::VkOffset3D              offset,
        = tcu::IVec3(m_extent.width, m_extent.height, m_extent.depth);
 
        vk::VkDeviceSize arrayElemSize = 0;
-       for (unsigned int i = 0; i < m_mipLevels && (mipExtend[0] > 1 || mipExtend[1] > 1 || mipExtend[2] > 1); ++i)
+       for (unsigned int i = 0; i < m_levelCount && (mipExtend[0] > 1 || mipExtend[1] > 1 || mipExtend[2] > 1); ++i)
        {
                // Rect size is just a 3D image size;
                mipLevelSizes[i] = mipExtend[2] * depthPitch;
@@ -869,11 +843,11 @@ vk::VkDeviceSize Image::getPixelOffset (vk::VkOffset3D            offset,
                mipExtend = tcu::max(mipExtend / 2, tcu::IVec3(1));
        }
 
-       vk::VkDeviceSize pixelOffset = arrayElement * arrayElemSize;
-       for (size_t i = 0; i < mipLevel; ++i) {
+       vk::VkDeviceSize pixelOffset = layer * arrayElemSize;
+       for (size_t i = 0; i < level; ++i) {
                pixelOffset += mipLevelSizes[i];
        }
-       pixelOffset += offset.z * mipLevelRectSizes[mipLevel];
+       pixelOffset += offset.z * mipLevelRectSizes[level];
        pixelOffset += offset.y * rowPitch;
        pixelOffset += offset.x;
 
@@ -882,84 +856,80 @@ vk::VkDeviceSize Image::getPixelOffset (vk::VkOffset3D            offset,
 
 void Image::bindMemory (de::MovePtr<vk::Allocation> allocation)
 {
-       if (allocation)
-       {
-               VK_CHECK(m_vk.bindImageMemory(m_device, *m_object, allocation->getMemory(), allocation->getOffset()));
-       }
-       else
-       {
-               VK_CHECK(m_vk.bindImageMemory(m_device, *m_object, DE_NULL, 0));
-       }
+       DE_ASSERT(allocation);
+       VK_CHECK(m_vk.bindImageMemory(m_device, *m_object, allocation->getMemory(), allocation->getOffset()));
+
+       DE_ASSERT(!m_allocation);
        m_allocation = allocation;
 }
 
-de::SharedPtr<Image> Image::CreateAndAlloc(const vk::DeviceInterface   &vk,
+de::SharedPtr<Image> Image::createAndAlloc(const vk::DeviceInterface&  vk,
                                                                                   vk::VkDevice                                 device,
-                                                                                  const vk::VkImageCreateInfo  &createInfo,
-                                                                                  vk::Allocator                                &allocator,
+                                                                                  const vk::VkImageCreateInfocreateInfo,
+                                                                                  vk::Allocator&                               allocator,
                                                                                   vk::MemoryRequirement                memoryRequirement)
 {
-       de::SharedPtr<Image> ret = Create(vk, device, createInfo);
+       de::SharedPtr<Image> ret = create(vk, device, createInfo);
 
        vk::VkMemoryRequirements imageRequirements = vk::getImageMemoryRequirements(vk, device, ret->object());
        ret->bindMemory(allocator.allocate(imageRequirements, memoryRequirement));
        return ret;
 }
 
-de::SharedPtr<Image> Image::Create(const vk::DeviceInterface   &vk,
+de::SharedPtr<Image> Image::create(const vk::DeviceInterface&  vk,
                                                                   vk::VkDevice                                 device,
                                                                   const vk::VkImageCreateInfo  &createInfo)
 {
        return de::SharedPtr<Image>(new Image(vk, device, createInfo.format, createInfo.extent,
-                                                               createInfo.mipLevels, createInfo.arraySize,
+                                                               createInfo.mipLevels, createInfo.arrayLayers,
                                                                vk::createImage(vk, device, &createInfo)));
 }
 
-void transition2DImage (const vk::DeviceInterface      &vk, 
-                                               vk::VkCmdBuffer                         cmdBuffer, 
+void transition2DImage (const vk::DeviceInterface&     vk, 
+                                               vk::VkCommandBuffer                             cmdBuffer, 
                                                vk::VkImage                                     image, 
                                                vk::VkImageAspectFlags          aspectMask, 
                                                vk::VkImageLayout                       oldLayout,
                                                vk::VkImageLayout                       newLayout)
 {
        vk::VkImageMemoryBarrier barrier; 
-       barrier.sType = vk::VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
-       barrier.pNext = DE_NULL;
-       barrier.outputMask = 0;
-       barrier.inputMask = 0;
-       barrier.oldLayout = oldLayout;
-       barrier.newLayout = newLayout;
-       barrier.srcQueueFamilyIndex = vk::VK_QUEUE_FAMILY_IGNORED;
-       barrier.destQueueFamilyIndex = vk::VK_QUEUE_FAMILY_IGNORED;
-       barrier.image = image;
-       barrier.subresourceRange.aspectMask = aspectMask;
-       barrier.subresourceRange.baseMipLevel = 0;
-       barrier.subresourceRange.mipLevels = 1;
+       barrier.sType                                   = vk::VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
+       barrier.pNext                                   = DE_NULL;
+       barrier.srcAccessMask                           = 0;
+       barrier.dstAccessMask                           = 0;
+       barrier.oldLayout                               = oldLayout;
+       barrier.newLayout                               = newLayout;
+       barrier.srcQueueFamilyIndex             = vk::VK_QUEUE_FAMILY_IGNORED;
+       barrier.dstQueueFamilyIndex     = vk::VK_QUEUE_FAMILY_IGNORED;
+       barrier.image                                   = image;
+       barrier.subresourceRange.aspectMask             = aspectMask;
+       barrier.subresourceRange.baseMipLevel   = 0;
+       barrier.subresourceRange.levelCount             = 1;
        barrier.subresourceRange.baseArrayLayer = 0;
-       barrier.subresourceRange.arraySize = 1;
+       barrier.subresourceRange.layerCount             = 1;
 
        void* barriers[] = { &barrier };
 
-       vk.cmdPipelineBarrier(cmdBuffer, vk::VK_PIPELINE_STAGE_ALL_GRAPHICS, vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, false, DE_LENGTH_OF_ARRAY(barriers), barriers);
+       vk.cmdPipelineBarrier(cmdBuffer, vk::VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, false, DE_LENGTH_OF_ARRAY(barriers), barriers);
 }
 
 
-void initialTransitionColor2DImage (const vk::DeviceInterface &vk, vk::VkCmdBuffer cmdBuffer, vk::VkImage image, vk::VkImageLayout layout)
+void initialTransitionColor2DImage (const vk::DeviceInterface &vk, vk::VkCommandBuffer cmdBuffer, vk::VkImage image, vk::VkImageLayout layout)
 {
        transition2DImage(vk, cmdBuffer, image, vk::VK_IMAGE_ASPECT_COLOR_BIT, vk::VK_IMAGE_LAYOUT_UNDEFINED, layout);
 }
 
-void initialTransitionDepth2DImage (const vk::DeviceInterface &vk, vk::VkCmdBuffer cmdBuffer, vk::VkImage image, vk::VkImageLayout layout)
+void initialTransitionDepth2DImage (const vk::DeviceInterface &vk, vk::VkCommandBuffer cmdBuffer, vk::VkImage image, vk::VkImageLayout layout)
 {
        transition2DImage(vk, cmdBuffer, image, vk::VK_IMAGE_ASPECT_DEPTH_BIT, vk::VK_IMAGE_LAYOUT_UNDEFINED, layout);
 }
 
-void initialTransitionStencil2DImage (const vk::DeviceInterface &vk, vk::VkCmdBuffer cmdBuffer, vk::VkImage image, vk::VkImageLayout layout)
+void initialTransitionStencil2DImage (const vk::DeviceInterface &vk, vk::VkCommandBuffer cmdBuffer, vk::VkImage image, vk::VkImageLayout layout)
 {
        transition2DImage(vk, cmdBuffer, image, vk::VK_IMAGE_ASPECT_STENCIL_BIT, vk::VK_IMAGE_LAYOUT_UNDEFINED, layout);
 }
 
-void initialTransitionDepthStencil2DImage (const vk::DeviceInterface &vk, vk::VkCmdBuffer cmdBuffer, vk::VkImage image, vk::VkImageLayout layout)
+void initialTransitionDepthStencil2DImage (const vk::DeviceInterface &vk, vk::VkCommandBuffer cmdBuffer, vk::VkImage image, vk::VkImageLayout layout)
 {
        transition2DImage(vk, cmdBuffer, image, vk::VK_IMAGE_ASPECT_DEPTH_BIT | vk::VK_IMAGE_ASPECT_STENCIL_BIT, vk::VK_IMAGE_LAYOUT_UNDEFINED, layout);
 }
diff --git a/external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateImageObjectUtil.hpp b/external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateImageObjectUtil.hpp
new file mode 100644 (file)
index 0000000..d65075d
--- /dev/null
@@ -0,0 +1,290 @@
+#ifndef _VKT_DYNAMIC_STATE_IMAGEOBJECTUTIL_HPP
+#define _VKT_DYNAMIC_STATE_IMAGEOBJECTUTIL_HPP
+/*------------------------------------------------------------------------
+ * Vulkan Conformance Tests
+ * ------------------------
+ *
+ * Copyright (c) 2015 The Khronos Group Inc.
+ * Copyright (c) 2015 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and/or associated documentation files (the
+ * "Materials"), to deal in the Materials without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Materials, and to
+ * permit persons to whom the Materials are furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice(s) and this permission notice shall be included
+ * in all copies or substantial portions of the Materials.
+ *
+ * The Materials are Confidential Information as defined by the
+ * Khronos Membership Agreement until designated non-confidential by Khronos,
+ * at which point this condition clause shall be removed.
+ *
+ * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+ *
+ *//*!
+ * \file
+ * \brief Image Object Util
+ *//*--------------------------------------------------------------------*/
+
+#include "vkDefs.hpp"
+#include "vkMemUtil.hpp"
+#include "vkRefUtil.hpp"
+
+#include "deSharedPtr.hpp"
+
+#include "tcuTexture.hpp"
+
+namespace vkt
+{
+namespace DynamicState
+{
+
+class MemoryOp
+{
+public:
+       static void pack        (int                                    pixelSize,
+                                                int                                    width,
+                                                int                                    height,
+                                                int                                    depth,
+                                                vk::VkDeviceSize               rowPitch,
+                                                vk::VkDeviceSize               depthPitch,
+                                                const void *                   srcBuffer,
+                                                void *                                 destBuffer);
+
+       static void unpack      (int                                    pixelSize,
+                                                int                                    width,
+                                                int                                    height,
+                                                int                                    depth,
+                                                vk::VkDeviceSize               rowPitch,
+                                                vk::VkDeviceSize               depthPitch,
+                                                const void *                   srcBuffer,
+                                                void *                                 destBuffer);
+};
+
+
+class Image
+{
+public:
+       static de::SharedPtr<Image> create                              (const vk::DeviceInterface &vk, vk::VkDevice device, const vk::VkImageCreateInfo &createInfo);
+
+       static de::SharedPtr<Image> createAndAlloc              (const vk::DeviceInterface&                             vk,
+                                                                                                        vk::VkDevice                                                   device,
+                                                                                                        const vk::VkImageCreateInfo&                   createInfo,
+                                                                                                        vk::Allocator&                                                 allocator,
+                                                                                                        vk::MemoryRequirement                                  memoryRequirement = vk::MemoryRequirement::Any);
+
+       tcu::ConstPixelBufferAccess readSurface                 (vk::VkQueue                                                    queue,
+                                                                                                        vk::Allocator&                                                 allocator,
+                                                                                                        vk::VkImageLayout                                              layout,
+                                                                                                        vk::VkOffset3D                                                 offset,
+                                                                                                        int                                                                    width,
+                                                                                                        int                                                                    height,
+                                                                                                        vk::VkImageAspectFlagBits                              aspect,
+                                                                                                        unsigned int                                                   mipLevel = 0,
+                                                                                                        unsigned int                                                   arrayElement = 0);
+
+       tcu::ConstPixelBufferAccess readSurface1D               (vk::VkQueue                                                    queue,
+                                                                                                        vk::Allocator&                                                 allocator,
+                                                                                                        vk::VkImageLayout                                              layout,
+                                                                                                        vk::VkOffset3D                                                 offset,
+                                                                                                        int                                                                    width,
+                                                                                                        vk::VkImageAspectFlagBits                              aspect,
+                                                                                                        unsigned int                                                   mipLevel = 0,
+                                                                                                        unsigned int                                                   arrayElement = 0);
+
+       tcu::ConstPixelBufferAccess readVolume                  (vk::VkQueue                                                    queue,
+                                                                                                        vk::Allocator&                                                 allocator,
+                                                                                                        vk::VkImageLayout                                              layout,
+                                                                                                        vk::VkOffset3D                                                 offset,
+                                                                                                        int                                                                    width,
+                                                                                                        int                                                                    height,
+                                                                                                        int                                                                    depth,
+                                                                                                        vk::VkImageAspectFlagBits                              aspect,
+                                                                                                        unsigned int                                                   mipLevel = 0,
+                                                                                                        unsigned int                                                   arrayElement = 0);
+
+
+       tcu::ConstPixelBufferAccess readSurfaceLinear   (vk::VkOffset3D                                                 offset,
+                                                                                                        int                                                                    width,
+                                                                                                        int                                                                    height,
+                                                                                                        int                                                                    depth,
+                                                                                                        vk::VkImageAspectFlagBits                              aspect,
+                                                                                                        unsigned int                                                   mipLevel = 0,
+                                                                                                        unsigned int                                                   arrayElement = 0);
+
+       void                                            read                            (vk::VkQueue                                                    queue,
+                                                                                                        vk::Allocator&                                                 allocator,
+                                                                                                        vk::VkImageLayout                                              layout,
+                                                                                                        vk::VkOffset3D                                                 offset,
+                                                                                                        int                                                                    width,
+                                                                                                        int                                                                    height,
+                                                                                                        int                                                                    depth,
+                                                                                                        unsigned int                                                   mipLevel,
+                                                                                                        unsigned int                                                   arrayElement,
+                                                                                                        vk::VkImageAspectFlagBits                              aspect,
+                                                                                                        vk::VkImageType                                                type,
+                                                                                                        void *                                                                 data);
+
+       void                                            readUsingBuffer         (vk::VkQueue                                                    queue,
+                                                                                                        vk::Allocator&                                                 allocator,
+                                                                                                        vk::VkImageLayout                                              layout,
+                                                                                                        vk::VkOffset3D                                                 offset,
+                                                                                                        int                                                                    width,
+                                                                                                        int                                                                    height,
+                                                                                                        int                                                                    depth,
+                                                                                                        unsigned int                                                   mipLevel,
+                                                                                                        unsigned int                                                   arrayElement,
+                                                                                                        vk::VkImageAspectFlagBits                              aspect,
+                                                                                                        void *                                                                 data);
+
+       void                                            readLinear                      (vk::VkOffset3D                                                 offset,
+                                                                                                        int                                                                    width,
+                                                                                                        int                                                                    height,
+                                                                                                        int                                                                    depth,
+                                                                                                        unsigned int                                                   mipLevel,
+                                                                                                        unsigned int                                                   arrayElement,
+                                                                                                        vk::VkImageAspectFlagBits                              aspect,
+                                                                                                        void *                                                                 data);
+
+       void                                            uploadVolume            (const tcu::ConstPixelBufferAccess&             access,
+                                                                                                        vk::VkQueue                                                    queue,
+                                                                                                        vk::Allocator&                                                 allocator,
+                                                                                                        vk::VkImageLayout                                              layout,
+                                                                                                        vk::VkOffset3D                                                 offset,
+                                                                                                        vk::VkImageAspectFlagBits                              aspect,
+                                                                                                        unsigned int                                                   mipLevel = 0,
+                                                                                                        unsigned int                                                   arrayElement = 0);
+
+       void                                            uploadSurface            (const tcu::ConstPixelBufferAccess&    access,
+                                                                                                               vk::VkQueue                                                     queue,
+                                                                                                               vk::Allocator&                                          allocator,
+                                                                                                               vk::VkImageLayout                                       layout,
+                                                                                                               vk::VkOffset3D                                          offset,
+                                                                                                               vk::VkImageAspectFlagBits                       aspect,
+                                                                                                               unsigned int                                            mipLevel = 0,
+                                                                                                               unsigned int                                            arrayElement = 0);
+
+       void                                            uploadSurface1D         (const tcu::ConstPixelBufferAccess&             access,
+                                                                                                        vk::VkQueue                                                    queue,
+                                                                                                        vk::Allocator&                                                 allocator,
+                                                                                                        vk::VkImageLayout                                              layout,
+                                                                                                        vk::VkOffset3D                                                 offset,
+                                                                                                        vk::VkImageAspectFlagBits                              aspect,
+                                                                                                        unsigned int                                                   mipLevel = 0,
+                                                                                                        unsigned int                                                   arrayElement = 0);
+
+       void                                            uploadSurfaceLinear     (const tcu::ConstPixelBufferAccess&             access,
+                                                                                                        vk::VkOffset3D                                                 offset,
+                                                                                                        int                                                                    width,
+                                                                                                        int                                                                    height,
+                                                                                                        int                                                                    depth,
+                                                                                                        vk::VkImageAspectFlagBits                              aspect,
+                                                                                                        unsigned int                                                   mipLevel = 0,
+                                                                                                        unsigned int                                                   arrayElement = 0);
+
+       void                                            upload                          (vk::VkQueue                                                    queue,
+                                                                                                        vk::Allocator&                                                 allocator,
+                                                                                                        vk::VkImageLayout                                              layout,
+                                                                                                        vk::VkOffset3D                                                 offset,
+                                                                                                        int                                                                    width,
+                                                                                                        int                                                                    height,
+                                                                                                        int                                                                    depth,
+                                                                                                        unsigned int                                                   mipLevel,
+                                                                                                        unsigned int                                                   arrayElement,
+                                                                                                        vk::VkImageAspectFlagBits                              aspect,
+                                                                                                        vk::VkImageType                                                type,
+                                                                                                        const void *                                                   data);
+
+       void                                            uploadUsingBuffer       (vk::VkQueue                                                    queue,
+                                                                                                        vk::Allocator&                                                 allocator,
+                                                                                                        vk::VkImageLayout                                              layout,
+                                                                                                        vk::VkOffset3D                                                 offset,
+                                                                                                        int                                                                    width,
+                                                                                                        int                                                                    height,
+                                                                                                        int                                                                    depth,
+                                                                                                        unsigned int                                                   mipLevel,
+                                                                                                        unsigned int                                                   arrayElement,
+                                                                                                        vk::VkImageAspectFlagBits                              aspect,
+                                                                                                        const void *                                                   data);
+
+       void                                            uploadLinear            (vk::VkOffset3D                                                 offset,
+                                                                                                        int                                                                    width,
+                                                                                                        int                                                                    height,
+                                                                                                        int                                                                    depth,
+                                                                                                        unsigned int                                                   mipLevel,
+                                                                                                        unsigned int                                                   arrayElement,
+                                                                                                        vk::VkImageAspectFlagBits                              aspect,
+                                                                                                        const void *                                                   data);
+
+       de::SharedPtr<Image>            copyToLinearImage       (vk::VkQueue                                                    queue,
+                                                                                                        vk::Allocator&                                                 allocator,
+                                                                                                        vk::VkImageLayout                                              layout,
+                                                                                                        vk::VkOffset3D                                                 offset,
+                                                                                                        int                                                                    width,
+                                                                                                        int                                                                    height,
+                                                                                                        int                                                                    depth,
+                                                                                                        unsigned int                                                   mipLevel,
+                                                                                                        unsigned int                                                   arrayElement,
+                                                                                                        vk::VkImageAspectFlagBits                              aspect,
+                                                                                                        vk::VkImageType                                                type);
+
+       const vk::VkFormat&                     getFormat                       (void) const                                                                                    { return m_format;              }
+       vk::VkImage                                     object                          (void) const                                                                                    { return *m_object;             }
+       void                                            bindMemory                      (de::MovePtr<vk::Allocation>                    allocation);
+       vk::Allocation                          getBoundMemory          (void) const                                                                                    { return *m_allocation; }
+
+private:
+       vk::VkDeviceSize                        getPixelOffset          (vk::VkOffset3D                                                 offset,
+                                                                                                        vk::VkDeviceSize                                               rowPitch,
+                                                                                                        vk::VkDeviceSize                                               depthPitch,
+                                                                                                        unsigned int                                                   mipLevel,
+                                                                                                        unsigned int                                                   arrayElement);
+
+                                                               Image                           (const vk::DeviceInterface&                             vk,
+                                                                                                        vk::VkDevice                                                   device,
+                                                                                                        vk::VkFormat                                                   format,
+                                                                                                        const vk::VkExtent3D&                                  extend,
+                                                                                                        deUint32                                                               levelCount,
+                                                                                                        deUint32                                                               layerCount,
+                                                                                                        vk::Move<vk::VkImage>                                  object);
+
+       Image                                                                                   (const Image &other);   // Not allowed!
+       Image                                            &operator=                     (const Image &other);   // Not allowed!
+
+       de::MovePtr<vk::Allocation>     m_allocation;    
+       vk::Unique<vk::VkImage>         m_object;
+
+       vk::VkFormat                            m_format;
+       vk::VkExtent3D                          m_extent;
+       deUint32                                        m_levelCount;
+       deUint32                                        m_layerCount;
+
+       std::vector<deUint8>            m_pixelAccessData;
+
+       const vk::DeviceInterface&      m_vk;
+       vk::VkDevice                            m_device;
+};
+
+void transition2DImage (const vk::DeviceInterface &vk, vk::VkCommandBuffer cmdBuffer, vk::VkImage image, vk::VkImageAspectFlags aspectMask, vk::VkImageLayout oldLayout, vk::VkImageLayout newLayout);
+
+void initialTransitionColor2DImage (const vk::DeviceInterface &vk, vk::VkCommandBuffer cmdBuffer, vk::VkImage image, vk::VkImageLayout layout);
+
+void initialTransitionDepth2DImage (const vk::DeviceInterface &vk, vk::VkCommandBuffer cmdBuffer, vk::VkImage image, vk::VkImageLayout layout);
+
+void initialTransitionStencil2DImage (const vk::DeviceInterface &vk, vk::VkCommandBuffer cmdBuffer, vk::VkImage image, vk::VkImageLayout layout);
+
+void initialTransitionDepthStencil2DImage (const vk::DeviceInterface &vk, vk::VkCommandBuffer cmdBuffer, vk::VkImage image, vk::VkImageLayout layout);
+
+} //DynamicState
+} //vkt
+
+#endif // _VKT_DYNAMIC_STATE_IMAGEOBJECTUTIL_HPP
@@ -89,8 +89,8 @@ protected:
        PipelineCreateInfo::VertexInputState                    m_vertexInputState;
        de::SharedPtr<Buffer>                                                   m_vertexBuffer;
 
-       vk::Move<vk::VkCmdPool>                                                 m_cmdPool;
-       vk::Move<vk::VkCmdBuffer>                                               m_cmdBuffer;
+       vk::Move<vk::VkCommandPool>                                             m_cmdPool;
+       vk::Move<vk::VkCommandBuffer>                                   m_cmdBuffer;
 
        vk::Move<vk::VkFramebuffer>                                             m_framebuffer;
        vk::Move<vk::VkRenderPass>                                              m_renderPass;
@@ -100,7 +100,7 @@ protected:
 
        std::vector<Vec4RGBA>                                                   m_data;
 
-       PipelineCreateInfo::DepthStencilState                   m_depthStencilState;
+       PipelineCreateInfo::DepthStencilState           m_depthStencilState;
 
        void initialize (void)
        {
@@ -110,27 +110,22 @@ protected:
                const PipelineLayoutCreateInfo pipelineLayoutCreateInfo;
                m_pipelineLayout = vk::createPipelineLayout(m_vk, device, &pipelineLayoutCreateInfo);
 
-               const vk::Unique<vk::VkShader> vs(createShader(m_vk, device,
-                       *createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_vertexShaderName), 0),
-                       "main", vk::VK_SHADER_STAGE_VERTEX));
-
-               const vk::Unique<vk::VkShader> fs(createShader(m_vk, device,
-                       *createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_fragmentShaderName), 0),
-                       "main", vk::VK_SHADER_STAGE_FRAGMENT));
+               const vk::Unique<vk::VkShaderModule> vs(createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_vertexShaderName), 0));
+               const vk::Unique<vk::VkShaderModule> fs(createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_fragmentShaderName), 0));
 
                const vk::VkExtent3D imageExtent = { WIDTH, HEIGHT, 1 };
                ImageCreateInfo targetImageCreateInfo(
-                       vk::VK_IMAGE_TYPE_2D, m_colorAttachmentFormat, imageExtent, 1, 1, 1, vk::VK_IMAGE_TILING_OPTIMAL,
-                       vk::VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | vk::VK_IMAGE_USAGE_TRANSFER_SOURCE_BIT);
+                       vk::VK_IMAGE_TYPE_2D, m_colorAttachmentFormat, imageExtent, 1, 1, vk::VK_SAMPLE_COUNT_1_BIT, vk::VK_IMAGE_TILING_OPTIMAL,
+                       vk::VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | vk::VK_IMAGE_USAGE_TRANSFER_SRC_BIT);
 
-               m_colorTargetImage = Image::CreateAndAlloc(m_vk, device, targetImageCreateInfo, m_context.getDefaultAllocator());
+               m_colorTargetImage = Image::createAndAlloc(m_vk, device, targetImageCreateInfo, m_context.getDefaultAllocator());
 
                const ImageCreateInfo depthStencilImageCreateInfo(
                        vk::VK_IMAGE_TYPE_2D, m_depthStencilAttachmentFormat, imageExtent,
-                       1, 1, 1, vk::VK_IMAGE_TILING_OPTIMAL,
+                       1, 1, vk::VK_SAMPLE_COUNT_1_BIT, vk::VK_IMAGE_TILING_OPTIMAL,
                        vk::VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT);
 
-               m_depthStencilImage = Image::CreateAndAlloc(m_vk, device, depthStencilImageCreateInfo, m_context.getDefaultAllocator());
+               m_depthStencilImage = Image::createAndAlloc(m_vk, device, depthStencilImageCreateInfo, m_context.getDefaultAllocator());
 
                const ImageViewCreateInfo colorTargetViewInfo(m_colorTargetImage->object(), vk::VK_IMAGE_VIEW_TYPE_2D, m_colorAttachmentFormat);
                m_colorTargetView = vk::createImageView(m_vk, device, &colorTargetViewInfo);
@@ -141,7 +136,7 @@ protected:
                RenderPassCreateInfo renderPassCreateInfo;
                renderPassCreateInfo.addAttachment(AttachmentDescription(
                        m_colorAttachmentFormat,
-                       1,
+                       vk::VK_SAMPLE_COUNT_1_BIT,
                        vk::VK_ATTACHMENT_LOAD_OP_LOAD,
                        vk::VK_ATTACHMENT_STORE_OP_STORE,
                        vk::VK_ATTACHMENT_LOAD_OP_DONT_CARE,
@@ -151,7 +146,7 @@ protected:
 
                renderPassCreateInfo.addAttachment(AttachmentDescription(
                        m_depthStencilAttachmentFormat,
-                       1,
+                       vk::VK_SAMPLE_COUNT_1_BIT,
                        vk::VK_ATTACHMENT_LOAD_OP_LOAD,
                        vk::VK_ATTACHMENT_STORE_OP_STORE,
                        vk::VK_ATTACHMENT_LOAD_OP_DONT_CARE,
@@ -173,7 +168,7 @@ protected:
 
                renderPassCreateInfo.addSubpass(SubpassDescription(
                        vk::VK_PIPELINE_BIND_POINT_GRAPHICS,
-                       vk::VK_SUBPASS_DESCRIPTION_NO_OVERDRAW_BIT,
+                       0,
                        0,
                        DE_NULL,
                        1,
@@ -189,7 +184,7 @@ protected:
                {
                        0,
                        sizeof(tcu::Vec4) * 2,
-                       vk::VK_VERTEX_INPUT_STEP_RATE_VERTEX,
+                       vk::VK_VERTEX_INPUT_RATE_VERTEX,
                };
 
                const vk::VkVertexInputAttributeDescription vertexInputAttributeDescriptions[2] =
@@ -217,8 +212,8 @@ protected:
                const PipelineCreateInfo::ColorBlendState::Attachment vkCbAttachmentState;
 
                PipelineCreateInfo pipelineCreateInfo(*m_pipelineLayout, *m_renderPass, 0, 0);
-               pipelineCreateInfo.addShader(PipelineCreateInfo::PipelineShaderStage(*vs, vk::VK_SHADER_STAGE_VERTEX));
-               pipelineCreateInfo.addShader(PipelineCreateInfo::PipelineShaderStage(*fs, vk::VK_SHADER_STAGE_FRAGMENT));
+               pipelineCreateInfo.addShader(PipelineCreateInfo::PipelineShaderStage(*vs, "main", vk::VK_SHADER_STAGE_VERTEX_BIT));
+               pipelineCreateInfo.addShader(PipelineCreateInfo::PipelineShaderStage(*fs, "main", vk::VK_SHADER_STAGE_FRAGMENT_BIT));
                pipelineCreateInfo.addState(PipelineCreateInfo::VertexInputState(m_vertexInputState));
                pipelineCreateInfo.addState(PipelineCreateInfo::InputAssemblerState(m_topology));
                pipelineCreateInfo.addState(PipelineCreateInfo::ColorBlendState(1, &vkCbAttachmentState));
@@ -239,7 +234,7 @@ protected:
                m_framebuffer = vk::createFramebuffer(m_vk, device, &framebufferCreateInfo);
 
                const vk::VkDeviceSize dataSize = m_data.size() * sizeof(Vec4RGBA);
-               m_vertexBuffer = Buffer::CreateAndAlloc(m_vk, device, BufferCreateInfo(dataSize,
+               m_vertexBuffer = Buffer::createAndAlloc(m_vk, device, BufferCreateInfo(dataSize,
                        vk::VK_BUFFER_USAGE_VERTEX_BUFFER_BIT),
                        m_context.getDefaultAllocator(), vk::MemoryRequirement::HostVisible);
 
@@ -254,8 +249,15 @@ protected:
                const CmdPoolCreateInfo cmdPoolCreateInfo(m_context.getUniversalQueueFamilyIndex());
                m_cmdPool = vk::createCommandPool(m_vk, device, &cmdPoolCreateInfo);
 
-               const CmdBufferCreateInfo cmdBufCreateInfo(*m_cmdPool, vk::VK_CMD_BUFFER_LEVEL_PRIMARY, 0);
-               m_cmdBuffer = vk::createCommandBuffer(m_vk, device, &cmdBufCreateInfo);
+               const vk::VkCommandBufferAllocateInfo cmdBufferAllocateInfo =
+               {
+                       vk::VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO,     // VkStructureType                      sType;
+                       DE_NULL,                                                                                        // const void*                          pNext;
+                       *m_cmdPool,                                                                                     // VkCommandPool                        commandPool;
+                       vk::VK_COMMAND_BUFFER_LEVEL_PRIMARY,                            // VkCommandBufferLevel         level;
+                       1u,                                                                                                     // deUint32                                     bufferCount;
+               };
+               m_cmdBuffer = vk::allocateCommandBuffer(m_vk, device, &cmdBufferAllocateInfo);
        }
 
        virtual tcu::TestStatus iterate (void)
@@ -275,7 +277,7 @@ protected:
                m_vk.beginCommandBuffer(*m_cmdBuffer, &beginInfo);
 
                initialTransitionColor2DImage(m_vk, *m_cmdBuffer, m_colorTargetImage->object(), vk::VK_IMAGE_LAYOUT_GENERAL);
-               initialTransitionDepthStencil2DImage(m_vk, *m_cmdBuffer, m_depthStencilImage->object(), vk::VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL);
+               initialTransitionDepthStencil2DImage(m_vk, *m_cmdBuffer, m_depthStencilImage->object(), vk::VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
 
                const ImageSubresourceRange subresourceRangeImage(vk::VK_IMAGE_ASPECT_COLOR_BIT);
                m_vk.cmdClearColorImage(*m_cmdBuffer, m_colorTargetImage->object(),
@@ -285,19 +287,19 @@ protected:
 
                const ImageSubresourceRange subresourceRangeDepthStencil[2] = { vk::VK_IMAGE_ASPECT_DEPTH_BIT, vk::VK_IMAGE_ASPECT_STENCIL_BIT };
                m_vk.cmdClearDepthStencilImage(*m_cmdBuffer, m_depthStencilImage->object(),
-                       vk::VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL, &depthStencilClearValue, 2, subresourceRangeDepthStencil);
+                       vk::VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &depthStencilClearValue, 2, subresourceRangeDepthStencil);
 
                const vk::VkRect2D renderArea = { { 0, 0 }, { WIDTH, HEIGHT } };
                const RenderPassBeginInfo renderPassBegin(*m_renderPass, *m_framebuffer, renderArea);
 
-               m_vk.cmdBeginRenderPass(*m_cmdBuffer, &renderPassBegin, vk::VK_RENDER_PASS_CONTENTS_INLINE);
+               m_vk.cmdBeginRenderPass(*m_cmdBuffer, &renderPassBegin, vk::VK_SUBPASS_CONTENTS_INLINE);
        }
 
        void setDynamicViewportState (const deUint32 width, const deUint32 height)
        {
                vk::VkViewport viewport;
-               viewport.originX = 0;
-               viewport.originY = 0;
+               viewport.x = 0;
+               viewport.y = 0;
                viewport.width = static_cast<float>(width);
                viewport.height = static_cast<float>(height);
                viewport.minDepth = 0.0f;
@@ -319,20 +321,20 @@ protected:
                m_vk.cmdSetScissor(*m_cmdBuffer, viewportCount, pScissors);
        }
 
-       void setDynamicRasterState (const float lineWidth = 1.0f,
-               const float depthBias = 0.0f,
+       void setDynamicRasterizationState (const float lineWidth = 1.0f,
+               const float depthBiasConstantFactor = 0.0f,
                const float depthBiasClamp = 0.0f,
-               const float slopeScaledDepthBias = 0.0f)
+               const float depthBiasSlopeFactor = 0.0f)
        {
                m_vk.cmdSetLineWidth(*m_cmdBuffer, lineWidth);
-               m_vk.cmdSetDepthBias(*m_cmdBuffer, depthBias, depthBiasClamp, slopeScaledDepthBias);
+               m_vk.cmdSetDepthBias(*m_cmdBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor);
        }
 
        void setDynamicBlendState (const float const1 = 0.0f, const float const2 = 0.0f,
                const float const3 = 0.0f, const float const4 = 0.0f)
        {
-               float blendConstants[4] = { const1, const2, const3, const4 };
-               m_vk.cmdSetBlendConstants(*m_cmdBuffer, blendConstants);
+               float blendConstantsants[4] = { const1, const2, const3, const4 };
+               m_vk.cmdSetBlendConstants(*m_cmdBuffer, blendConstantsants);
        }
 
        void setDynamicDepthStencilState (const float minDepthBounds = -1.0f, const float maxDepthBounds = 1.0f,
@@ -373,7 +375,7 @@ public:
 
                // enable depth test
                m_depthStencilState = PipelineCreateInfo::DepthStencilState(
-                       vk::VK_TRUE, vk::VK_TRUE, vk::VK_COMPARE_OP_GREATER_EQUAL);
+                       vk::VK_TRUE, vk::VK_TRUE, vk::VK_COMPARE_OP_GREATER_OR_EQUAL);
 
                DepthBiasBaseCase::initialize();
        }
@@ -396,18 +398,28 @@ public:
                const vk::VkBuffer vertexBuffer = m_vertexBuffer->object();
                m_vk.cmdBindVertexBuffers(*m_cmdBuffer, 0, 1, &vertexBuffer, &vertexBufferOffset);
 
-               setDynamicRasterState(1.0f, 0.0f);
+               setDynamicRasterizationState(1.0f, 0.0f);
                m_vk.cmdDraw(*m_cmdBuffer, 4, 1, 0, 0);
                m_vk.cmdDraw(*m_cmdBuffer, 4, 1, 4, 0);
 
-               setDynamicRasterState(1.0f, -1.0f);
+               setDynamicRasterizationState(1.0f, -1.0f);
                m_vk.cmdDraw(*m_cmdBuffer, 4, 1, 8, 0);
 
                m_vk.cmdEndRenderPass(*m_cmdBuffer);
                m_vk.endCommandBuffer(*m_cmdBuffer);
 
-               const vk::VkCmdBuffer cmdBuffer = *m_cmdBuffer;
-               VK_CHECK(m_vk.queueSubmit(queue, 1, &cmdBuffer, DE_NULL));
+               vk::VkSubmitInfo submitInfo =
+               {
+                       vk::VK_STRUCTURE_TYPE_SUBMIT_INFO,      // VkStructureType                      sType;
+                       DE_NULL,                                                        // const void*                          pNext;
+                       0,                                                                      // deUint32                                     waitSemaphoreCount;
+                       DE_NULL,                                                        // const VkSemaphore*           pWaitSemaphores;
+                       1,                                                                      // deUint32                                     commandBufferCount;
+                       &m_cmdBuffer.get(),                                     // const VkCommandBuffer*       pCommandBuffers;
+                       0,                                                                      // deUint32                                     signalSemaphoreCount;
+                       DE_NULL                                                         // const VkSemaphore*           pSignalSemaphores;
+               };
+               m_vk.queueSubmit(queue, 1, &submitInfo, DE_NULL);
 
                // validation
                {
@@ -438,7 +450,7 @@ public:
 
                        const vk::VkOffset3D zeroOffset = { 0, 0, 0 };
                        const tcu::ConstPixelBufferAccess renderedFrame = m_colorTargetImage->readSurface(queue, m_context.getDefaultAllocator(),
-                               vk::VK_IMAGE_LAYOUT_GENERAL, zeroOffset, WIDTH, HEIGHT, vk::VK_IMAGE_ASPECT_COLOR);
+                               vk::VK_IMAGE_LAYOUT_GENERAL, zeroOffset, WIDTH, HEIGHT, vk::VK_IMAGE_ASPECT_COLOR_BIT);
 
                        qpTestResult res = QP_TEST_RESULT_PASS;
 
@@ -472,7 +484,7 @@ public:
 
                // enable depth test
                m_depthStencilState = PipelineCreateInfo::DepthStencilState(
-                       vk::VK_TRUE, vk::VK_TRUE, vk::VK_COMPARE_OP_GREATER_EQUAL);
+                       vk::VK_TRUE, vk::VK_TRUE, vk::VK_COMPARE_OP_GREATER_OR_EQUAL);
 
                DepthBiasBaseCase::initialize();
        }
@@ -495,17 +507,27 @@ public:
                const vk::VkBuffer vertexBuffer = m_vertexBuffer->object();
                m_vk.cmdBindVertexBuffers(*m_cmdBuffer, 0, 1, &vertexBuffer, &vertexBufferOffset);
 
-               setDynamicRasterState(1.0f, 1000.0f, 0.005f);
+               setDynamicRasterizationState(1.0f, 1000.0f, 0.005f);
                m_vk.cmdDraw(*m_cmdBuffer, 4, 1, 0, 0);
 
-               setDynamicRasterState(1.0f, 0.0f);
+               setDynamicRasterizationState(1.0f, 0.0f);
                m_vk.cmdDraw(*m_cmdBuffer, 4, 1, 4, 0);
 
                m_vk.cmdEndRenderPass(*m_cmdBuffer);
                m_vk.endCommandBuffer(*m_cmdBuffer);
 
-               const vk::VkCmdBuffer cmdBuffer = *m_cmdBuffer;
-               VK_CHECK(m_vk.queueSubmit(queue, 1, &cmdBuffer, DE_NULL));
+               vk::VkSubmitInfo submitInfo =
+               {
+                       vk::VK_STRUCTURE_TYPE_SUBMIT_INFO,      // VkStructureType                      sType;
+                       DE_NULL,                                                        // const void*                          pNext;
+                       0,                                                                      // deUint32                                     waitSemaphoreCount;
+                       DE_NULL,                                                        // const VkSemaphore*           pWaitSemaphores;
+                       1,                                                                      // deUint32                                     commandBufferCount;
+                       &m_cmdBuffer.get(),                                     // const VkCommandBuffer*       pCommandBuffers;
+                       0,                                                                      // deUint32                                     signalSemaphoreCount;
+                       DE_NULL                                                         // const VkSemaphore*           pSignalSemaphores;
+               };
+               m_vk.queueSubmit(queue, 1, &submitInfo, DE_NULL);
 
                // validation
                {
@@ -536,7 +558,7 @@ public:
 
                        const vk::VkOffset3D zeroOffset = { 0, 0, 0 };
                        const tcu::ConstPixelBufferAccess renderedFrame = m_colorTargetImage->readSurface(queue, m_context.getDefaultAllocator(),
-                               vk::VK_IMAGE_LAYOUT_GENERAL, zeroOffset, WIDTH, HEIGHT, vk::VK_IMAGE_ASPECT_COLOR);
+                               vk::VK_IMAGE_LAYOUT_GENERAL, zeroOffset, WIDTH, HEIGHT, vk::VK_IMAGE_ASPECT_COLOR_BIT);
 
                        qpTestResult res = QP_TEST_RESULT_PASS;
 
@@ -580,7 +602,7 @@ public:
                setDynamicViewportState(WIDTH, HEIGHT);
                setDynamicBlendState();
                setDynamicDepthStencilState();
-               setDynamicRasterState(floor(deviceProperties.limits.lineWidthRange[1]));
+               setDynamicRasterizationState(floor(deviceProperties.limits.lineWidthRange[1]));
 
                m_vk.cmdBindPipeline(*m_cmdBuffer, vk::VK_PIPELINE_BIND_POINT_GRAPHICS, *m_pipeline);
 
@@ -593,8 +615,18 @@ public:
                m_vk.cmdEndRenderPass(*m_cmdBuffer);
                m_vk.endCommandBuffer(*m_cmdBuffer);
 
-               const vk::VkCmdBuffer cmdBuffer = *m_cmdBuffer;
-               VK_CHECK(m_vk.queueSubmit(queue, 1, &cmdBuffer, DE_NULL));
+               vk::VkSubmitInfo submitInfo =
+               {
+                       vk::VK_STRUCTURE_TYPE_SUBMIT_INFO,      // VkStructureType                      sType;
+                       DE_NULL,                                                        // const void*                          pNext;
+                       0,                                                                      // deUint32                                     waitSemaphoreCount;
+                       DE_NULL,                                                        // const VkSemaphore*           pWaitSemaphores;
+                       1,                                                                      // deUint32                                     commandBufferCount;
+                       &m_cmdBuffer.get(),                                     // const VkCommandBuffer*       pCommandBuffers;
+                       0,                                                                      // deUint32                                     signalSemaphoreCount;
+                       DE_NULL                                                         // const VkSemaphore*           pSignalSemaphores;
+               };
+               m_vk.queueSubmit(queue, 1, &submitInfo, DE_NULL);
 
                // validation
                {
@@ -624,7 +656,7 @@ public:
 
                        const vk::VkOffset3D zeroOffset = { 0, 0, 0 };
                        const tcu::ConstPixelBufferAccess renderedFrame = m_colorTargetImage->readSurface(queue, m_context.getDefaultAllocator(),
-                               vk::VK_IMAGE_LAYOUT_GENERAL, zeroOffset, WIDTH, HEIGHT, vk::VK_IMAGE_ASPECT_COLOR);
+                               vk::VK_IMAGE_LAYOUT_GENERAL, zeroOffset, WIDTH, HEIGHT, vk::VK_IMAGE_ASPECT_COLOR_BIT);
 
                        qpTestResult res = QP_TEST_RESULT_PASS;
 
@@ -97,8 +97,18 @@ public:
                m_vk.cmdEndRenderPass(*m_cmdBuffer);
                m_vk.endCommandBuffer(*m_cmdBuffer);
 
-               const vk::VkCmdBuffer cmdBuffer = *m_cmdBuffer;
-               VK_CHECK(m_vk.queueSubmit(queue, 1, &cmdBuffer, DE_NULL));
+               vk::VkSubmitInfo submitInfo =
+               {
+                       vk::VK_STRUCTURE_TYPE_SUBMIT_INFO,      // VkStructureType                      sType;\r
+                       DE_NULL,                                                        // const void*                          pNext;\r
+                       0,                                                                      // deUint32                                     waitSemaphoreCount;\r
+                       DE_NULL,                                                        // const VkSemaphore*           pWaitSemaphores;\r
+                       1,                                                                      // deUint32                                     commandBufferCount;\r
+                       &m_cmdBuffer.get(),                                     // const VkCommandBuffer*       pCommandBuffers;\r
+                       0,                                                                      // deUint32                                     signalSemaphoreCount;\r
+                       DE_NULL                                                         // const VkSemaphore*           pSignalSemaphores;\r
+               };
+               m_vk.queueSubmit(queue, 1, &submitInfo, DE_NULL);
 
                // validation
                {
@@ -108,7 +118,7 @@ public:
 
                        const vk::VkOffset3D zeroOffset = { 0, 0, 0 };
                        const tcu::ConstPixelBufferAccess renderedFrame = m_colorTargetImage->readSurface(queue, m_context.getDefaultAllocator(),
-                               vk::VK_IMAGE_LAYOUT_GENERAL, zeroOffset, WIDTH, HEIGHT, vk::VK_IMAGE_ASPECT_COLOR);
+                               vk::VK_IMAGE_LAYOUT_GENERAL, zeroOffset, WIDTH, HEIGHT, vk::VK_IMAGE_ASPECT_COLOR_BIT);
 
                        qpTestResult res = QP_TEST_RESULT_PASS;
 
@@ -139,7 +149,7 @@ public:
                const vk::VkRect2D scissor = { { 0, 0 }, { WIDTH, HEIGHT } };
 
                setDynamicViewportState(1, &viewport, &scissor);
-               setDynamicRasterState();
+               setDynamicRasterizationState();
                setDynamicBlendState();
                setDynamicDepthStencilState();
        }
@@ -186,7 +196,7 @@ public:
                const vk::VkRect2D scissor = { { 0, 0 }, { WIDTH / 2, HEIGHT / 2 } };
 
                setDynamicViewportState(1, &viewport, &scissor);
-               setDynamicRasterState();
+               setDynamicRasterizationState();
                setDynamicBlendState();
                setDynamicDepthStencilState();
        }
@@ -232,10 +242,10 @@ public:
        {
                for (int i = 0; i < 4; i++)
                {
-                       m_data.push_back(Vec4RGBA(tcu::Vec4(-1.0f, 1.0f, (float)i, 1.0f), vec4Green()));
-                       m_data.push_back(Vec4RGBA(tcu::Vec4(1.0f, 1.0f, (float)i, 1.0f), vec4Green()));
-                       m_data.push_back(Vec4RGBA(tcu::Vec4(-1.0f, -1.0f, (float)i, 1.0f), vec4Green()));
-                       m_data.push_back(Vec4RGBA(tcu::Vec4(1.0f, -1.0f, (float)i, 1.0f), vec4Green()));
+                       m_data.push_back(Vec4RGBA(tcu::Vec4(-1.0f, 1.0f, (float)i / 3.0f, 1.0f), vec4Green()));
+                       m_data.push_back(Vec4RGBA(tcu::Vec4(1.0f, 1.0f, (float)i / 3.0f, 1.0f), vec4Green()));
+                       m_data.push_back(Vec4RGBA(tcu::Vec4(-1.0f, -1.0f, (float)i / 3.0f, 1.0f), vec4Green()));
+                       m_data.push_back(Vec4RGBA(tcu::Vec4(1.0f, -1.0f, (float)i / 3.0f, 1.0f), vec4Green()));
                }
 
                DynamicStateBaseClass::initialize();
@@ -243,24 +253,16 @@ public:
 
        virtual void initPipeline (const vk::VkDevice device)
        {
-               const vk::Unique<vk::VkShader> vs(createShader(m_vk, device,
-                       *createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_vertexShaderName), 0),
-                       "main", vk::VK_SHADER_STAGE_VERTEX));
-
-               const vk::Unique<vk::VkShader> gs(createShader(m_vk, device,
-                       *createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_geometryShaderName), 0),
-                       "main", vk::VK_SHADER_STAGE_GEOMETRY));
-
-               const vk::Unique<vk::VkShader> fs(createShader(m_vk, device,
-                       *createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_fragmentShaderName), 0),
-                       "main", vk::VK_SHADER_STAGE_FRAGMENT));
+               const vk::Unique<vk::VkShaderModule> vs(createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_vertexShaderName), 0));
+               const vk::Unique<vk::VkShaderModule> gs(createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_geometryShaderName), 0));
+               const vk::Unique<vk::VkShaderModule> fs(createShaderModule(m_vk, device, m_context.getBinaryCollection().get(m_fragmentShaderName), 0));
 
                const PipelineCreateInfo::ColorBlendState::Attachment vkCbAttachmentState;
 
                PipelineCreateInfo pipelineCreateInfo(*m_pipelineLayout, *m_renderPass, 0, 0);
-               pipelineCreateInfo.addShader(PipelineCreateInfo::PipelineShaderStage(*vs, vk::VK_SHADER_STAGE_VERTEX));
-               pipelineCreateInfo.addShader(PipelineCreateInfo::PipelineShaderStage(*gs, vk::VK_SHADER_STAGE_GEOMETRY));
-               pipelineCreateInfo.addShader(PipelineCreateInfo::PipelineShaderStage(*fs, vk::VK_SHADER_STAGE_FRAGMENT));
+               pipelineCreateInfo.addShader(PipelineCreateInfo::PipelineShaderStage(*vs, "main", vk::VK_SHADER_STAGE_VERTEX_BIT));
+               pipelineCreateInfo.addShader(PipelineCreateInfo::PipelineShaderStage(*gs, "main", vk::VK_SHADER_STAGE_GEOMETRY_BIT));
+               pipelineCreateInfo.addShader(PipelineCreateInfo::PipelineShaderStage(*fs, "main", vk::VK_SHADER_STAGE_FRAGMENT_BIT));
                pipelineCreateInfo.addState(PipelineCreateInfo::VertexInputState(m_vertexInputState));
                pipelineCreateInfo.addState(PipelineCreateInfo::InputAssemblerState(m_topology));
                pipelineCreateInfo.addState(PipelineCreateInfo::ColorBlendState(1, &vkCbAttachmentState));
@@ -303,7 +305,7 @@ public:
                };
 
                setDynamicViewportState(4, viewports, scissors);
-               setDynamicRasterState();
+               setDynamicRasterizationState();
                setDynamicBlendState();
                setDynamicDepthStencilState();
 
@@ -318,8 +320,18 @@ public:
                m_vk.cmdEndRenderPass(*m_cmdBuffer);
                m_vk.endCommandBuffer(*m_cmdBuffer);
 
-               const vk::VkCmdBuffer cmdBuffer = *m_cmdBuffer;
-               VK_CHECK(m_vk.queueSubmit(queue, 1, &cmdBuffer, DE_NULL));
+               vk::VkSubmitInfo submitInfo =
+               {
+                       vk::VK_STRUCTURE_TYPE_SUBMIT_INFO,      // VkStructureType                      sType;\r
+                       DE_NULL,                                                        // const void*                          pNext;\r
+                       0,                                                                      // deUint32                                     waitSemaphoreCount;\r
+                       DE_NULL,                                                        // const VkSemaphore*           pWaitSemaphores;\r
+                       1,                                                                      // deUint32                                     commandBufferCount;\r
+                       &m_cmdBuffer.get(),                                     // const VkCommandBuffer*       pCommandBuffers;\r
+                       0,                                                                      // deUint32                                     signalSemaphoreCount;\r
+                       DE_NULL                                                         // const VkSemaphore*           pSignalSemaphores;\r
+               };
+               m_vk.queueSubmit(queue, 1, &submitInfo, DE_NULL);
 
                // validation
                {
@@ -348,7 +360,7 @@ public:
 
                        const vk::VkOffset3D zeroOffset = { 0, 0, 0 };
                        const tcu::ConstPixelBufferAccess renderedFrame = m_colorTargetImage->readSurface(queue, m_context.getDefaultAllocator(),
-                               vk::VK_IMAGE_LAYOUT_GENERAL, zeroOffset, WIDTH, HEIGHT, vk::VK_IMAGE_ASPECT_COLOR);
+                               vk::VK_IMAGE_LAYOUT_GENERAL, zeroOffset, WIDTH, HEIGHT, vk::VK_IMAGE_ASPECT_COLOR_BIT);
                                        
                        qpTestResult res = QP_TEST_RESULT_PASS;