From: Pyry Haulos Date: Mon, 9 Nov 2015 22:45:12 +0000 (-0800) Subject: Fix a few compile warnings across Vulkan tests X-Git-Tag: upstream/0.1.0~812^2~533 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=682d882fdacf7d4711d23a5ba006f7fb377cf0e3;p=platform%2Fupstream%2FVK-GL-CTS.git Fix a few compile warnings across Vulkan tests Change-Id: Ib58bf0f33e89efc449a40279656532767187d324 --- diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineReferenceRenderer.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineReferenceRenderer.cpp index b9ebe7d..744ad67 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineReferenceRenderer.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineReferenceRenderer.cpp @@ -91,10 +91,10 @@ rr::BlendEquation mapVkBlendOp (VkBlendOp blendOp) tcu::BVec4 mapVkChannelFlags (VkChannelFlags flags) { - return tcu::BVec4(flags & VK_CHANNEL_R_BIT, - flags & VK_CHANNEL_G_BIT, - flags & VK_CHANNEL_B_BIT, - flags & VK_CHANNEL_A_BIT); + return tcu::BVec4((flags & VK_CHANNEL_R_BIT) != 0, + (flags & VK_CHANNEL_G_BIT) != 0, + (flags & VK_CHANNEL_B_BIT) != 0, + (flags & VK_CHANNEL_A_BIT) != 0); } rr::TestFunc mapVkCompareOp (VkCompareOp compareFunc) diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineStencilTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineStencilTests.cpp index a527ecf..6346300 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineStencilTests.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineStencilTests.cpp @@ -72,7 +72,7 @@ bool isSupportedDepthStencilFormat (const InstanceInterface& instanceInterface, VK_CHECK(instanceInterface.getPhysicalDeviceFormatProperties(device, format, &formatProps)); - return formatProps.optimalTilingFeatures & VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT; + return (formatProps.optimalTilingFeatures & VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT) != 0; } class StencilOpStateUniqueRandomIterator : public UniqueRandomIterator diff --git a/external/vulkancts/modules/vulkan/vktRenderPassTests.cpp b/external/vulkancts/modules/vulkan/vktRenderPassTests.cpp index 6a0a3d0..3df609f 100644 --- a/external/vulkancts/modules/vulkan/vktRenderPassTests.cpp +++ b/external/vulkancts/modules/vulkan/vktRenderPassTests.cpp @@ -1867,8 +1867,8 @@ void pushImageInitializationCommands (const DeviceInterface& vk, }; const VkImageSubresourceRange range = { - hasDepthComponent(format.order) ? VK_IMAGE_ASPECT_DEPTH : 0 - | hasStencilComponent(format.order) ? VK_IMAGE_ASPECT_STENCIL : 0, + (VkImageAspectFlags)(hasDepthComponent(format.order) ? VK_IMAGE_ASPECT_DEPTH : 0 + | hasStencilComponent(format.order) ? VK_IMAGE_ASPECT_STENCIL : 0), 0, 1, 0, @@ -2632,19 +2632,19 @@ public: void setColorStatus (Status status) { DE_ASSERT(getColorStatus() == STATUS_UNDEFINED); - m_status |= ((deUint8)status) << COLOR_OFFSET; + m_status |= (deUint8)(status << COLOR_OFFSET); } void setDepthStatus (Status status) { DE_ASSERT(getDepthStatus() == STATUS_UNDEFINED); - m_status |= ((deUint8)status) << DEPTH_OFFSET; + m_status |= (deUint8)(status << DEPTH_OFFSET); } void setStencilStatus (Status status) { DE_ASSERT(getStencilStatus() == STATUS_UNDEFINED); - m_status |= ((deUint8)status) << STENCIL_OFFSET; + m_status |= (deUint8)(status << STENCIL_OFFSET); } private: @@ -4166,7 +4166,7 @@ de::MovePtr createAttachmentAllocationTestGroup (tcu::TestCo VK_MEMORY_OUTPUT_COLOR_ATTACHMENT_BIT, VK_MEMORY_INPUT_COLOR_ATTACHMENT_BIT, - byRegion ? VK_TRUE : VK_FALSE)); + byRegion ? (VkBool32)VK_TRUE : (VkBool32)VK_FALSE)); } const RenderPass renderPass (attachments, subpasses, deps);