Static code analysis fixes
authorJari Komppa <jari.komppa@siru.fi>
Fri, 16 Apr 2021 08:42:53 +0000 (11:42 +0300)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 13 May 2021 18:03:31 +0000 (18:03 +0000)
This change contains multiple static code analysis fixes,
including uninitialized member variables, initialization
order, buffer overruns, value use before value check,
copy-paste mistakes like repeated identical checks.

In theory the changes should not change test behavior, as
the biggest changes to behavior are largely about error
handling.

Due to large number of files touched, affects mask is
over-wide.

Affects:
dEQP-VK.*

Change-Id: Ie18811d60b0b1f1165895e4c1cbf00084382a47a
Components: Vulkan

39 files changed:
external/vulkancts/framework/vulkan/vkImageUtil.cpp
external/vulkancts/modules/vulkan/amber/vktAmberTestCaseUtil.cpp
external/vulkancts/modules/vulkan/api/vktApiCopiesAndBlittingTests.cpp
external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp
external/vulkancts/modules/vulkan/api/vktApiImageClearingTests.cpp
external/vulkancts/modules/vulkan/binding_model/vktBindingShaderAccessTests.cpp
external/vulkancts/modules/vulkan/conditional_rendering/vktConditionalDrawAndClearTests.cpp
external/vulkancts/modules/vulkan/draw/vktDrawDepthClampTests.cpp
external/vulkancts/modules/vulkan/draw/vktDrawIndirectTest.cpp
external/vulkancts/modules/vulkan/draw/vktDrawScissorTests.cpp
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateDSTests.cpp
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateRSTests.cpp
external/vulkancts/modules/vulkan/geometry/vktGeometryBasicClass.cpp
external/vulkancts/modules/vulkan/geometry/vktGeometryLayeredRenderingTests.cpp
external/vulkancts/modules/vulkan/image/vktImageSubresourceLayoutTests.cpp
external/vulkancts/modules/vulkan/memory/vktMemoryPipelineBarrierTests.cpp
external/vulkancts/modules/vulkan/memory/vktMemoryRequirementsTests.cpp
external/vulkancts/modules/vulkan/multiview/vktMultiViewRenderTests.cpp
external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleMixedAttachmentSamplesTests.cpp
external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleShaderFragmentMaskTests.cpp
external/vulkancts/modules/vulkan/pipeline/vktPipelinePushConstantTests.cpp
external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemContext.cpp
external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemContext.hpp
external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemCopyImageToBufferTests.cpp
external/vulkancts/modules/vulkan/rasterization/vktRasterizationTests.cpp
external/vulkancts/modules/vulkan/shaderrender/vktShaderRender.cpp
external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderOperatorTests.cpp
external/vulkancts/modules/vulkan/sparse_resources/vktSparseResourcesBufferTests.cpp
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmIndexingTests.cpp
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp
external/vulkancts/modules/vulkan/synchronization/vktSynchronizationSmokeTests.cpp
external/vulkancts/modules/vulkan/synchronization/vktSynchronizationWin32KeyedMutexTests.cpp
external/vulkancts/modules/vulkan/texture/vktTextureFilteringExplicitLodTests.cpp
external/vulkancts/modules/vulkan/texture/vktTextureShadowTests.cpp
external/vulkancts/modules/vulkan/texture/vktTextureSwizzleTests.cpp
external/vulkancts/modules/vulkan/texture/vktTextureTestUtil.cpp
external/vulkancts/modules/vulkan/vktBuildPrograms.cpp
external/vulkancts/modules/vulkan/wsi/vktWsiColorSpaceTests.cpp
external/vulkancts/modules/vulkan/wsi/vktWsiFullScreenExclusiveTests.cpp

index 2943abe..92a83b6 100644 (file)
@@ -3743,6 +3743,7 @@ static VkBorderColor mapBorderColor (tcu::TextureChannelClass channelClass, cons
                else                                                                                              return VK_BORDER_COLOR_FLOAT_CUSTOM_EXT;
        }
 
+       // note: never reached
        DE_FATAL("Unsupported border color");
        return VK_BORDER_COLOR_MAX_ENUM;
 }
