Skip to content
Snippets Groups Projects
Commit a3f66256 authored by Tobin Ehlis's avatar Tobin Ehlis
Browse files

tests:Update 2nd CB test to change rect value

Modify ConfirmNoVLErrorWhenVkCmdClearAttachmentsCalledInSecondaryCB
positive test to change the rect value after the call to
vkCmdClearAttachments() in the secondary command buffer but before the
secondary CB is executed in vkCmdExecuteCommands().
This exposes a previous bug in validation layers where the pointer to
the VkClearRect was copied, but not the underlying rect itself.
parent 3e3e703b
Branches
Tags
No related merge requests found
...@@ -13584,14 +13584,16 @@ TEST_F(VkPositiveLayerTest, ConfirmNoVLErrorWhenVkCmdClearAttachmentsCalledInSec ...@@ -13584,14 +13584,16 @@ TEST_F(VkPositiveLayerTest, ConfirmNoVLErrorWhenVkCmdClearAttachmentsCalledInSec
color_attachment.colorAttachment = 0; color_attachment.colorAttachment = 0;
VkClearRect clear_rect = {{{0, 0}, {(uint32_t)m_width, (uint32_t)m_height}}, 0, 1}; VkClearRect clear_rect = {{{0, 0}, {(uint32_t)m_width, (uint32_t)m_height}}, 0, 1};
vkCmdClearAttachments(secondary.handle(), 1, &color_attachment, 1, &clear_rect); vkCmdClearAttachments(secondary.handle(), 1, &color_attachment, 1, &clear_rect);
m_errorMonitor->VerifyNotFound();
secondary.end(); secondary.end();
// Modify clear rect here to verify that it doesn't cause validation error
clear_rect = {{{0, 0}, {99999999, 99999999}}, 0, 0};
   
m_commandBuffer->begin(); m_commandBuffer->begin();
vkCmdBeginRenderPass(m_commandBuffer->handle(), &m_renderPassBeginInfo, VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS); vkCmdBeginRenderPass(m_commandBuffer->handle(), &m_renderPassBeginInfo, VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS);
vkCmdExecuteCommands(m_commandBuffer->handle(), 1, &secondary.handle()); vkCmdExecuteCommands(m_commandBuffer->handle(), 1, &secondary.handle());
vkCmdEndRenderPass(m_commandBuffer->handle()); vkCmdEndRenderPass(m_commandBuffer->handle());
m_commandBuffer->end(); m_commandBuffer->end();
m_errorMonitor->VerifyNotFound();
} }
   
TEST_F(VkLayerTest, CmdClearAttachmentTests) { TEST_F(VkLayerTest, CmdClearAttachmentTests) {
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment