Do not call vkCmdResetQueryPool() inside render pass.
authorDae Kim <dae.kimpark@imgtec.com>
Thu, 7 Jan 2016 13:58:30 +0000 (13:58 +0000)
committerDae Kim <dae.kimpark@imgtec.com>
Thu, 7 Jan 2016 13:58:30 +0000 (13:58 +0000)
external/vulkancts/modules/vulkan/query_pool/vktQueryPoolOcclusionTests.cpp

index 4f99c208c474bf4f6fef70d2de7b44f40af143ff..496830168eaaed5a08b4483f54ef2b5ee11572fe 100644 (file)
@@ -395,6 +395,8 @@ tcu::TestStatus     BasicOcclusionQueryTestInstance::iterate (void)
 
        RenderPassBeginInfo renderPassBegin(*m_stateObjects->m_renderPass, *m_stateObjects->m_framebuffer, renderArea, renderPassClearValues);
 
+       vk.cmdResetQueryPool(*cmdBuffer, m_queryPool, 0, NUM_QUERIES_IN_POOL);
+
        vk.cmdBeginRenderPass(*cmdBuffer, &renderPassBegin, vk::VK_SUBPASS_CONTENTS_INLINE);
 
        vk.cmdBindPipeline(*cmdBuffer, vk::VK_PIPELINE_BIND_POINT_GRAPHICS, *m_stateObjects->m_pipeline);
@@ -403,8 +405,6 @@ tcu::TestStatus     BasicOcclusionQueryTestInstance::iterate (void)
        const vk::VkDeviceSize vertexBufferOffset = 0;
        vk.cmdBindVertexBuffers(*cmdBuffer, 0, 1, &vertexBuffer, &vertexBufferOffset);
 
-       vk.cmdResetQueryPool(*cmdBuffer, m_queryPool, 0, NUM_QUERIES_IN_POOL);
-
        vk.cmdBeginQuery(*cmdBuffer, m_queryPool, QUERY_INDEX_CAPTURE_EMPTY, m_testVector.queryControlFlags);
        vk.cmdEndQuery(*cmdBuffer, m_queryPool, QUERY_INDEX_CAPTURE_EMPTY);
 
@@ -743,6 +743,8 @@ vk::Move<vk::VkCommandBuffer> OcclusionQueryTestInstance::recordRender (vk::VkCo
 
        RenderPassBeginInfo renderPassBegin(*m_stateObjects->m_renderPass, *m_stateObjects->m_framebuffer, renderArea, renderPassClearValues);
 
+       vk.cmdResetQueryPool(*cmdBuffer, m_queryPool, 0, NUM_QUERIES_IN_POOL);
+
        vk.cmdBeginRenderPass(*cmdBuffer, &renderPassBegin, vk::VK_SUBPASS_CONTENTS_INLINE);
 
        vk.cmdBindPipeline(*cmdBuffer, vk::VK_PIPELINE_BIND_POINT_GRAPHICS,     *m_stateObjects->m_pipeline);
@@ -751,8 +753,6 @@ vk::Move<vk::VkCommandBuffer> OcclusionQueryTestInstance::recordRender (vk::VkCo
        const vk::VkDeviceSize vertexBufferOffset = 0;
        vk.cmdBindVertexBuffers(*cmdBuffer, 0, 1, &vertexBuffer, &vertexBufferOffset);
 
-       vk.cmdResetQueryPool(*cmdBuffer, m_queryPool, 0, NUM_QUERIES_IN_POOL);
-
        // Draw un-occluded geometry
        vk.cmdBeginQuery(*cmdBuffer, m_queryPool, QUERY_INDEX_CAPTURE_ALL, m_testVector.queryControlFlags);
        vk.cmdDraw(*cmdBuffer, NUM_VERTICES_IN_DRAWCALL, 1, START_VERTEX, 0);