index c039a13..d8ff961 100644 (file)
@@ -79,7 +79,7 @@ class AmberIndexFileParser
 
        void expect (char c)
        {
-               if (m_str[m_idx] != c || m_idx >= m_len)
+               if (m_idx >= m_len || m_str[m_idx] != c)
                        TCU_THROW(ResourceError, "Error parsing amber index file");
 
                m_idx++;
index 91c1359..bff0307 100644 (file)
@@ -300,6 +300,8 @@ struct TestParams
 
        TestParams (void)
        {
+               allocationKind                          = ALLOCATION_KIND_DEDICATED;
+               extensionUse                            = EXTENSION_USE_NONE;
                mipLevels                                       = 1u;
                singleCommand                           = DE_TRUE;
                barrierCount                            = 1u;
index dea9322..d17c9be 100644 (file)
@@ -4189,7 +4189,7 @@ tcu::TestStatus deviceProperties2 (Context& context)
                {
                        // If deviceLUIDValid is VK_FALSE, the contents of deviceLUID and deviceNodeMask are undefined
                        // so thay can only be compared when deviceLUIDValid is VK_TRUE.
-                       if ((deMemCmp(idProperties[0].deviceLUID, idProperties[1].deviceLUID, VK_UUID_SIZE) != 0) ||
+                       if ((deMemCmp(idProperties[0].deviceLUID, idProperties[1].deviceLUID, VK_LUID_SIZE) != 0) ||
                                (idProperties[0].deviceNodeMask         != idProperties[1].deviceNodeMask))
                        {
                                TCU_FAIL("Mismatch between VkPhysicalDeviceIDProperties");
@@ -4358,6 +4358,7 @@ tcu::TestStatus deviceProperties2 (Context& context)
 
                log << TestLog::Message << performanceQueryProperties[0] << TestLog::EndMessage;
 
+               // TODO: this is a NOP. Should the second index be [1] ?
                if (performanceQueryProperties[0].allowCommandBufferQueryCopies != performanceQueryProperties[0].allowCommandBufferQueryCopies)
                {
                        TCU_FAIL("Mismatch between VkPhysicalDevicePerformanceQueryPropertiesKHR");
@@ -5142,7 +5143,7 @@ tcu::TestStatus devicePropertyExtensionsConsistencyVulkan12(Context& context)
                {
                        // If deviceLUIDValid is VK_FALSE, the contents of deviceLUID and deviceNodeMask are undefined
                        // so thay can only be compared when deviceLUIDValid is VK_TRUE.
-                       if ((deMemCmp(idProperties.deviceLUID, vulkan11Properties.deviceLUID, VK_UUID_SIZE) != 0) ||
+                       if ((deMemCmp(idProperties.deviceLUID, vulkan11Properties.deviceLUID, VK_LUID_SIZE) != 0) ||
                                (idProperties.deviceNodeMask != vulkan11Properties.deviceNodeMask))
                        {
                                TCU_FAIL("Mismatch between VkPhysicalDeviceIDProperties and VkPhysicalDeviceVulkan11Properties");
index 4a0c82e..316e726 100644 (file)
@@ -287,7 +287,7 @@ bool comparePixelToDepthClearValue (const ConstPixelBufferAccess&   access,
                {
                        const float     depth                   = access.getPixDepth(x, y);
                        const int       mantissaBits    = getTextureFormatMantissaBitDepth(format).x();
-                       const int       threshold               = 10 * 1 << (23 - mantissaBits);
+                       const int       threshold               = (10 * 1) << (23 - mantissaBits);
 
                        DE_ASSERT(mantissaBits <= 23);
 
index e479adb..2f35700 100644 (file)
@@ -5248,25 +5248,28 @@ tcu::Vec4 ImageSampleInstanceImages::getSamplePos (vk::VkImageViewType viewType,
                                2u % arraySize,
                        };
 
-                       if (viewType == vk::VK_IMAGE_VIEW_TYPE_1D || viewType == vk::VK_IMAGE_VIEW_TYPE_1D_ARRAY)
-                               return tcu::Vec4(coords[samplePosNdx].x() / (float)imageSize,
-                                                                (float)slices[samplePosNdx],
-                                                                0.0f,
-                                                                0.0f);
-                       else if (viewType == vk::VK_IMAGE_VIEW_TYPE_2D || viewType == vk::VK_IMAGE_VIEW_TYPE_2D_ARRAY)
-                               return tcu::Vec4(coords[samplePosNdx].x() / (float)imageSize,
-                                                                coords[samplePosNdx].y() / (float)imageSize,
-                                                                (float)slices[samplePosNdx],
-                                                                0.0f);
-                       else if (viewType == vk::VK_IMAGE_VIEW_TYPE_3D)
-                               return tcu::Vec4(coords[samplePosNdx].x() / (float)imageSize,
-                                                                coords[samplePosNdx].y() / (float)imageSize,
-                                                                coords[samplePosNdx].z() / (float)imageSize,
-                                                                0.0f);
-                       else
+                       switch (viewType)
                        {
-                               DE_FATAL("Impossible");
-                               return tcu::Vec4();
+                       case vk::VK_IMAGE_VIEW_TYPE_1D:
+                       case vk::VK_IMAGE_VIEW_TYPE_1D_ARRAY:
+                                       return tcu::Vec4(coords[samplePosNdx].x() / (float)imageSize,
+                                               (float)slices[samplePosNdx],
+                                               0.0f,
+                                               0.0f);
+                       case vk::VK_IMAGE_VIEW_TYPE_2D:
+                       case vk::VK_IMAGE_VIEW_TYPE_2D_ARRAY:
+                                       return tcu::Vec4(coords[samplePosNdx].x() / (float)imageSize,
+                                               coords[samplePosNdx].y() / (float)imageSize,
+                                               (float)slices[samplePosNdx],
+                                               0.0f);
+                       case vk::VK_IMAGE_VIEW_TYPE_3D:
+                                       return tcu::Vec4(coords[samplePosNdx].x() / (float)imageSize,
+                                               coords[samplePosNdx].y() / (float)imageSize,
+                                               coords[samplePosNdx].z() / (float)imageSize,
+                                               0.0f);
+                       default:
+                                       DE_FATAL("Impossible");
+                                       return tcu::Vec4();
                        }
                }
 
index 9113482..d269a5d 100644 (file)
@@ -288,12 +288,13 @@ protected:
 };
 
 ConditionalRenderingBaseTestInstance::ConditionalRenderingBaseTestInstance (Context& context)
-       : TestInstance                                  (context)
-       , m_vki                                                 (m_context.getInstanceInterface())
-       , m_vkd                                                 (m_context.getDeviceInterface())
-       , m_device                                              (m_context.getDevice())
-       , m_physicalDevice                              (m_context.getPhysicalDevice())
-       , m_queue                                               (m_context.getUniversalQueue())
+       : TestInstance                                                  (context)
+       , m_vki                                                                 (m_context.getInstanceInterface())
+       , m_vkd                                                                 (m_context.getDeviceInterface())
+       , m_device                                                              (m_context.getDevice())
+       , m_physicalDevice                                              (m_context.getPhysicalDevice())
+       , m_queue                                                               (m_context.getUniversalQueue())
+       , m_conditionalRenderingBufferOffset    (0)
 {
 }
 
index 832c007..87cdf6f 100644 (file)
@@ -463,7 +463,7 @@ public:
                VkImageFormatProperties imageFormatProperties;
                const auto&     vki             = context.getInstanceInterface();
                const auto&     vkd             = context.getPhysicalDevice();
-               const auto      usage   = VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT;
+               const auto      usage   = VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT;
                if (vki.getPhysicalDeviceImageFormatProperties(vkd, m_format, VK_IMAGE_TYPE_2D, VK_IMAGE_TILING_OPTIMAL, usage, 0u, &imageFormatProperties) == VK_ERROR_FORMAT_NOT_SUPPORTED)
                {
                        TCU_THROW(NotSupportedError, "Format not supported");
index 60b11e1..55d12df 100644 (file)
@@ -82,7 +82,8 @@ enum class IndirectCountType
 struct DrawTypedTestSpec : public TestSpecBase
 {
        DrawTypedTestSpec()
-               : testFirstInstanceNdx(false)
+               : drawType(DRAWTYPE_LAST)
+               , testFirstInstanceNdx(false)
                , testIndirectCountExt(IndirectCountType::NONE)
        {};
 
index 6318160..ca4817d 100644 (file)
@@ -120,7 +120,8 @@ class QuadDrawTestCommand : public TestCommand
 };
 
 QuadDrawTestCommand::QuadDrawTestCommand (deUint32 x, deUint32 y, deUint32 width, deUint32 height, Vec4 color)
-: m_quad(x, y, width, height, color)
+: m_offset(0)
+, m_quad(x, y, width, height, color)
 {
 }
 
index 982d8ba..af7ac93 100644 (file)
@@ -61,6 +61,7 @@ public:
        DepthStencilBaseCase (Context& context, const char* vertexShaderName, const char* fragmentShaderName)
                : TestInstance                                          (context)
                , m_colorAttachmentFormat                       (vk::VK_FORMAT_R8G8B8A8_UNORM)
+               , m_depthStencilAttachmentFormat        (vk::VK_FORMAT_UNDEFINED)
                , m_topology                                            (vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP)
                , m_vk                                                          (context.getDeviceInterface())
                , m_vertexShaderName                            (vertexShaderName)
index a6dd053..1d13ba0 100644 (file)
@@ -53,6 +53,7 @@ public:
        DepthBiasBaseCase (Context& context, const char* vertexShaderName, const char* fragmentShaderName)
                : TestInstance                                          (context)
                , m_colorAttachmentFormat                       (vk::VK_FORMAT_R8G8B8A8_UNORM)
+               , m_depthStencilAttachmentFormat        (vk::VK_FORMAT_UNDEFINED)
                , m_topology                                            (vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP)
                , m_vk                                                          (context.getDeviceInterface())
                , m_vertexShaderName                            (vertexShaderName)
index c90e076..b035604 100644 (file)
@@ -62,6 +62,7 @@ GeometryExpanderRenderTestInstance::GeometryExpanderRenderTestInstance (Context&
        : TestInstance          (context)
        , m_primitiveType       (primitiveType)
        , m_name                        (name)
+       , m_numDrawVertices     (0)
 {
 }
 
index 47a5700..3866ab7 100644 (file)
@@ -535,6 +535,7 @@ bool verifyImageSingleColoredRow (tcu::TestLog& log, const tcu::ConstPixelBuffer
                return false;
        }
 
+       // Note: this is never reached
        log << tcu::TestLog::Image("LayerContent", "Layer content", image);
 
        return allPixelsOk;
index b9086c5..8b05ea0 100644 (file)
@@ -158,7 +158,7 @@ const BufferLevels::Level& BufferLevels::getLevel (deUint32 level) const
 VkExtent3D getDefaultDimensions (VkImageType type, bool array)
 {
        DE_ASSERT(type == VK_IMAGE_TYPE_2D || type == VK_IMAGE_TYPE_3D);
-       DE_ASSERT(!array || VK_IMAGE_TYPE_2D);
+       DE_ASSERT(!array || type == VK_IMAGE_TYPE_2D);
 
        constexpr VkExtent3D kDefault3D                 = { 32u, 48u, 56u };
        constexpr VkExtent3D kDefault2DArray    = kDefault3D;
index 5f70d18..3d0baf3 100644 (file)
@@ -1327,6 +1327,7 @@ HostMemoryAccess::HostMemoryAccess (bool read, bool write, deUint32 seed)
        : m_read        (read)
        , m_write       (write)
        , m_seed        (seed)
+       , m_size        (0)
 {
 }
 
@@ -1586,8 +1587,10 @@ private:
 
 CreateImage::CreateImage (vk::VkImageUsageFlags        usage,
                                                  vk::VkSharingMode             sharing)
-       : m_usage       (usage)
-       , m_sharing     (sharing)
+       : m_usage               (usage)
+       , m_sharing             (sharing)
+       , m_imageWidth  (0)
+       , m_imageHeight (0)
 {
 }
 
@@ -2089,6 +2092,7 @@ ImageTransition::ImageTransition (vk::VkPipelineStageFlags        srcStages,
        , m_dstAccesses         (dstAccesses)
        , m_srcLayout           (srcLayout)
        , m_dstLayout           (dstLayout)
+       , m_imageMemorySize     (0)
 {
 }
 
@@ -2146,7 +2150,7 @@ void ImageTransition::verify (VerifyContext& context, size_t)
 class FillBuffer : public CmdCommand
 {
 public:
-                                               FillBuffer      (deUint32 value) : m_value(value) {}
+                                               FillBuffer      (deUint32 value) : m_value(value), m_bufferSize(0) {}
                                                ~FillBuffer     (void) {}
        const char*                     getName         (void) const { return "FillBuffer"; }
 
@@ -2192,7 +2196,7 @@ void FillBuffer::verify (VerifyContext& context, size_t)
 class UpdateBuffer : public CmdCommand
 {
 public:
-                                               UpdateBuffer    (deUint32 seed) : m_seed(seed) {}
+                                               UpdateBuffer    (deUint32 seed) : m_seed(seed), m_bufferSize(0) {}
                                                ~UpdateBuffer   (void) {}
        const char*                     getName                 (void) const { return "UpdateBuffer"; }
 
@@ -2376,7 +2380,7 @@ void BufferCopyToBuffer::verify (VerifyContext& context, size_t commandIndex)
 class BufferCopyFromBuffer : public CmdCommand
 {
 public:
-                                                                       BufferCopyFromBuffer    (deUint32 seed) : m_seed(seed) {}
+                                                                       BufferCopyFromBuffer    (deUint32 seed) : m_seed(seed), m_bufferSize(0) {}
                                                                        ~BufferCopyFromBuffer   (void) {}
        const char*                                             getName                                 (void) const { return "BufferCopyFromBuffer"; }
 
@@ -4799,6 +4803,7 @@ public:
                                RenderVertexBuffer      (deUint32 stride)
                                        : m_stride(stride)
                                        , m_name("RenderVertexBuffer" + de::toString(stride))
+                                       , m_bufferSize(0)
                                        {}
                                ~RenderVertexBuffer     (void) {}
 
@@ -7429,11 +7434,12 @@ CacheState::CacheState (vk::VkPipelineStageFlags allowedStages, vk::VkAccessFlag
 {
        for (vk::VkPipelineStageFlags dstStage_ = 1; dstStage_ <= m_allowedStages; dstStage_ <<= 1)
        {
-               const PipelineStage dstStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)dstStage_);
-
                if ((dstStage_ & m_allowedStages) == 0)
                        continue;
 
+               const PipelineStage dstStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)dstStage_);
+
+
                // All operations are initially visible
                m_invisibleOperations[dstStage] = 0;
 
@@ -7445,20 +7451,20 @@ CacheState::CacheState (vk::VkPipelineStageFlags allowedStages, vk::VkAccessFlag
 
                for (vk::VkPipelineStageFlags srcStage_ = 1; srcStage_ <= m_allowedStages; srcStage_ <<= 1)
                {
-                       const PipelineStage srcStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)srcStage_);
-
                        if ((srcStage_ & m_allowedStages) == 0)
                                continue;
 
+                       const PipelineStage srcStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)srcStage_);
+
                        // There are no write operations that are not yet available
                        // initially.
                        for (vk::VkAccessFlags dstAccess_ = 1; dstAccess_ <= m_allowedAccesses; dstAccess_ <<= 1)
                        {
-                               const Access dstAccess = accessFlagToAccess((vk::VkAccessFlagBits)dstAccess_);
-
                                if ((dstAccess_ & m_allowedAccesses) == 0)
                                        continue;
 
+                               const Access dstAccess = accessFlagToAccess((vk::VkAccessFlagBits)dstAccess_);
+
                                m_unavailableWriteOperations[dstStage][srcStage][dstAccess] = 0;
                        }
                }
@@ -7498,11 +7504,11 @@ void CacheState::perform (vk::VkPipelineStageFlagBits   stage,
 
        for (vk::VkPipelineStageFlags dstStage_ = 1; dstStage_ <= m_allowedStages; dstStage_ <<= 1)
        {
-               const PipelineStage dstStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)dstStage_);
-
                if ((dstStage_ & m_allowedStages) == 0)
                        continue;
 
+               const PipelineStage dstStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)dstStage_);
+
                // Mark stage as incomplete for all stages
                m_incompleteOperations[dstStage] |= stage;
 
@@ -7514,11 +7520,11 @@ void CacheState::perform (vk::VkPipelineStageFlagBits   stage,
                        // Mark write access from srcStage unavailable to all stages for all accesses
                        for (vk::VkAccessFlags dstAccess_ = 1; dstAccess_ <= m_allowedAccesses; dstAccess_ <<= 1)
                        {
-                               const Access dstAccess = accessFlagToAccess((vk::VkAccessFlagBits)dstAccess_);
-
                                if ((dstAccess_ & m_allowedAccesses) == 0)
                                        continue;
 
+                               const Access dstAccess = accessFlagToAccess((vk::VkAccessFlagBits)dstAccess_);
+
                                m_unavailableWriteOperations[dstStage][srcStage][dstAccess] |= access;
                        }
                }
@@ -7561,11 +7567,11 @@ void CacheState::getFullBarrier (vk::VkPipelineStageFlags&      srcStages,
 
        for (vk::VkPipelineStageFlags dstStage_ = 1; dstStage_ <= m_allowedStages; dstStage_ <<= 1)
        {
-               const PipelineStage dstStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)dstStage_);
-
                if ((dstStage_ & m_allowedStages) == 0)
                        continue;
 
+               const PipelineStage dstStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)dstStage_);
+
                // Make sure all previous operation are complete in all stages
                if (m_incompleteOperations[dstStage])
                {
@@ -7583,18 +7589,18 @@ void CacheState::getFullBarrier (vk::VkPipelineStageFlags&      srcStages,
                // Make sure all write operations from all stages are available
                for (vk::VkPipelineStageFlags srcStage_ = 1; srcStage_ <= m_allowedStages; srcStage_ <<= 1)
                {
-                       const PipelineStage srcStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)srcStage_);
-
                        if ((srcStage_ & m_allowedStages) == 0)
                                continue;
 
+                       const PipelineStage srcStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)srcStage_);
+
                        for (vk::VkAccessFlags dstAccess_ = 1; dstAccess_ <= m_allowedAccesses; dstAccess_ <<= 1)
                        {
-                               const Access dstAccess = accessFlagToAccess((vk::VkAccessFlagBits)dstAccess_);
-
                                if ((dstAccess_ & m_allowedAccesses) == 0)
                                        continue;
 
+                               const Access dstAccess = accessFlagToAccess((vk::VkAccessFlagBits)dstAccess_);
+
                                if (m_unavailableWriteOperations[dstStage][srcStage][dstAccess])
                                {
                                        dstStages |= dstStage_;
@@ -7642,11 +7648,11 @@ void CacheState::checkImageLayoutBarrier (vk::VkPipelineStageFlags      srcStages,
 
                for (vk::VkPipelineStageFlags srcStage_ = 1; srcStage_ <= srcStages; srcStage_ <<= 1)
                {
-                       const PipelineStage srcStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)srcStage_);
-
                        if ((srcStage_ & srcStages) == 0)
                                continue;
 
+                       const PipelineStage srcStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)srcStage_);
+
                        completedStages |= (~m_incompleteOperations[srcStage]);
                }
 
@@ -7660,25 +7666,25 @@ void CacheState::checkImageLayoutBarrier (vk::VkPipelineStageFlags      srcStages,
 
                for (vk::VkPipelineStageFlags dstStage_ = 1; dstStage_ <= m_allowedStages; dstStage_ <<= 1)
                {
-                       const PipelineStage dstStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)dstStage_);
-
                        if ((dstStage_ & m_allowedStages) == 0)
                                continue;
 
+                       const PipelineStage dstStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)dstStage_);
+
                        for (vk::VkPipelineStageFlags srcStage_ = 1; srcStage_ <= m_allowedStages; srcStage_ <<= 1)
                        {
-                               const PipelineStage srcStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)srcStage_);
-
                                if ((srcStage_ & m_allowedStages) == 0)
                                        continue;
 
+                               const PipelineStage srcStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)srcStage_);
+
                                for (vk::VkAccessFlags dstAccess_ = 1; dstAccess_ <= m_allowedAccesses; dstAccess_ <<= 1)
                                {
-                                       const Access dstAccess = accessFlagToAccess((vk::VkAccessFlagBits)dstAccess_);
-
                                        if ((dstAccess_ & m_allowedAccesses) == 0)
                                                continue;
 
+                                       const Access dstAccess = accessFlagToAccess((vk::VkAccessFlagBits)dstAccess_);
+
                                        if (m_unavailableWriteOperations[dstStage][srcStage][dstAccess] != (getWriteAccessFlags() & m_allowedAccesses))
                                        {
                                                anyWriteAvailable = true;
@@ -7702,11 +7708,11 @@ void CacheState::imageLayoutBarrier (vk::VkPipelineStageFlags   srcStages,
 
        for (vk::VkPipelineStageFlags dstStage_ = 1; dstStage_ <= m_allowedStages; dstStage_ <<= 1)
        {
-               const PipelineStage dstStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)dstStage_);
-
                if ((dstStage_ & m_allowedStages) == 0)
                        continue;
 
+               const PipelineStage dstStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)dstStage_);
+
                // All stages are incomplete after the barrier except each dstStage in it self.
                m_incompleteOperations[dstStage] = m_allowedStages & (~dstStage_);
 
@@ -7718,19 +7724,19 @@ void CacheState::imageLayoutBarrier (vk::VkPipelineStageFlags   srcStages,
 
                for (vk::VkPipelineStageFlags srcStage_ = 1; srcStage_ <= m_allowedStages; srcStage_ <<= 1)
                {
-                       const PipelineStage srcStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)srcStage_);
-
                        if ((srcStage_ & m_allowedStages) == 0)
                                continue;
 
+                       const PipelineStage srcStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)srcStage_);
+
                        // All write operations are available after layout transition
                        for (vk::VkAccessFlags dstAccess_ = 1; dstAccess_ <= m_allowedAccesses; dstAccess_ <<= 1)
                        {
-                               const Access dstAccess = accessFlagToAccess((vk::VkAccessFlagBits)dstAccess_);
-
                                if ((dstAccess_ & m_allowedAccesses) == 0)
                                        continue;
 
+                               const Access dstAccess = accessFlagToAccess((vk::VkAccessFlagBits)dstAccess_);
+
                                m_unavailableWriteOperations[dstStage][srcStage][dstAccess] = 0;
                        }
                }
