Revert "tests: Update MismatchedQueueFamiliesOnSubmit"
authorTobin Ehlis <tobine@google.com>
Tue, 5 Dec 2017 19:06:36 +0000 (12:06 -0700)
committerTobin Ehlis <tobine@google.com>
Tue, 5 Dec 2017 19:07:00 +0000 (12:07 -0700)
This reverts commit 21420916e4dee67474655fe08b3d1125598b407d.

layers/vk_validation_error_database.txt
tests/layer_validation_tests.cpp

index 59b7173..441aa54 100644 (file)
@@ -3349,7 +3349,7 @@ VALIDATION_ERROR_31a0008c~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-vkQueueSubmit-pCo
 VALIDATION_ERROR_31a0008e~^~Y~^~Unknown~^~vkQueueSubmit~^~VUID-vkQueueSubmit-pCommandBuffers-00071~^~core~^~The spec valid usage text states 'If any element of the pCommandBuffers member of any element of pSubmits was not recorded with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, it must not be in the pending state.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueSubmit-pCommandBuffers-00071)~^~
 VALIDATION_ERROR_31a00090~^~Y~^~ExecuteUnrecordedSecondaryCB~^~vkQueueSubmit~^~VUID-vkQueueSubmit-pCommandBuffers-00072~^~core~^~The spec valid usage text states 'Any secondary command buffers recorded into any element of the pCommandBuffers member of any element of pSubmits must be in the pending or executable state.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueSubmit-pCommandBuffers-00072)~^~
 VALIDATION_ERROR_31a00092~^~Y~^~Unknown~^~vkQueueSubmit~^~VUID-vkQueueSubmit-pCommandBuffers-00073~^~core~^~The spec valid usage text states 'If any secondary command buffers recorded into any element of the pCommandBuffers member of any element of pSubmits was not recorded with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, it must not be in the pending state.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueSubmit-pCommandBuffers-00073)~^~
-VALIDATION_ERROR_31a00094~^~Y~^~MismatchedQueueFamiliesOnSubmit~^~vkQueueSubmit~^~VUID-vkQueueSubmit-pCommandBuffers-00074~^~core~^~The spec valid usage text states 'Each element of the pCommandBuffers member of each element of pSubmits must have been allocated from a VkCommandPool that was created for the same queue family queue belongs to.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueSubmit-pCommandBuffers-00074)~^~
+VALIDATION_ERROR_31a00094~^~Y~^~Unknown~^~vkQueueSubmit~^~VUID-vkQueueSubmit-pCommandBuffers-00074~^~core~^~The spec valid usage text states 'Each element of the pCommandBuffers member of each element of pSubmits must have been allocated from a VkCommandPool that was created for the same queue family queue belongs to.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueSubmit-pCommandBuffers-00074)~^~
 VALIDATION_ERROR_31a08801~^~Y~^~None~^~vkQueueSubmit~^~VUID-vkQueueSubmit-fence-parameter~^~core~^~The spec valid usage text states 'If fence is not VK_NULL_HANDLE, fence must be a valid VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueSubmit-fence-parameter)~^~implicit
 VALIDATION_ERROR_31a24001~^~Y~^~Unknown~^~vkQueueSubmit~^~VUID-vkQueueSubmit-pSubmits-parameter~^~core~^~The spec valid usage text states 'If submitCount is not 0, pSubmits must be a valid pointer to an array of submitCount valid VkSubmitInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueSubmit-pSubmits-parameter)~^~implicit
 VALIDATION_ERROR_31a29c01~^~Y~^~None~^~vkQueueSubmit~^~VUID-vkQueueSubmit-queue-parameter~^~core~^~The spec valid usage text states 'queue must be a valid VkQueue handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueSubmit-queue-parameter)~^~implicit
index fe43264..3ed33dd 100644 (file)
@@ -4140,30 +4140,27 @@ TEST_F(VkLayerTest, MismatchedQueueFamiliesOnSubmit) {
     // This test is meaningless unless we have multiple queue families
     auto queue_family_properties = m_device->phy().queue_properties();
     if (queue_family_properties.size() < 2) {
-        printf("             Device only has one queue family; skipped.\n");
         return;
     }
-
-    const uint32_t queue_family = 0;
-
-    const uint32_t other_queue_family = 1;
+    m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, " is being submitted on queue ");
+    // Get safe index of another queue family
+    uint32_t other_queue_family = (m_device->graphics_queue_node_index_ == 0) ? 1 : 0;
     VkQueue other_queue;
     vkGetDeviceQueue(m_device->device(), other_queue_family, 0, &other_queue);
 
-    VkCommandPoolObj cmd_pool(m_device, queue_family);
-    VkCommandBufferObj cmd_buff(m_device, &cmd_pool);
-
-    cmd_buff.begin();
-    cmd_buff.end();
+    // Record an empty cmd buffer
+    VkCommandBufferBeginInfo cmdBufBeginDesc = {};
+    cmdBufBeginDesc.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
+    vkBeginCommandBuffer(m_commandBuffer->handle(), &cmdBufBeginDesc);
+    vkEndCommandBuffer(m_commandBuffer->handle());
 
-    // Submit on the wrong queue
+    // And submit on the wrong queue
     VkSubmitInfo submit_info = {};
     submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
     submit_info.commandBufferCount = 1;
-    submit_info.pCommandBuffers = &cmd_buff.handle();
-
-    m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_31a00094);
+    submit_info.pCommandBuffers = &m_commandBuffer->handle();
     vkQueueSubmit(other_queue, 1, &submit_info, VK_NULL_HANDLE);
+
     m_errorMonitor->VerifyFound();
 }