Fix a few warnings
authorPyry Haulos <phaulos@google.com>
Mon, 21 Dec 2015 01:00:36 +0000 (10:00 +0900)
committerPyry Haulos <phaulos@google.com>
Mon, 21 Dec 2015 01:00:36 +0000 (10:00 +0900)
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateBaseClass.cpp
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateBufferObjectUtil.cpp
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateDSTests.cpp
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateImageObjectUtil.cpp
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateRSTests.cpp
external/vulkancts/modules/vulkan/query_pool/vktQueryPoolBufferObjectUtil.cpp
external/vulkancts/modules/vulkan/query_pool/vktQueryPoolImageObjectUtil.cpp
external/vulkancts/modules/vulkan/query_pool/vktQueryPoolOcclusionTests.cpp

index 0a2b60a..07beb72 100644 (file)
@@ -111,7 +111,7 @@ void DynamicStateBaseClass::initialize (void)
        const vk::VkVertexInputBindingDescription vertexInputBindingDescription =
        {
                0,
-               sizeof(tcu::Vec4) * 2,
+               (deUint32)sizeof(tcu::Vec4) * 2,
                vk::VK_VERTEX_INPUT_RATE_VERTEX,
        };
 
index 698679c..c315de5 100644 (file)
@@ -42,9 +42,9 @@ namespace vkt
 namespace DynamicState
 {
 
-Buffer::Buffer (const vk::DeviceInterface& vk, vk::VkDevice device, vk::Move<vk::VkBuffer> object)
+Buffer::Buffer (const vk::DeviceInterface& vk, vk::VkDevice device, vk::Move<vk::VkBuffer> object_)
        : m_allocation  (DE_NULL)
-       , m_object              (object)
+       , m_object              (object_)
        , m_vk                  (vk)
        , m_device              (device)
 {
index 292a9fa..7bca4cf 100644 (file)
@@ -193,7 +193,7 @@ protected:
                const vk::VkVertexInputBindingDescription vertexInputBindingDescription =
                {
                        0,
-                       sizeof(tcu::Vec4) * 2,
+                       (deUint32)sizeof(tcu::Vec4) * 2,
                        vk::VK_VERTEX_INPUT_RATE_VERTEX,
                };
 
index 301f071..f3d8bdc 100644 (file)
@@ -160,9 +160,9 @@ Image::Image (const vk::DeviceInterface& vk,
                          const vk::VkExtent3D&         extend,
                          deUint32                                      levelCount,
                          deUint32                                      layerCount,
-                         vk::Move<vk::VkImage>         object)
+                         vk::Move<vk::VkImage>         object_)
        : m_allocation          (DE_NULL)
-       , m_object                      (object)
+       , m_object                      (object_)
        , m_format                      (format)
        , m_extent                      (extend)
        , m_levelCount          (levelCount)
@@ -414,7 +414,8 @@ void Image::readLinear (vk::VkOffset3D                              offset,
 {
        vk::VkImageSubresource imageSubResource = { aspect, mipLevel, arrayElement };
 
-       vk::VkSubresourceLayout imageLayout = {};
+       vk::VkSubresourceLayout imageLayout;
+       deMemset(&imageLayout, 0, sizeof(imageLayout));
 
        m_vk.getImageSubresourceLayout(m_device, object(), &imageSubResource, &imageLayout);
 
index e8227ff..9d95159 100644 (file)
@@ -182,7 +182,7 @@ protected:
                const vk::VkVertexInputBindingDescription vertexInputBindingDescription =
                {
                        0,
-                       sizeof(tcu::Vec4) * 2,
+                       (deUint32)sizeof(tcu::Vec4) * 2,
                        vk::VK_VERTEX_INPUT_RATE_VERTEX,
                };
 
index 208758f..27d2d4a 100644 (file)
@@ -42,9 +42,9 @@ namespace vkt
 namespace QueryPool
 {
 
-Buffer::Buffer (const vk::DeviceInterface& vk, vk::VkDevice device, vk::Move<vk::VkBuffer> object)
-       : m_object              (object)
-       , m_allocation  (DE_NULL)
+Buffer::Buffer (const vk::DeviceInterface& vk, vk::VkDevice device, vk::Move<vk::VkBuffer> object_)
+       : m_allocation  (DE_NULL)
+       , m_object              (object_)
        , m_vk                  (vk)
        , m_device              (device)
 {
index 543871a..68b0448 100644 (file)
@@ -161,9 +161,9 @@ Image::Image (const vk::DeviceInterface& vk,
                          const vk::VkExtent3D&         extend,
                          deUint32                                      levelCount,
                          deUint32                                      layerCount,
-                         vk::Move<vk::VkImage>         object)
+                         vk::Move<vk::VkImage>         object_)
        : m_allocation          (DE_NULL)
-       , m_object                      (object)
+       , m_object                      (object_)
        , m_format                      (format)
        , m_extent                      (extend)
        , m_levelCount          (levelCount)
@@ -415,7 +415,8 @@ void Image::readLinear (vk::VkOffset3D                              offset,
 {
        vk::VkImageSubresource imageSubResource = { aspect, mipLevel, arrayElement };
 
-       vk::VkSubresourceLayout imageLayout = {};
+       vk::VkSubresourceLayout imageLayout;
+       deMemset(&imageLayout, 0, sizeof(imageLayout));
 
        m_vk.getImageSubresourceLayout(m_device, object(), &imageSubResource, &imageLayout);
 
index 2b1974d..6d11449 100644 (file)
@@ -186,7 +186,7 @@ StateObjects::StateObjects (const vk::DeviceInterface&vk, vkt::Context &context,
                const vk::VkVertexInputBindingDescription vf_binding_desc               =
                {
                        0,                                                                                                                              // binding;
-                       4 * sizeof(float),                                                                                              // stride;
+                       4 * (deUint32)sizeof(float),                                                                    // stride;
                        vk::VK_VERTEX_INPUT_RATE_VERTEX                                                                 // inputRate
                };
 
@@ -385,7 +385,7 @@ tcu::TestStatus     BasicOcclusionQueryTestInstance::iterate (void)
        transition2DImage(vk, *cmdBuffer, m_stateObjects->m_DepthImage->object(), vk::VK_IMAGE_ASPECT_DEPTH_BIT, vk::VK_IMAGE_LAYOUT_UNDEFINED, vk::VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL);
 
        std::vector<vk::VkClearValue> renderPassClearValues(2);
-       deMemset(&renderPassClearValues[0], static_cast<int>(renderPassClearValues.size()) * sizeof(vk::VkClearValue), 0);
+       deMemset(&renderPassClearValues[0], 0, static_cast<int>(renderPassClearValues.size()) * sizeof(vk::VkClearValue));
 
        const vk::VkRect2D renderArea =
        {
@@ -733,7 +733,7 @@ vk::Move<vk::VkCommandBuffer> OcclusionQueryTestInstance::recordRender (vk::VkCo
        transition2DImage(vk, *cmdBuffer, m_stateObjects->m_DepthImage->object(), vk::VK_IMAGE_ASPECT_DEPTH_BIT, vk::VK_IMAGE_LAYOUT_UNDEFINED, vk::VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL);
 
        std::vector<vk::VkClearValue>   renderPassClearValues(2);
-       deMemset(&renderPassClearValues[0], static_cast<int>(renderPassClearValues.size()) * sizeof(vk::VkClearValue), 0);
+       deMemset(&renderPassClearValues[0], 0, static_cast<int>(renderPassClearValues.size()) * sizeof(vk::VkClearValue));
 
        const vk::VkRect2D renderArea =
        {