@@ -7759,18 +7765,18 @@ void CacheState::barrier (vk::VkPipelineStageFlags      srcStages,
 
                for (vk::VkPipelineStageFlags srcStage_ = 1; srcStage_ <= srcStages; srcStage_ <<= 1)
                {
-                       const PipelineStage srcStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)srcStage_);
-
                        if ((srcStage_ & srcStages) == 0)
                                continue;
 
+                       const PipelineStage srcStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)srcStage_);
+
                        for (vk::VkPipelineStageFlags dstStage_ = 1; dstStage_ <= dstStages; dstStage_ <<= 1)
                        {
-                               const PipelineStage     dstStage                        = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)dstStage_);
-
                                if ((dstStage_ & dstStages) == 0)
                                        continue;
 
+                               const PipelineStage     dstStage                        = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)dstStage_);
+
                                // Stages that have completed before srcStage have also completed before dstStage
                                m_incompleteOperations[dstStage] &= oldIncompleteOperations[srcStage];
 
@@ -7779,19 +7785,19 @@ void CacheState::barrier (vk::VkPipelineStageFlags      srcStages,
 
                                for (vk::VkPipelineStageFlags sharedStage_ = 1; sharedStage_ <= m_allowedStages; sharedStage_ <<= 1)
                                {
-                                       const PipelineStage     sharedStage                     = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)sharedStage_);
-
                                        if ((sharedStage_ & m_allowedStages) == 0)
                                                continue;
 
