Fix build errors with uint64_t and default constructor
authorArkadiusz Sarwa <arkadiusz.sarwa@mobica.com>
Fri, 8 Sep 2017 13:33:41 +0000 (15:33 +0200)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Mon, 11 Sep 2017 08:44:22 +0000 (04:44 -0400)
Components: Vulkan

Change-Id: Ie6b26ba735838d7ba3214a9f86f455697b2f43c9

external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemBufferValidator.hpp
external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemUtils.cpp
external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemUtils.hpp

index 8547ab3..bd96d42 100644 (file)
@@ -76,20 +76,19 @@ enum BufferType {
 void                                   initBufferValidatorPrograms             (vk::SourceCollections& programCollection, TestType testType, BufferType bufferType);
 vk::VkDescriptorType   getDescriptorType                               (BufferType bufferType);
 
-
 template<typename T>
 class BufferValidator
 {
 public:
                                                                        BufferValidator                 (const ValidationData<T> data)
                                                                                : m_refData                     (data)
-                                                                               , m_refDataStorage      ()
+                                                                               , m_refDataStorage      (*reinterpret_cast<ValidationDataStorage<T>*>( &std::vector<char>(sizeof(ValidationDataStorage<T>), '\0').front()))
                                                                                , m_bufferType          (SAMPLER_BUFFER)
                                                                        {
                                                                        }
 
                                                                        BufferValidator                 (const ValidationDataStorage<T> data)
-                                                                               : m_refData                     ()
+                                                                               : m_refData                     (*reinterpret_cast<ValidationData<T>*>( &std::vector<char>(sizeof(ValidationData<T>), '\0').front()))
                                                                                , m_refDataStorage      (data)
                                                                                , m_bufferType          (STORAGE_BUFFER)
                                                                        {
@@ -107,6 +106,7 @@ private:
 
        const ValidationData<T>                 m_refData;
        const ValidationDataStorage<T>  m_refDataStorage;
+
        BufferType                                              m_bufferType;
 };
 
index 884f614..585bd06 100644 (file)
@@ -436,7 +436,7 @@ vk::VkResult queueSubmit (ProtectedContext&         context,
                                                  vk::VkQueue                   queue,
                                                  vk::VkCommandBuffer   cmdBuffer,
                                                  vk::VkFence                   fence,
-                                                 uint64_t                              timeout)
+                                                 deUint64                              timeout)
 {
        const vk::DeviceInterface&                      vk                      = context.getDeviceInterface();
        const vk::VkDevice&                                     device          = context.getDevice();
index 3280839..74011f2 100644 (file)
@@ -109,7 +109,7 @@ vk::VkResult                                                queueSubmit                                                     (ProtectedContext&                                      context,
                                                                                                                                                 vk::VkQueue                                            queue,
                                                                                                                                                 vk::VkCommandBuffer                            cmdBuffer,
                                                                                                                                                 vk::VkFence                                            fence,
-                                                                                                                                                uint64_t                                                       timeout);
+                                                                                                                                                deUint64                                                       timeout);
 
 vk::Move<vk::VkDescriptorSet>          makeDescriptorSet                                       (const vk::DeviceInterface&                     vk,
                                                                                                                                                 const vk::VkDevice                                     device,