From 2fefaff91934f41ff34328c6e6b95ed24892b5a4 Mon Sep 17 00:00:00 2001 From: Pyry Haulos Date: Fri, 11 Dec 2015 16:38:04 -0800 Subject: [PATCH] Fix a few warnings Change-Id: I610d4a27f49298c46f848666b0654209138d272d --- .../vulkancts/modules/vulkan/memory/vktMemoryAllocationTests.cpp | 2 +- external/vulkancts/modules/vulkan/shaderrender/vktShaderRender.cpp | 6 +++--- external/vulkancts/modules/vulkan/shaderrender/vktShaderRender.hpp | 4 ++-- .../modules/vulkan/shaderrender/vktShaderRenderMatrixTests.cpp | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/external/vulkancts/modules/vulkan/memory/vktMemoryAllocationTests.cpp b/external/vulkancts/modules/vulkan/memory/vktMemoryAllocationTests.cpp index 7e8d642..1ad6702 100644 --- a/external/vulkancts/modules/vulkan/memory/vktMemoryAllocationTests.cpp +++ b/external/vulkancts/modules/vulkan/memory/vktMemoryAllocationTests.cpp @@ -566,7 +566,7 @@ tcu::TestCaseGroup* createAllocationTests (tcu::TestContext& testCtx) { const int allocationCount = allocationCounts[allocationCountNdx]; - if (allocationCount != -1 && allocationCount * allocationPercent > 0.25f) + if ((allocationCount != -1) && ((float)allocationCount * allocationPercent > 0.25f)) continue; TestConfig config; diff --git a/external/vulkancts/modules/vulkan/shaderrender/vktShaderRender.cpp b/external/vulkancts/modules/vulkan/shaderrender/vktShaderRender.cpp index 81bd927..6e062fb 100644 --- a/external/vulkancts/modules/vulkan/shaderrender/vktShaderRender.cpp +++ b/external/vulkancts/modules/vulkan/shaderrender/vktShaderRender.cpp @@ -517,7 +517,7 @@ tcu::TestStatus ShaderRenderCaseInstance::iterate (void) return tcu::TestStatus::fail("Image mismatch"); } -void ShaderRenderCaseInstance::setupUniformData (deUint32 bindingLocation, deUint32 size, const void* dataPtr) +void ShaderRenderCaseInstance::setupUniformData (deUint32 bindingLocation, size_t size, const void* dataPtr) { const VkDevice vkDevice = m_context.getDevice(); const DeviceInterface& vk = m_context.getDeviceInterface(); @@ -544,7 +544,7 @@ void ShaderRenderCaseInstance::setupUniformData (deUint32 bindingLocation, deUin // \todo [2015-10-09 elecro] remove the 'hackPadding' variable if the driver support small uniforms, // that is for example one float big uniforms. - const deUint32 hackPadding = size < 4 * sizeof(float) ? (deUint32)(3u * sizeof(float)) : 0u; + const size_t hackPadding = size < 4 * sizeof(float) ? 3 * sizeof(float) : 0; de::MovePtr uniformInfo(new BufferUniform()); uniformInfo->type = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; @@ -556,7 +556,7 @@ void ShaderRenderCaseInstance::setupUniformData (deUint32 bindingLocation, deUin m_uniformInfos.push_back(UniformInfoSp(new de::UniquePtr(uniformInfo))); } -void ShaderRenderCaseInstance::addUniform (deUint32 bindingLocation, vk::VkDescriptorType descriptorType, deUint32 dataSize, const void* data) +void ShaderRenderCaseInstance::addUniform (deUint32 bindingLocation, vk::VkDescriptorType descriptorType, size_t dataSize, const void* data) { m_descriptorSetLayoutBuilder.addSingleBinding(descriptorType, vk::VK_SHADER_STAGE_ALL); m_descriptorPoolBuilder.addType(descriptorType); diff --git a/external/vulkancts/modules/vulkan/shaderrender/vktShaderRender.hpp b/external/vulkancts/modules/vulkan/shaderrender/vktShaderRender.hpp index 6df46d9..3368fa3 100644 --- a/external/vulkancts/modules/vulkan/shaderrender/vktShaderRender.hpp +++ b/external/vulkancts/modules/vulkan/shaderrender/vktShaderRender.hpp @@ -398,7 +398,7 @@ public: const T& data); void addUniform (deUint32 bindingLocation, vk::VkDescriptorType descriptorType, - deUint32 dataSize, + size_t dataSize, const void* data); void useUniform (deUint32 bindingLocation, BaseUniformType type); @@ -431,7 +431,7 @@ private: deInt32 width, deInt32 height); - void setupUniformData (deUint32 bindingLocation, deUint32 size, const void* dataPtr); + void setupUniformData (deUint32 bindingLocation, size_t size, const void* dataPtr); void setupDefaultInputs (const QuadGrid& quadGrid); void render (tcu::Surface& result, const QuadGrid& quadGrid); diff --git a/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderMatrixTests.cpp b/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderMatrixTests.cpp index dba861e..2d325f3 100644 --- a/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderMatrixTests.cpp +++ b/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderMatrixTests.cpp @@ -1508,8 +1508,8 @@ ShaderMatrixInstance::~ShaderMatrixInstance (void) void ShaderMatrixInstance::addMatrixUniform(deUint32 bindingLocation, DataType dataType, const float *dataPtr) { - Mat4 result; - const deUint32 matrixSize = sizeof(float) * 4 *4 ; + Mat4 result; + const size_t matrixSize = sizeof(float) * 4 * 4; switch(dataType) { -- 2.7.4