+                                       const PipelineStage     sharedStage                     = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)sharedStage_);
+
                                        // Writes that are available in srcStage are also available in dstStage
                                        for (vk::VkAccessFlags sharedAccess_ = 1; sharedAccess_ <= m_allowedAccesses; sharedAccess_ <<= 1)
                                        {
-                                               const Access sharedAccess = accessFlagToAccess((vk::VkAccessFlagBits)sharedAccess_);
-
                                                if ((sharedAccess_ & m_allowedAccesses) == 0)
                                                        continue;
 
+                                               const Access sharedAccess = accessFlagToAccess((vk::VkAccessFlagBits)sharedAccess_);
+
                                                m_unavailableWriteOperations[dstStage][sharedStage][sharedAccess] &= oldUnavailableWriteOperations[srcStage][sharedStage][sharedAccess];
                                        }
                                }
@@ -7813,19 +7819,19 @@ void CacheState::barrier (vk::VkPipelineStageFlags      srcStages,
 
                for (vk::VkPipelineStageFlags srcStage_ = 1; srcStage_ <= m_allowedStages; srcStage_ <<= 1)
                {
-                       const PipelineStage srcStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)srcStage_);
-
                        if ((srcStage_ & m_allowedStages) == 0)
                                continue;
 
+                       const PipelineStage srcStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)srcStage_);
+
                        // Make srcAccesses from srcStage available in dstStage for dstAccess
                        for (vk::VkAccessFlags dstAccess_ = 1; dstAccess_ <= m_allowedAccesses; dstAccess_ <<= 1)
                        {
-                               const Access dstAccess = accessFlagToAccess((vk::VkAccessFlagBits)dstAccess_);
-
                                if ((dstAccess_ & m_allowedAccesses) == 0)
                                        continue;
 
+                               const Access dstAccess = accessFlagToAccess((vk::VkAccessFlagBits)dstAccess_);
+
                                if (((srcStage_ & srcStages) != 0) && ((dstAccess_ & dstAccesses) != 0))
                                        m_unavailableWriteOperations[dstStage][srcStage][dstAccess] &= ~srcAccesses;
 
@@ -7844,11 +7850,11 @@ bool CacheState::isClean (void) const
 {
        for (vk::VkPipelineStageFlags dstStage_ = 1; dstStage_ <= m_allowedStages; dstStage_ <<= 1)
        {
-               const PipelineStage dstStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)dstStage_);
-
                if ((dstStage_ & m_allowedStages) == 0)
                        continue;
 
+               const PipelineStage dstStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)dstStage_);
+
                // Some operations are not visible to some stages
                if (m_invisibleOperations[dstStage] != 0)
                        return false;
