dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_20_without_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_52_without_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_4096_without_availability_dstoffset
+dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_0_without_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_8_without_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_16_without_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_24_without_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_40_without_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_104_without_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_8192_without_availability_dstoffset
+dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_0_without_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_8_with_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_12_with_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_16_with_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_20_with_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_52_with_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_4096_with_availability_dstoffset
+dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_0_with_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_16_with_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_24_with_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_32_with_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_40_with_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_104_with_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_8192_with_availability_dstoffset
+dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_0_with_availability
dEQP-VK.query_pool.occlusion_query.copy_reset_results_size_32_stride_8_with_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_reset_results_size_32_stride_12_with_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_reset_results_size_32_stride_16_with_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_20_without_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_52_without_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_4096_without_availability_dstoffset
+dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_0_without_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_4_without_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_8_without_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_12_without_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_40_without_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_104_without_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_8192_without_availability_dstoffset
+dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_0_without_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_8_without_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_16_without_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_24_without_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_20_with_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_52_with_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_4096_with_availability_dstoffset
+dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_0_with_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_8_with_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_12_with_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_16_with_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_40_with_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_104_with_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_8192_with_availability_dstoffset
+dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_0_with_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_16_with_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_24_with_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_32_with_availability
if (m_testVector.queryResultsMode == RESULTS_MODE_COPY || m_testVector.queryResultsMode == RESULTS_MODE_COPY_RESET)
{
- deUint32 numQueriesinPool = NUM_QUERIES_IN_POOL + (m_testVector.queryResultsDstOffset ? 1 : 0);
- const vk::VkDeviceSize resultsBufferSize = m_testVector.queryResultsStride * numQueriesinPool;
+ deUint32 numQueriesinPool = NUM_QUERIES_IN_POOL + (m_testVector.queryResultsDstOffset ? 1 : 0);
+ const vk::VkDeviceSize elementSize = m_testVector.queryResultSize == RESULT_SIZE_32_BIT ? sizeof(deUint32) : sizeof(deUint64);
+ const vk::VkDeviceSize resultsBufferSize = m_testVector.queryResultsStride == 0
+ ? (elementSize + elementSize * m_testVector.queryResultsAvailability) * numQueriesinPool
+ : m_testVector.queryResultsStride * numQueriesinPool;
m_queryPoolResultsBuffer = Buffer::createAndAlloc(vk, device, BufferCreateInfo(resultsBufferSize, vk::VK_BUFFER_USAGE_TRANSFER_DST_BIT), m_context.getDefaultAllocator(), vk::MemoryRequirement::HostVisible);
}
&& !hasSeparateCopyCmdBuf())
{
vk::VkDeviceSize dstOffset = m_testVector.queryResultsDstOffset ? m_testVector.queryResultsStride : 0u;
- vk.cmdCopyQueryPoolResults(*cmdBuffer, m_queryPool, 0, NUM_QUERIES_IN_POOL, m_queryPoolResultsBuffer->object(), dstOffset, m_testVector.queryResultsStride, m_queryResultFlags);
+
+ if (m_testVector.queryResultsStride != 0u)
+ {
+ vk.cmdCopyQueryPoolResults(*cmdBuffer, m_queryPool, 0, NUM_QUERIES_IN_POOL, m_queryPoolResultsBuffer->object(), dstOffset, m_testVector.queryResultsStride, m_queryResultFlags);
+ }
+ else
+ {
+ const vk::VkDeviceSize elementSize = m_testVector.queryResultSize == RESULT_SIZE_32_BIT ? sizeof(deUint32) : sizeof(deUint64);
+ const vk::VkDeviceSize strideSize = elementSize + elementSize * m_testVector.queryResultsAvailability;
+
+ for (int queryNdx = 0; queryNdx < NUM_QUERIES_IN_POOL; queryNdx++)
+ {
+ vk.cmdCopyQueryPoolResults(*cmdBuffer, m_queryPool, queryNdx, 1, m_queryPoolResultsBuffer->object(), strideSize * queryNdx, 0, m_queryResultFlags);
+ }
+ }
+
bufferBarrier(vk, *cmdBuffer, m_queryPoolResultsBuffer->object(), vk::VK_ACCESS_TRANSFER_WRITE_BIT, vk::VK_ACCESS_HOST_READ_BIT, vk::VK_PIPELINE_STAGE_TRANSFER_BIT, vk::VK_PIPELINE_STAGE_HOST_BIT);
}
vk::Move<vk::VkCommandBuffer> cmdBuffer (vk::allocateCommandBuffer(vk, device, cmdPool, vk::VK_COMMAND_BUFFER_LEVEL_PRIMARY));
beginCommandBuffer(vk, *cmdBuffer);
+
vk::VkDeviceSize dstOffset = m_testVector.queryResultsDstOffset ? m_testVector.queryResultsStride : 0u;
- vk.cmdCopyQueryPoolResults(*cmdBuffer, m_queryPool, 0, NUM_QUERIES_IN_POOL, m_queryPoolResultsBuffer->object(), dstOffset, m_testVector.queryResultsStride, m_queryResultFlags);
+
+ if (m_testVector.queryResultsStride != 0u)
+ {
+ vk.cmdCopyQueryPoolResults(*cmdBuffer, m_queryPool, 0, NUM_QUERIES_IN_POOL, m_queryPoolResultsBuffer->object(), dstOffset, m_testVector.queryResultsStride, m_queryResultFlags);
+ }
+ else
+ {
+ const vk::VkDeviceSize elementSize = m_testVector.queryResultSize == RESULT_SIZE_32_BIT ? sizeof(deUint32) : sizeof(deUint64);
+ const vk::VkDeviceSize strideSize = elementSize + elementSize * m_testVector.queryResultsAvailability;
+
+ for (int queryNdx = 0; queryNdx < NUM_QUERIES_IN_POOL; queryNdx++)
+ {
+ vk.cmdCopyQueryPoolResults(*cmdBuffer, m_queryPool, queryNdx, 1, m_queryPoolResultsBuffer->object(), strideSize * queryNdx, 0, m_queryResultFlags);
+ }
+ }
+
bufferBarrier(vk, *cmdBuffer, m_queryPoolResultsBuffer->object(), vk::VK_ACCESS_TRANSFER_WRITE_BIT, vk::VK_ACCESS_HOST_READ_BIT, vk::VK_PIPELINE_STAGE_TRANSFER_BIT, vk::VK_PIPELINE_STAGE_HOST_BIT);
+
endCommandBuffer(vk, *cmdBuffer);
return cmdBuffer;
void OcclusionQueryTestInstance::captureResults (deUint64* retResults, deUint64* retAvailAbility, bool allowNotReady)
{
-
const vk::VkDevice device = m_context.getDevice();
const vk::DeviceInterface& vk = m_context.getDeviceInterface();
- const vk::VkDeviceSize resultsSize = m_testVector.queryResultsStride * NUM_QUERIES_IN_POOL;
- std::vector<deUint8> resultsBuffer (static_cast<size_t>(resultsSize));
+ const vk::VkDeviceSize elementSize = m_testVector.queryResultSize == RESULT_SIZE_32_BIT ? sizeof(deUint32) : sizeof(deUint64);
+ const vk::VkDeviceSize resultsSize = m_testVector.queryResultsStride == 0
+ ? elementSize + elementSize * m_testVector.queryResultsAvailability
+ : m_testVector.queryResultsStride;
+ std::vector<deUint8> resultsBuffer (static_cast<size_t>(resultsSize * NUM_QUERIES_IN_POOL));
if (m_testVector.queryResultsMode == RESULTS_MODE_GET || m_testVector.queryResultsMode == RESULTS_MODE_GET_RESET)
{
for (int queryNdx = 0; queryNdx < NUM_QUERIES_IN_POOL; queryNdx++)
{
- const void* srcPtr = &resultsBuffer[queryNdx * static_cast<size_t>(m_testVector.queryResultsStride)];
+ const void* srcPtr = &resultsBuffer[queryNdx * static_cast<size_t>(resultsSize)];
+
if (m_testVector.queryResultSize == RESULT_SIZE_32_BIT)
{
const deUint32* srcPtrTyped = static_cast<const deUint32*>(srcPtr);
if (m_testVector.queryResultsMode == RESULTS_MODE_GET_RESET)
{
vk.resetQueryPool(device, m_queryPool, 0, NUM_QUERIES_IN_POOL);
+
vk::VkResult queryResult = vk.getQueryPoolResults(device, m_queryPool, 0, NUM_QUERIES_IN_POOL, resultsBuffer.size(), &resultsBuffer[0], m_testVector.queryResultsStride, m_queryResultFlags);
if (queryResult != vk::VK_NOT_READY)
*/
for (int queryNdx = 0; queryNdx < NUM_QUERIES_IN_POOL; queryNdx++)
{
- const void* srcPtr = &resultsBuffer[queryNdx * static_cast<size_t>(m_testVector.queryResultsStride)];
+ const void* srcPtr = &resultsBuffer[queryNdx * static_cast<size_t>(resultsSize)];
if (m_testVector.queryResultSize == RESULT_SIZE_32_BIT)
{
const deUint32* srcPtrTyped = static_cast<const deUint32*>(srcPtr);
// \todo [2015-12-18 scygan] Ensure only stride values aligned to resultSize are allowed. Otherwise test should be extended.
const vk::VkDeviceSize strides[] =
{
+ 0u,
1 * resultSize,
2 * resultSize,
3 * resultSize,
const vk::VkDeviceSize elementSize = (testVector.queryResultsAvailability ? resultSize * 2 : resultSize);
- if (elementSize > testVector.queryResultsStride)
+ if (elementSize > testVector.queryResultsStride && strides[strideIdx] != 0)
+ {
+ continue;
+ }
+
+ if (strides[strideIdx] == 0)
{
+ // Due to the nature of the test, the dstOffset is tested automatically when stride size is 0.
+ if (testVector.queryResultsDstOffset)
+ {
continue;
+ }
+
+ // We are testing only VkCmdCopyQueryPoolResults with stride 0.
+ if (testVector.queryResultsMode != RESULTS_MODE_COPY)
+ {
+ continue;
+ }
}
std::ostringstream testName;
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_20_without_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_52_without_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_4096_without_availability_dstoffset
+dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_0_without_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_4_without_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_8_without_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_12_without_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_40_without_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_104_without_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_8192_without_availability_dstoffset
+dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_0_without_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_8_without_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_16_without_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_24_without_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_20_with_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_52_with_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_4096_with_availability_dstoffset
+dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_0_with_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_8_with_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_12_with_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_32_stride_16_with_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_40_with_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_104_with_availability_dstoffset
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_8192_with_availability_dstoffset
+dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_0_with_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_16_with_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_24_with_availability
dEQP-VK.query_pool.occlusion_query.copy_results_size_64_stride_32_with_availability