From: JarredDavies Date: Fri, 14 Jul 2017 14:55:46 +0000 (+0100) Subject: Fix incorrect scale in pipeline_barrier tests X-Git-Tag: upstream/0.1.0~9^2~74 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d9623aad4aeb50ece827b3cdd90223cafb160cd7;p=platform%2Fupstream%2FVK-GL-CTS.git Fix incorrect scale in pipeline_barrier tests The ImageBlitFromImage verfication code incorrectly scales the refrence image it creates. The test should add 0.5 to the x and y coords before scaling them. Affects: dEQP-VK.memory.pipeline_barrier.* Components: Vulkan VK-GL-CTS issue: 577 Change-Id: I28d0b4deec0f1837c21cdc2dc68a9169ca8ae96b --- diff --git a/external/vulkancts/modules/vulkan/memory/vktMemoryPipelineBarrierTests.cpp b/external/vulkancts/modules/vulkan/memory/vktMemoryPipelineBarrierTests.cpp index 3df4c35..7069ef4 100644 --- a/external/vulkancts/modules/vulkan/memory/vktMemoryPipelineBarrierTests.cpp +++ b/external/vulkancts/modules/vulkan/memory/vktMemoryPipelineBarrierTests.cpp @@ -3879,7 +3879,7 @@ void ImageBlitFromImage::verify (VerifyContext& context, size_t) for (deInt32 y = 0; y < m_imageHeight; y++) for (deInt32 x = 0; x < m_imageWidth; x++) - refAccess.setPixel(source.getAccess().getPixelUint(int(float(x) * xscale), int(float(y) * yscale)), x, y); + refAccess.setPixel(source.getAccess().getPixelUint(int((float(x) + 0.5f) * xscale), int((float(y) + 0.5f) * yscale)), x, y); } else DE_FATAL("Unsupported scale");