@@ -7863,18 +7869,18 @@ bool CacheState::isClean (void) const
 
                for (vk::VkPipelineStageFlags srcStage_ = 1; srcStage_ <= m_allowedStages; srcStage_ <<= 1)
                {
-                       const PipelineStage srcStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)srcStage_);
-
                        if ((srcStage_ & m_allowedStages) == 0)
                                continue;
 
+                       const PipelineStage srcStage = pipelineStageFlagToPipelineStage((vk::VkPipelineStageFlagBits)srcStage_);
+
                        for (vk::VkAccessFlags dstAccess_ = 1; dstAccess_ <= m_allowedAccesses; dstAccess_ <<= 1)
                        {
-                               const Access dstAccess = accessFlagToAccess((vk::VkAccessFlagBits)dstAccess_);
-
                                if ((dstAccess_ & m_allowedAccesses) == 0)
                                        continue;
 
+                               const Access dstAccess = accessFlagToAccess((vk::VkAccessFlagBits)dstAccess_);
+
                                // Some write operations are not available yet
                                if (m_unavailableWriteOperations[dstStage][srcStage][dstAccess] != 0)
                                        return false;
@@ -8667,7 +8673,7 @@ void applyOp (State& state, const Memory& memory, Op op, Usage usage)
                        break;
 
                case OP_SECONDARY_COMMAND_BUFFER_END:
-                       DE_ASSERT(state.stage == STAGE_SECONDARY_COMMAND_BUFFER || state.stage == STAGE_SECONDARY_COMMAND_BUFFER);
+                       DE_ASSERT(state.stage == STAGE_COMMAND_BUFFER || state.stage == STAGE_SECONDARY_COMMAND_BUFFER);
                        state.stage = STAGE_COMMAND_BUFFER;
                        state.commandBufferIsEmpty = state.primaryCommandBufferIsEmpty;
                        break;
@@ -9005,15 +9011,18 @@ de::MovePtr<CmdCommand> createCmdCommand (de::Random&   rng,
                        removeIllegalAccessFlags(srcAccesses, srcStages);
 
                        PipelineBarrier::Type type;
-
-                       if (op == OP_PIPELINE_BARRIER_IMAGE)
+                       switch (op)
+                       {
+                       case OP_PIPELINE_BARRIER_IMAGE:
                                type = PipelineBarrier::TYPE_IMAGE;
-                       else if (op == OP_PIPELINE_BARRIER_BUFFER)
+                               break;
+                       case OP_PIPELINE_BARRIER_BUFFER:
                                type = PipelineBarrier::TYPE_BUFFER;
-                       else if (op == OP_PIPELINE_BARRIER_GLOBAL)
+                               break;
+                       case OP_PIPELINE_BARRIER_GLOBAL:
                                type = PipelineBarrier::TYPE_GLOBAL;
-                       else
-                       {
+                               break;
+                       default:
                                type = PipelineBarrier::TYPE_LAST;
                                DE_FATAL("Unknown op");
                        }
index 4010f52..acd0636 100644 (file)
@@ -394,7 +394,7 @@ void BufferMemoryRequirementsOriginal::verifyMemoryRequirements (tcu::ResultColl
                result.check(deIsPowerOfTwo64(static_cast<deUint64>(m_currentTestRequirements.alignment)) == DE_TRUE,
                        "VkMemoryRequirements alignment isn't power of two");
 
-               if (usage & (VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT | VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT))
+               if (usage & (VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT | VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT))
                {
                        result.check(m_currentTestRequirements.alignment >= limits.minTexelBufferOffsetAlignment,
                                "VkMemoryRequirements alignment doesn't respect minTexelBufferOffsetAlignment");
@@ -1590,7 +1590,6 @@ tcu::TestStatus testMultiplaneImages (Context& context, ImageTestParams params)
        const VkPhysicalDeviceMemoryProperties  memoryProperties        = getPhysicalDeviceMemoryProperties(vki, physicalDevice);
        tcu::TestLog&                                                   log                                     = context.getTestContext().getLog();
        tcu::ResultCollector                                    result                          (log, "ERROR: ");
-       deUint32                                                                errorCount                      = 0;
 
        log << TestLog::Message << "Memory properties: " << memoryProperties << TestLog::EndMessage;
 
@@ -1685,10 +1684,7 @@ tcu::TestStatus testMultiplaneImages (Context& context, ImageTestParams params)
                }
        }
 
-       if (errorCount > 1)
-               return tcu::TestStatus(result.getResult(), "Failed " + de::toString(errorCount) + " cases.");
-       else
-               return tcu::TestStatus(result.getResult(), result.getMessage());
+       return tcu::TestStatus(result.getResult(), result.getMessage());
 }
 
 void checkSupportMultiplane (Context& context, ImageTestParams params)
index 607501b..d97d17f 100644 (file)
@@ -2463,6 +2463,7 @@ MultiViewQueriesTestInstance::MultiViewQueriesTestInstance (Context& context, co
        : MultiViewRenderTestInstance   (context, parameters)
        , m_verticesPerPrimitive                (4u)
        , m_occlusionQueryFlags                 ((parameters.viewIndex == TEST_TYPE_QUERIES) * VK_QUERY_CONTROL_PRECISE_BIT)
+       , m_occlusionObjectsOffset              (0)
 {
        // Generate the timestamp mask
        const std::vector<VkQueueFamilyProperties>      queueProperties = vk::getPhysicalDeviceQueueFamilyProperties(m_context.getInstanceInterface(), m_context.getPhysicalDevice());
index 0a3f96e..ebee391 100644 (file)
@@ -1477,6 +1477,7 @@ struct WorkingData
 
        WorkingData (void)
                : numVertices           ()
+               , colorBufferSize       (0)
        {
        }
 };
index d27aada..49d04b4 100644 (file)
@@ -395,6 +395,7 @@ struct TestParams
 
        TestParams (void)
                : numLayers                     ()
+               , sampleSource          (SAMPLE_SOURCE_IMAGE)
                , numColorSamples       ()
                , colorFormat           ()
        {
index 0e4fd6d..11fe81e 100644 (file)
@@ -441,7 +441,7 @@ void PushConstantGraphicsTestInstance::init (void)
                VkPhysicalDeviceFeatures features = m_context.getDeviceFeatures();
 
                createShaderModule(vk, vkDevice, m_context.getBinaryCollection(), "color_vert", &m_vertexShaderModule);
-               if (m_shaderFlags & VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT || m_shaderFlags & VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT)
+               if (m_shaderFlags & VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT || m_shaderFlags & VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT)
                {
                        if (features.tessellationShader == VK_FALSE)
                        {
index e50e0a0..f183e7a 100644 (file)
@@ -37,8 +37,8 @@ ProtectedContext::ProtectedContext    (Context&                                               ctx,
        , m_vki                                 (m_instance.getDriver())
        , m_phyDevice                   (vk::chooseDevice(m_vki, m_instance, m_context.getTestContext().getCommandLine()))
        , m_queueFamilyIndex    (chooseProtectedMemQueueFamilyIndex(m_vki, m_phyDevice))
-       , m_device                              (makeProtectedMemDevice(m_interface, m_instance, m_vki, m_phyDevice, m_queueFamilyIndex, ctx.getUsedApiVersion(), deviceExtensions, m_context.getTestContext().getCommandLine().isValidationEnabled()))
        , m_allocator                   (createAllocator())
+       , m_device                              (makeProtectedMemDevice(m_interface, m_instance, m_vki, m_phyDevice, m_queueFamilyIndex, ctx.getUsedApiVersion(), deviceExtensions, m_context.getTestContext().getCommandLine().isValidationEnabled()))
        , m_deviceDriver                (m_context.getPlatformInterface(), m_instance, *m_device)
        , m_queue                               (getProtectedQueue(m_deviceDriver, *m_device, m_queueFamilyIndex, 0))
 {
@@ -57,8 +57,8 @@ ProtectedContext::ProtectedContext    (Context&                                               ctx,
        , m_phyDevice                   (vk::chooseDevice(m_vki, m_instance, m_context.getTestContext().getCommandLine()))
        , m_surface                             (vk::wsi::createSurface(m_vki, m_instance, wsiType, display, window))
        , m_queueFamilyIndex    (chooseProtectedMemQueueFamilyIndex(m_vki, m_phyDevice, *m_surface))
+       , m_allocator(createAllocator())
        , m_device                              (makeProtectedMemDevice(m_interface, m_instance, m_vki, m_phyDevice, m_queueFamilyIndex, ctx.getUsedApiVersion(), deviceExtensions, m_context.getTestContext().getCommandLine().isValidationEnabled()))
-       , m_allocator                   (createAllocator())
        , m_deviceDriver                (m_interface, m_instance, *m_device)
        , m_queue                               (getProtectedQueue(m_deviceDriver, *m_device, m_queueFamilyIndex, 0))
 {
index 435d17c..7b2aed6 100644 (file)
@@ -86,8 +86,8 @@ private:
        vk::VkPhysicalDevice                            m_phyDevice;
        const vk::Move<vk::VkSurfaceKHR>        m_surface;
        deUint32                                                        m_queueFamilyIndex;
-       vk::Move<vk::VkDevice>                          m_device;
        const de::UniquePtr<vk::Allocator>      m_allocator;
+       vk::Move<vk::VkDevice>                          m_device;
        vk::DeviceDriver                                        m_deviceDriver;
        vk::VkQueue                                                     m_queue;
 };
index b6f1a01..d51c7d7 100644 (file)
@@ -137,8 +137,7 @@ tcu::TestStatus CopyImageToBufferTestInstance<T>::iterate()
                                                                                                                                                        RENDER_WIDTH, RENDER_HEIGHT,
                                                                                                                                                        m_imageFormat,
                                                                                                                                                        vk::VK_IMAGE_USAGE_TRANSFER_DST_BIT
-                                                                                                                                                       | vk::VK_IMAGE_USAGE_TRANSFER_SRC_BIT
-                                                                                                                                                       | vk::VK_IMAGE_USAGE_TRANSFER_DST_BIT);
+                                                                                                                                                       | vk::VK_IMAGE_USAGE_TRANSFER_SRC_BIT);
        de::MovePtr<vk::BufferWithMemory>       dstBuffer                       (makeBuffer(ctx,
                                                                                                                                                PROTECTION_ENABLED,
                                                                                                                                                queueFamilyIndex,
index 6eb39d7..0d17f33 100644 (file)
@@ -4201,7 +4201,7 @@ bool ConservativePointTestInstance::compareAndVerifyOverestimated (std::vector<P
                for (int x = 0; x < resultImage.getWidth(); ++x)
                        referenceImage.setPixel(x, y, backgroundColor);
 
-               for (size_t renderAreaNdx = 0; result && renderAreaNdx < m_renderStart.size(); ++renderAreaNdx)
+               for (size_t renderAreaNdx = 0; renderAreaNdx < m_renderStart.size(); ++renderAreaNdx)
                {
                        const int renderStart   = m_renderStart[renderAreaNdx];
                        const int renderEnd             = m_renderEnd[renderAreaNdx];
@@ -4221,7 +4221,7 @@ bool ConservativePointTestInstance::compareAndVerifyOverestimated (std::vector<P
                }
 
                css << std::endl;
-               for (size_t renderAreaNdx = 0; result && renderAreaNdx < m_renderStart.size(); ++renderAreaNdx)
+               for (size_t renderAreaNdx = 0; renderAreaNdx < m_renderStart.size(); ++renderAreaNdx)
                {
                        const int renderStart   = m_renderStart[renderAreaNdx];
                        const int renderEnd             = m_renderEnd[renderAreaNdx];
@@ -4311,7 +4311,7 @@ bool ConservativePointTestInstance::compareAndVerifyUnderestimated (std::vector<
                }
 
                css << std::endl;
-               for (size_t renderAreaNdx = 0; result && renderAreaNdx < m_renderStart.size(); ++renderAreaNdx)
+               for (size_t renderAreaNdx = 0; renderAreaNdx < m_renderStart.size(); ++renderAreaNdx)
                {
                        const int renderStart   = m_renderStart[renderAreaNdx];
                        const int renderEnd             = m_renderEnd[renderAreaNdx];
index 3604bcf..81ae32e 100644 (file)
@@ -624,6 +624,7 @@ ShaderRenderCaseInstance::ShaderRenderCaseInstance (Context&                                        context,
        , m_uniformSetup                (uniformSetup)
        , m_attribFunc                  (attribFunc)
        , m_sampleCount                 (VK_SAMPLE_COUNT_1_BIT)
+       , m_fuzzyCompare                (false)
 {
 }
 
index 7ea2c58..2b31903 100644 (file)
@@ -1710,11 +1710,23 @@ void ShaderOperatorTests::init (void)
                                                                                                : TYPE_LAST;
 
                                ShaderEvalFunc evalFunc = DE_NULL;
-                               if      (inScalarSize == 1)     evalFunc = funcInfo.evalFuncScalar;
-                               else if (inScalarSize == 2)     evalFunc = funcInfo.evalFuncVec2;
-                               else if (inScalarSize == 3)     evalFunc = funcInfo.evalFuncVec3;
-                               else if (inScalarSize == 4)     evalFunc = funcInfo.evalFuncVec4;
-                               else DE_ASSERT(false);
+                               switch (inScalarSize)
+                               {
+                               case 1:
+                                       evalFunc = funcInfo.evalFuncScalar;
+                                       break;
+                               case 2:
+                                       evalFunc = funcInfo.evalFuncVec2;
+                                       break;
+                               case 3:
+                                       evalFunc = funcInfo.evalFuncVec3;
+                                       break;
+                               case 4:
+                                       evalFunc = funcInfo.evalFuncVec4;
+                                       break;
+                               default:
+                                       DE_ASSERT(false);
+                               }
 
                                // Skip if no valid eval func.
                                if (evalFunc == DE_NULL)
index 08a367b..87aee7e 100755 (executable)
@@ -1129,6 +1129,8 @@ public:
                : SparseBufferTestInstance      (context, flags)
                , m_bufferUsage                         (usage)
                , m_minChunkSize                        (minChunkSize)
+               , m_perDrawBufferOffset         (0)
+               , m_stagingBufferSize           (0)
        {
        }
 
index fd1a4b0..29be83b 100644 (file)
@@ -716,7 +716,6 @@ void addComputeIndexingNon16BaseAlignmentTests (tcu::TestCaseGroup* group)
                switch(chainOp)
                {
                        case CHAIN_OP_ACCESS_CHAIN:
-                               specs["chainop"] = "OpAccessChain %_ptr_float_sb %dataInput %uint_0 %uint_0";
                                specs["chainop"] = "OpAccessChain %_ptr_float_sb %dataInput %uint_0";
                                break;
                        case CHAIN_OP_PTR_ACCESS_CHAIN:
index bda577d..4615ab4 100644 (file)
@@ -15961,6 +15961,9 @@ struct fp16Normalize : public fp16AllComponents
                flavorNames.push_back("EmulatingFP16");
                flavorNames.push_back("DoubleCalc");
 
+               permutationsFlavorStart = 0;
+               permutationsFlavorEnd = flavorNames.size();
+
                // flavorNames will be extended later
        }
 
@@ -16480,6 +16483,9 @@ struct fp16Dot : public fp16AllComponents
                flavorNames.push_back("FloatCalc");
                flavorNames.push_back("DoubleCalc");
 
+               permutationsFlavorStart = 0;
+               permutationsFlavorEnd = flavorNames.size();
+
                // flavorNames will be extended later
        }
 
index 5c06831..0075efc 100644 (file)
@@ -605,7 +605,9 @@ struct TestContext
                , queueFamilyIndex      (queueFamilyIndex_)
                , binaryCollection      (binaryCollection_)
                , allocator                     (allocator_)
+               , vertices                      (0)
                , numVertices           (0)
+               , renderSize            (0)
                , waitEvent                     (false)
        {
                createFences(vkd, device, false, DE_LENGTH_OF_ARRAY(fences), fences);
index 4a286d4..5f6805a 100644 (file)
@@ -1123,7 +1123,8 @@ private:
                        PSID*   ppEveryoneSID   = (PSID*)((PBYTE)pSD + SECURITY_DESCRIPTOR_MIN_LENGTH);
                        PACL*   ppACL                   = (PACL*)((PBYTE)ppEveryoneSID + sizeof(PSID*));
 
-                       InitializeSecurityDescriptor(pSD, SECURITY_DESCRIPTOR_REVISION);
+                       bool res = InitializeSecurityDescriptor(pSD, SECURITY_DESCRIPTOR_REVISION);
+                       DE_ASSERT(res);
 
                        SID_IDENTIFIER_AUTHORITY        SIDAuthWorld = SECURITY_WORLD_SID_AUTHORITY;
                        AllocateAndInitializeSid(&SIDAuthWorld, 1, SECURITY_WORLD_RID, 0, 0, 0, 0, 0, 0, 0, ppEveryoneSID);
@@ -1138,7 +1139,8 @@ private:
 
                        SetEntriesInAcl(1, &ea, NULL, ppACL);
 
-                       SetSecurityDescriptorDacl(pSD, TRUE, *ppACL, FALSE);
+                       res = SetSecurityDescriptorDacl(pSD, TRUE, *ppACL, FALSE);
+                       DE_ASSERT(res);
                }
 
                return pSD;
index 0d4e6ab..1be2d70 100644 (file)
@@ -558,6 +558,7 @@ TextureFilteringTestInstance::TextureFilteringTestInstance (Context&                                        ctx,
        , m_imParams                            (testCaseData.imParams)
        , m_samplerParams                       (testCaseData.samplerParams)
        , m_sampleLookupSettings        (testCaseData.sampleLookupSettings)
+       , m_numSamples                          (0)
        , m_levels                                      (testCaseData.pba)
        , m_gen                                         (gen.release())
 {
index d77391f..b028065 100644 (file)
@@ -862,6 +862,8 @@ private:
 
                FilterCase      (void)
                        : textureIndex(-1)
+                       , minCoord      (0)
+                       , maxCoord      (0)
                        , ref           (0.0f)
                {
                }
index c01a2bb..cd025f3 100644 (file)
@@ -83,7 +83,8 @@ struct Swizzle2DTestParameters : public Texture2DTestCaseParameters
 };
 
 Swizzle2DTestParameters::Swizzle2DTestParameters (void)
-       : componentMapping      (makeComponentMappingRGBA())
+       : backingMode           (TextureBinding::IMAGE_BACKING_MODE_LAST)
+       , componentMapping      (makeComponentMappingRGBA())
        , texCoordSwizzle       (DE_NULL)
        , texCoordMapping       (DE_NULL)
 {
index f3ba0ab..9391019 100644 (file)
@@ -1689,6 +1689,7 @@ TextureCommonTestCaseParameters::TextureCommonTestCaseParameters (void)
        , wrapS                                 (tcu::Sampler::REPEAT_GL)
        , format                                (VK_FORMAT_R8G8B8A8_UNORM)
        , unnormal                              (false)
+       , aspectMask                    (VK_IMAGE_ASPECT_FLAG_BITS_MAX_ENUM)
 {
 }
 
@@ -1696,6 +1697,7 @@ Texture2DTestCaseParameters::Texture2DTestCaseParameters (void)
        : wrapT                                 (tcu::Sampler::REPEAT_GL)
        , width                                 (64)
        , height                                (64)
+       , mipmaps                               (false)
 {
 }
 
index ed76356..b931c1e 100644 (file)
@@ -306,7 +306,7 @@ public:
                , m_commandLine (0)
        {}
 
-       BuildSpirVAsmTask (void) : m_program(DE_NULL) {}
+       BuildSpirVAsmTask (void) : m_program(DE_NULL), m_commandLine(0) {}
 
        void setCommandline (const tcu::CommandLine &commandLine)
        {
index 6339d2a..69508fe 100644 (file)
@@ -153,7 +153,7 @@ Move<VkDevice> createDeviceWithWsi (const vk::PlatformInterface&    vkp,
        vector<const char*>             extensions;
 
        if (!isExtensionSupported(supportedExtensions, RequiredExtension("VK_KHR_swapchain")))
-               TCU_THROW(NotSupportedError, (string(extensions[0]) + " is not supported").c_str());
+               TCU_THROW(NotSupportedError, "VK_KHR_swapchain is not supported");
        extensions.push_back("VK_KHR_swapchain");
 
        if (isExtensionSupported(supportedExtensions, RequiredExtension("VK_EXT_hdr_metadata")))
@@ -649,8 +649,10 @@ tcu::TestStatus colorspaceCompareTest (Context& context, TestParams params)
                                                                                                         &swapchainImages[imageNdx]))
                                continue;
                        else
+                       {
+                               VK_CHECK(vkd.deviceWaitIdle(device));
                                return tcu::TestStatus::fail("Colorspace comparison test failed");
-                       VK_CHECK(vkd.deviceWaitIdle(device));
+                       }
                }
                catch (...)
                {
@@ -660,6 +662,7 @@ tcu::TestStatus colorspaceCompareTest (Context& context, TestParams params)
                }
        }
 
+       VK_CHECK(vkd.deviceWaitIdle(device));
        return tcu::TestStatus::pass("Colorspace comparison test succeeded");
 }
 
index e97ea7a..7fd072e 100644 (file)
@@ -128,7 +128,7 @@ Move<VkDevice> createDeviceWithWsi (const vk::PlatformInterface&    vkp,
        std::vector<const char*>                extensions;
 
        if (!isExtensionSupported(supportedExtensions, RequiredExtension("VK_KHR_swapchain")))
-               TCU_THROW(NotSupportedError, (std::string(extensions[0]) + " is not supported").c_str());
+               TCU_THROW(NotSupportedError, "VK_KHR_swapchain is not supported");
        extensions.push_back("VK_KHR_swapchain");
 
        if (isExtensionSupported(supportedExtensions, RequiredExtension("VK_EXT_full_screen_exclusive")))