Add result buffer invalidates to depth stencil resolve tests
authorStephen Gallimore <stephen.gallimore@broadcom.com>
Wed, 31 Jul 2019 15:24:57 +0000 (16:24 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Wed, 14 Aug 2019 11:34:55 +0000 (07:34 -0400)
Components: Vulkan
VK-GL-CTS issue: 1907
Affects: dEQP-VK.renderpass2.depth_stencil_resolve.*

Change-Id: I90920f6005b0d6a72a78c588f4c3abec81826516

external/vulkancts/modules/vulkan/renderpass/vktRenderPassDepthStencilResolveTests.cpp

index a0e8256..3e45bb5 100644 (file)
@@ -808,6 +808,9 @@ bool DepthStencilResolveTest::verifyDepth (void)
        deUint32                        valuesCount     = layerSize * m_config.viewLayers;
        deUint8*                        pixelPtr        = static_cast<deUint8*>(m_bufferMemory->getHostPtr());
 
+       const DeviceInterface&          vkd             (m_context.getDeviceInterface());
+       invalidateMappedMemoryRange(vkd, m_context.getDevice(), m_bufferMemory->getMemory(), m_bufferMemory->getOffset(), VK_WHOLE_SIZE);
+
        float expectedValue = m_config.depthExpectedValue;
        if (m_config.depthResolveMode == VK_RESOLVE_MODE_NONE_KHR)
                expectedValue = m_config.clearValue.depth;
@@ -889,6 +892,9 @@ bool DepthStencilResolveTest::verifyStencil (void)
        deUint32                        valuesCount     = layerSize * m_config.viewLayers;
        deUint8*                        pixelPtr        = static_cast<deUint8*>(m_bufferMemory->getHostPtr());
 
+       const DeviceInterface&          vkd             (m_context.getDeviceInterface());
+       invalidateMappedMemoryRange(vkd, m_context.getDevice(), m_bufferMemory->getMemory(), m_bufferMemory->getOffset(), VK_WHOLE_SIZE);
+
        // when stencil is tested we are discarding invocations and
        // because of that depth and stencil need to be tested separately