{
}
-tcu::ConstPixelBufferAccess Image::readSurface (vk::VkQueue queue,
- vk::Allocator& allocator,
- vk::VkImageLayout layout,
- vk::VkOffset3D offset,
- int width,
- int height,
- vk::VkImageAspectFlagBits aspect,
- unsigned int mipLevel,
- unsigned int arrayElement)
-{
- m_pixelAccessData.resize(width * height * vk::mapVkFormat(m_format).getPixelSize());
- deMemset(m_pixelAccessData.data(), 0, m_pixelAccessData.size());
- if (aspect == vk::VK_IMAGE_ASPECT_COLOR_BIT)
- {
- read(queue, allocator, layout, offset, width, height, 1, mipLevel, arrayElement, aspect, vk::VK_IMAGE_TYPE_2D,
- m_pixelAccessData.data());
- }
- if (aspect == vk::VK_IMAGE_ASPECT_DEPTH_BIT || aspect == vk::VK_IMAGE_ASPECT_STENCIL_BIT)
- {
- readUsingBuffer(queue, allocator, layout, offset, width, height, 1, mipLevel, arrayElement, aspect, m_pixelAccessData.data());
- }
- return tcu::ConstPixelBufferAccess(vk::mapVkFormat(m_format), width, height, 1, m_pixelAccessData.data());
-}
-
tcu::ConstPixelBufferAccess Image::readVolume (vk::VkQueue queue,
vk::Allocator& allocator,
vk::VkImageLayout layout,
vk::Allocator& allocator,
vk::MemoryRequirement memoryRequirement = vk::MemoryRequirement::Any);
- tcu::ConstPixelBufferAccess readSurface (vk::VkQueue queue,
- vk::Allocator& allocator,
- vk::VkImageLayout layout,
- vk::VkOffset3D offset,
- int width,
- int height,
- vk::VkImageAspectFlagBits aspect,
- unsigned int mipLevel = 0,
- unsigned int arrayElement = 0);
-
tcu::ConstPixelBufferAccess readSurface1D (vk::VkQueue queue,
vk::Allocator& allocator,
vk::VkImageLayout layout,
}
log << tcu::TestLog::EndSection;
- const vk::VkOffset3D zeroOffset = { 0, 0, 0 };
-
- tcu::ConstPixelBufferAccess resultImageAccess = m_stateObjects->m_colorAttachmentImage->readSurface(
- queue, m_context.getDefaultAllocator(), vk::VK_IMAGE_LAYOUT_GENERAL,
- zeroOffset, StateObjects::HEIGHT, StateObjects::WIDTH, vk::VK_IMAGE_ASPECT_COLOR_BIT);
-
- log << tcu::TestLog::Image("Result", "Result", resultImageAccess);
-
if (passed)
{
return tcu::TestStatus(QP_TEST_RESULT_PASS, "Query result verification passed");
void captureResults (deUint64* retResults, deUint64* retAvailability, bool allowNotReady);
void logResults (const deUint64* results, const deUint64* availability);
bool validateResults (const deUint64* results, const deUint64* availability, bool allowUnavailable, vk::VkPrimitiveTopology primitiveTopology);
- void logRenderTarget (void);
enum
{
log << tcu::TestLog::EndSection;
- logRenderTarget();
+ if (m_testVector.queryResultsMode != RESULTS_MODE_COPY)
+ {
+ VK_CHECK(vk.queueWaitIdle(queue));
+ }
if (passed)
{
return passed;
}
-void OcclusionQueryTestInstance::logRenderTarget (void)
-{
- tcu::TestLog& log = m_context.getTestContext().getLog();
- const vk::VkQueue queue = m_context.getUniversalQueue();
- const vk::VkOffset3D zeroOffset = { 0, 0, 0 };
- tcu::ConstPixelBufferAccess resultImageAccess = m_stateObjects->m_colorAttachmentImage->readSurface(
- queue, m_context.getDefaultAllocator(), vk::VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
- zeroOffset, StateObjects::HEIGHT, StateObjects::WIDTH, vk::VK_IMAGE_ASPECT_COLOR_BIT);
-
- log << tcu::TestLog::Image("Result", "Result", resultImageAccess);
-}
-
template<class Instance>
class QueryPoolOcclusionTest : public vkt::TestCase
{