Add secondary command buffer tests for the VK_KHR_protected_memory extension
authorGabor Aron Takacs <gt.uszeged@partner.samsung.com>
Wed, 19 Jul 2017 12:16:37 +0000 (14:16 +0200)
committerPeter Gal <pgal.u-szeged@partner.samsung.com>
Thu, 7 Sep 2017 16:53:55 +0000 (18:53 +0200)
Add secondary command buffer tests for:
* Attachment clear tests.
* Blit image, copy image, clear color image tests.
* Fill, update, copy buffer tests.
* Copy buffer to image tests and copy image to buffer tests.

New tests:
* dEQP-VK.protected_memory.attachment.clear_op.*.secondary.*
* dEQP-VK.protected_memory.image.*.secondary.*
* dEQP-VK.protected_memory.buffer.*.secondary.*

Components: Vulkan
VK-GL-CTS issue: 118

Change-Id: Ica36108cff735568c15a338e13ab8fb72f2420f0

android/cts/master/vk-master.txt
external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemAttachmentClearTests.cpp
external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemBlitImageTests.cpp
external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemClearColorImageTests.cpp
external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemCopyBufferToImageTests.cpp
external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemCopyImageTests.cpp
external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemCopyImageToBufferTests.cpp
external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemFillUpdateCopyBufferTests.cpp
external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemUtils.cpp
external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemUtils.hpp
external/vulkancts/mustpass/1.0.3/vk-default.txt

index e28e439..07871b3 100755 (executable)
@@ -265327,6 +265327,23 @@ dEQP-VK.protected_memory.attachment.clear_op.primary.random.clear_7
 dEQP-VK.protected_memory.attachment.clear_op.primary.random.clear_8
 dEQP-VK.protected_memory.attachment.clear_op.primary.random.clear_9
 dEQP-VK.protected_memory.attachment.clear_op.primary.random.clear_10
+dEQP-VK.protected_memory.attachment.clear_op.secondary.static.clear_1
+dEQP-VK.protected_memory.attachment.clear_op.secondary.static.clear_2
+dEQP-VK.protected_memory.attachment.clear_op.secondary.static.clear_3
+dEQP-VK.protected_memory.attachment.clear_op.secondary.static.clear_4
+dEQP-VK.protected_memory.attachment.clear_op.secondary.static.clear_5
+dEQP-VK.protected_memory.attachment.clear_op.secondary.static.clear_6
+dEQP-VK.protected_memory.attachment.clear_op.secondary.static.clear_7
+dEQP-VK.protected_memory.attachment.clear_op.secondary.random.clear_1
+dEQP-VK.protected_memory.attachment.clear_op.secondary.random.clear_2
+dEQP-VK.protected_memory.attachment.clear_op.secondary.random.clear_3
+dEQP-VK.protected_memory.attachment.clear_op.secondary.random.clear_4
+dEQP-VK.protected_memory.attachment.clear_op.secondary.random.clear_5
+dEQP-VK.protected_memory.attachment.clear_op.secondary.random.clear_6
+dEQP-VK.protected_memory.attachment.clear_op.secondary.random.clear_7
+dEQP-VK.protected_memory.attachment.clear_op.secondary.random.clear_8
+dEQP-VK.protected_memory.attachment.clear_op.secondary.random.clear_9
+dEQP-VK.protected_memory.attachment.clear_op.secondary.random.clear_10
 dEQP-VK.protected_memory.image.copy.primary.static.copy_1
 dEQP-VK.protected_memory.image.copy.primary.static.copy_2
 dEQP-VK.protected_memory.image.copy.primary.static.copy_3
@@ -265344,6 +265361,23 @@ dEQP-VK.protected_memory.image.copy.primary.random.copy_7
 dEQP-VK.protected_memory.image.copy.primary.random.copy_8
 dEQP-VK.protected_memory.image.copy.primary.random.copy_9
 dEQP-VK.protected_memory.image.copy.primary.random.copy_10
+dEQP-VK.protected_memory.image.copy.secondary.static.copy_1
+dEQP-VK.protected_memory.image.copy.secondary.static.copy_2
+dEQP-VK.protected_memory.image.copy.secondary.static.copy_3
+dEQP-VK.protected_memory.image.copy.secondary.static.copy_4
+dEQP-VK.protected_memory.image.copy.secondary.static.copy_5
+dEQP-VK.protected_memory.image.copy.secondary.static.copy_6
+dEQP-VK.protected_memory.image.copy.secondary.static.copy_7
+dEQP-VK.protected_memory.image.copy.secondary.random.copy_1
+dEQP-VK.protected_memory.image.copy.secondary.random.copy_2
+dEQP-VK.protected_memory.image.copy.secondary.random.copy_3
+dEQP-VK.protected_memory.image.copy.secondary.random.copy_4
+dEQP-VK.protected_memory.image.copy.secondary.random.copy_5
+dEQP-VK.protected_memory.image.copy.secondary.random.copy_6
+dEQP-VK.protected_memory.image.copy.secondary.random.copy_7
+dEQP-VK.protected_memory.image.copy.secondary.random.copy_8
+dEQP-VK.protected_memory.image.copy.secondary.random.copy_9
+dEQP-VK.protected_memory.image.copy.secondary.random.copy_10
 dEQP-VK.protected_memory.image.blit.primary.static.blit_1
 dEQP-VK.protected_memory.image.blit.primary.static.blit_2
 dEQP-VK.protected_memory.image.blit.primary.static.blit_3
@@ -265361,6 +265395,23 @@ dEQP-VK.protected_memory.image.blit.primary.random.blit_7
 dEQP-VK.protected_memory.image.blit.primary.random.blit_8
 dEQP-VK.protected_memory.image.blit.primary.random.blit_9
 dEQP-VK.protected_memory.image.blit.primary.random.blit_10
+dEQP-VK.protected_memory.image.blit.secondary.static.blit_1
+dEQP-VK.protected_memory.image.blit.secondary.static.blit_2
+dEQP-VK.protected_memory.image.blit.secondary.static.blit_3
+dEQP-VK.protected_memory.image.blit.secondary.static.blit_4
+dEQP-VK.protected_memory.image.blit.secondary.static.blit_5
+dEQP-VK.protected_memory.image.blit.secondary.static.blit_6
+dEQP-VK.protected_memory.image.blit.secondary.static.blit_7
+dEQP-VK.protected_memory.image.blit.secondary.random.blit_1
+dEQP-VK.protected_memory.image.blit.secondary.random.blit_2
+dEQP-VK.protected_memory.image.blit.secondary.random.blit_3
+dEQP-VK.protected_memory.image.blit.secondary.random.blit_4
+dEQP-VK.protected_memory.image.blit.secondary.random.blit_5
+dEQP-VK.protected_memory.image.blit.secondary.random.blit_6
+dEQP-VK.protected_memory.image.blit.secondary.random.blit_7
+dEQP-VK.protected_memory.image.blit.secondary.random.blit_8
+dEQP-VK.protected_memory.image.blit.secondary.random.blit_9
+dEQP-VK.protected_memory.image.blit.secondary.random.blit_10
 dEQP-VK.protected_memory.image.clear_color.primary.static.clear_1
 dEQP-VK.protected_memory.image.clear_color.primary.static.clear_2
 dEQP-VK.protected_memory.image.clear_color.primary.static.clear_3
@@ -265378,6 +265429,23 @@ dEQP-VK.protected_memory.image.clear_color.primary.random.clear_7
 dEQP-VK.protected_memory.image.clear_color.primary.random.clear_8
 dEQP-VK.protected_memory.image.clear_color.primary.random.clear_9
 dEQP-VK.protected_memory.image.clear_color.primary.random.clear_10
+dEQP-VK.protected_memory.image.clear_color.secondary.static.clear_1
+dEQP-VK.protected_memory.image.clear_color.secondary.static.clear_2
+dEQP-VK.protected_memory.image.clear_color.secondary.static.clear_3
+dEQP-VK.protected_memory.image.clear_color.secondary.static.clear_4
+dEQP-VK.protected_memory.image.clear_color.secondary.static.clear_5
+dEQP-VK.protected_memory.image.clear_color.secondary.static.clear_6
+dEQP-VK.protected_memory.image.clear_color.secondary.static.clear_7
+dEQP-VK.protected_memory.image.clear_color.secondary.random.clear_1
+dEQP-VK.protected_memory.image.clear_color.secondary.random.clear_2
+dEQP-VK.protected_memory.image.clear_color.secondary.random.clear_3
+dEQP-VK.protected_memory.image.clear_color.secondary.random.clear_4
+dEQP-VK.protected_memory.image.clear_color.secondary.random.clear_5
+dEQP-VK.protected_memory.image.clear_color.secondary.random.clear_6
+dEQP-VK.protected_memory.image.clear_color.secondary.random.clear_7
+dEQP-VK.protected_memory.image.clear_color.secondary.random.clear_8
+dEQP-VK.protected_memory.image.clear_color.secondary.random.clear_9
+dEQP-VK.protected_memory.image.clear_color.secondary.random.clear_10
 dEQP-VK.protected_memory.image.copy_buffer_to_image.primary.static.copy_1
 dEQP-VK.protected_memory.image.copy_buffer_to_image.primary.static.copy_2
 dEQP-VK.protected_memory.image.copy_buffer_to_image.primary.static.copy_3
@@ -265394,6 +265462,22 @@ dEQP-VK.protected_memory.image.copy_buffer_to_image.primary.random.copy_7
 dEQP-VK.protected_memory.image.copy_buffer_to_image.primary.random.copy_8
 dEQP-VK.protected_memory.image.copy_buffer_to_image.primary.random.copy_9
 dEQP-VK.protected_memory.image.copy_buffer_to_image.primary.random.copy_10
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.static.copy_1
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.static.copy_2
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.static.copy_3
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.static.copy_4
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.static.copy_5
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.static.copy_6
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.random.copy_1
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.random.copy_2
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.random.copy_3
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.random.copy_4
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.random.copy_5
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.random.copy_6
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.random.copy_7
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.random.copy_8
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.random.copy_9
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.random.copy_10
 dEQP-VK.protected_memory.buffer.fill.float_buffer.primary.static.test_1
 dEQP-VK.protected_memory.buffer.fill.float_buffer.primary.static.test_2
 dEQP-VK.protected_memory.buffer.fill.float_buffer.primary.static.test_3
@@ -265410,6 +265494,22 @@ dEQP-VK.protected_memory.buffer.fill.float_buffer.primary.random.test_7
 dEQP-VK.protected_memory.buffer.fill.float_buffer.primary.random.test_8
 dEQP-VK.protected_memory.buffer.fill.float_buffer.primary.random.test_9
 dEQP-VK.protected_memory.buffer.fill.float_buffer.primary.random.test_10
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.static.test_1
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.static.test_2
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.static.test_3
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.static.test_4
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.static.test_5
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.static.test_6
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.random.test_1
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.random.test_2
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.random.test_3
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.random.test_4
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.random.test_5
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.random.test_6
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.random.test_7
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.random.test_8
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.random.test_9
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.random.test_10
 dEQP-VK.protected_memory.buffer.fill.integer_buffer.primary.static.test_1
 dEQP-VK.protected_memory.buffer.fill.integer_buffer.primary.static.test_2
 dEQP-VK.protected_memory.buffer.fill.integer_buffer.primary.static.test_3
@@ -265426,6 +265526,22 @@ dEQP-VK.protected_memory.buffer.fill.integer_buffer.primary.random.test_7
 dEQP-VK.protected_memory.buffer.fill.integer_buffer.primary.random.test_8
 dEQP-VK.protected_memory.buffer.fill.integer_buffer.primary.random.test_9
 dEQP-VK.protected_memory.buffer.fill.integer_buffer.primary.random.test_10
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.static.test_1
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.static.test_2
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.static.test_3
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.static.test_4
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.static.test_5
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.static.test_6
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.random.test_1
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.random.test_2
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.random.test_3
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.random.test_4
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.random.test_5
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.random.test_6
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.random.test_7
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.random.test_8
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.random.test_9
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.random.test_10
 dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.primary.static.test_1
 dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.primary.static.test_2
 dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.primary.static.test_3
@@ -265442,6 +265558,22 @@ dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.primary.random.test_7
 dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.primary.random.test_8
 dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.primary.random.test_9
 dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.primary.random.test_10
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.static.test_1
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.static.test_2
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.static.test_3
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.static.test_4
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.static.test_5
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.static.test_6
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.random.test_1
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.random.test_2
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.random.test_3
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.random.test_4
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.random.test_5
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.random.test_6
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.random.test_7
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.random.test_8
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.random.test_9
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.random.test_10
 dEQP-VK.protected_memory.buffer.update.float_buffer.primary.static.test_1
 dEQP-VK.protected_memory.buffer.update.float_buffer.primary.static.test_2
 dEQP-VK.protected_memory.buffer.update.float_buffer.primary.static.test_3
@@ -265458,6 +265590,22 @@ dEQP-VK.protected_memory.buffer.update.float_buffer.primary.random.test_7
 dEQP-VK.protected_memory.buffer.update.float_buffer.primary.random.test_8
 dEQP-VK.protected_memory.buffer.update.float_buffer.primary.random.test_9
 dEQP-VK.protected_memory.buffer.update.float_buffer.primary.random.test_10
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.static.test_1
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.static.test_2
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.static.test_3
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.static.test_4
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.static.test_5
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.static.test_6
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.random.test_1
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.random.test_2
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.random.test_3
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.random.test_4
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.random.test_5
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.random.test_6
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.random.test_7
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.random.test_8
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.random.test_9
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.random.test_10
 dEQP-VK.protected_memory.buffer.update.integer_buffer.primary.static.test_1
 dEQP-VK.protected_memory.buffer.update.integer_buffer.primary.static.test_2
 dEQP-VK.protected_memory.buffer.update.integer_buffer.primary.static.test_3
@@ -265474,6 +265622,22 @@ dEQP-VK.protected_memory.buffer.update.integer_buffer.primary.random.test_7
 dEQP-VK.protected_memory.buffer.update.integer_buffer.primary.random.test_8
 dEQP-VK.protected_memory.buffer.update.integer_buffer.primary.random.test_9
 dEQP-VK.protected_memory.buffer.update.integer_buffer.primary.random.test_10
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.static.test_1
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.static.test_2
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.static.test_3
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.static.test_4
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.static.test_5
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.static.test_6
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.random.test_1
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.random.test_2
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.random.test_3
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.random.test_4
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.random.test_5
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.random.test_6
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.random.test_7
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.random.test_8
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.random.test_9
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.random.test_10
 dEQP-VK.protected_memory.buffer.update.unsigned_buffer.primary.static.test_1
 dEQP-VK.protected_memory.buffer.update.unsigned_buffer.primary.static.test_2
 dEQP-VK.protected_memory.buffer.update.unsigned_buffer.primary.static.test_3
@@ -265490,6 +265654,22 @@ dEQP-VK.protected_memory.buffer.update.unsigned_buffer.primary.random.test_7
 dEQP-VK.protected_memory.buffer.update.unsigned_buffer.primary.random.test_8
 dEQP-VK.protected_memory.buffer.update.unsigned_buffer.primary.random.test_9
 dEQP-VK.protected_memory.buffer.update.unsigned_buffer.primary.random.test_10
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.static.test_1
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.static.test_2
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.static.test_3
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.static.test_4
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.static.test_5
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.static.test_6
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.random.test_1
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.random.test_2
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.random.test_3
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.random.test_4
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.random.test_5
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.random.test_6
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.random.test_7
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.random.test_8
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.random.test_9
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.random.test_10
 dEQP-VK.protected_memory.buffer.copy.float_buffer.primary.static.test_1
 dEQP-VK.protected_memory.buffer.copy.float_buffer.primary.static.test_2
 dEQP-VK.protected_memory.buffer.copy.float_buffer.primary.static.test_3
@@ -265506,6 +265686,22 @@ dEQP-VK.protected_memory.buffer.copy.float_buffer.primary.random.test_7
 dEQP-VK.protected_memory.buffer.copy.float_buffer.primary.random.test_8
 dEQP-VK.protected_memory.buffer.copy.float_buffer.primary.random.test_9
 dEQP-VK.protected_memory.buffer.copy.float_buffer.primary.random.test_10
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.static.test_1
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.static.test_2
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.static.test_3
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.static.test_4
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.static.test_5
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.static.test_6
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.random.test_1
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.random.test_2
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.random.test_3
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.random.test_4
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.random.test_5
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.random.test_6
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.random.test_7
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.random.test_8
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.random.test_9
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.random.test_10
 dEQP-VK.protected_memory.buffer.copy.integer_buffer.primary.static.test_1
 dEQP-VK.protected_memory.buffer.copy.integer_buffer.primary.static.test_2
 dEQP-VK.protected_memory.buffer.copy.integer_buffer.primary.static.test_3
@@ -265522,6 +265718,22 @@ dEQP-VK.protected_memory.buffer.copy.integer_buffer.primary.random.test_7
 dEQP-VK.protected_memory.buffer.copy.integer_buffer.primary.random.test_8
 dEQP-VK.protected_memory.buffer.copy.integer_buffer.primary.random.test_9
 dEQP-VK.protected_memory.buffer.copy.integer_buffer.primary.random.test_10
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.static.test_1
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.static.test_2
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.static.test_3
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.static.test_4
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.static.test_5
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.static.test_6
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.random.test_1
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.random.test_2
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.random.test_3
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.random.test_4
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.random.test_5
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.random.test_6
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.random.test_7
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.random.test_8
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.random.test_9
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.random.test_10
 dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.primary.static.test_1
 dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.primary.static.test_2
 dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.primary.static.test_3
@@ -265538,6 +265750,22 @@ dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.primary.random.test_7
 dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.primary.random.test_8
 dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.primary.random.test_9
 dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.primary.random.test_10
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.static.test_1
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.static.test_2
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.static.test_3
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.static.test_4
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.static.test_5
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.static.test_6
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.random.test_1
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.random.test_2
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.random.test_3
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.random.test_4
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.random.test_5
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.random.test_6
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.random.test_7
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.random.test_8
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.random.test_9
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.random.test_10
 dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.primary.static.copy_1
 dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.primary.static.copy_2
 dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.primary.static.copy_3
@@ -265554,6 +265782,22 @@ dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.primary.random.copy_7
 dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.primary.random.copy_8
 dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.primary.random.copy_9
 dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.primary.random.copy_10
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.static.copy_1
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.static.copy_2
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.static.copy_3
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.static.copy_4
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.static.copy_5
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.static.copy_6
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.random.copy_1
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.random.copy_2
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.random.copy_3
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.random.copy_4
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.random.copy_5
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.random.copy_6
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.random.copy_7
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.random.copy_8
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.random.copy_9
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.random.copy_10
 dEQP-VK.protected_memory.ssbo.ssbo_read.fragment.static.read_1
 dEQP-VK.protected_memory.ssbo.ssbo_read.fragment.static.read_2
 dEQP-VK.protected_memory.ssbo.ssbo_read.fragment.static.read_3
index e8232f5..fbff6e1 100644 (file)
@@ -57,7 +57,8 @@ public:
                                                                AttachmentClearTestInstance     (Context&                                       ctx,
                                                                                                                         const vk::VkClearValue&        clearValue,
                                                                                                                         const ValidationData&          refData,
-                                                                                                                        const ImageValidator&          validator);
+                                                                                                                        const ImageValidator&          validator,
+                                                                                                                        const CmdBufferType            cmdBufferType);
        virtual tcu::TestStatus         iterate                                         (void);
 
 private:
@@ -65,6 +66,7 @@ private:
        const vk::VkClearValue&         m_clearValue;
        const ValidationData&           m_refData;
        const ImageValidator&           m_validator;
+       const CmdBufferType                     m_cmdBufferType;
 };
 
 
@@ -74,17 +76,19 @@ public:
                                                        AttachmentClearTestCase         (tcu::TestContext&              testCtx,
                                                                                                                 const std::string&             name,
                                                                                                                 vk::VkClearValue               clearValue,
-                                                                                                                ValidationData                 data)
-                                                               : TestCase              (testCtx, name, "Clear attachment.")
-                                                               , m_clearValue  (clearValue)
-                                                               , m_refData             (data)
+                                                                                                                ValidationData                 data,
+                                                                                                                CmdBufferType                  cmdBufferType)
+                                                               : TestCase                      (testCtx, name, "Clear attachment.")
+                                                               , m_clearValue          (clearValue)
+                                                               , m_refData                     (data)
+                                                               , m_cmdBufferType       (cmdBufferType)
                                                        {
                                                        }
 
        virtual                                 ~AttachmentClearTestCase        (void) {}
        virtual TestInstance*   createInstance                          (Context& ctx) const
                                                        {
-                                                               return new AttachmentClearTestInstance(ctx, m_clearValue, m_refData, m_validator);
+                                                               return new AttachmentClearTestInstance(ctx, m_clearValue, m_refData, m_validator, m_cmdBufferType);
                                                        }
        virtual void                    initPrograms                            (vk::SourceCollections& programCollection) const
                                                        {
@@ -94,17 +98,20 @@ private:
        vk::VkClearValue                m_clearValue;
        ValidationData                  m_refData;
        ImageValidator                  m_validator;
+       CmdBufferType                   m_cmdBufferType;
 };
 
 AttachmentClearTestInstance::AttachmentClearTestInstance       (Context&                                       ctx,
                                                                                                                         const vk::VkClearValue&        clearValue,
                                                                                                                         const ValidationData&          refData,
-                                                                                                                        const ImageValidator&          validator)
+                                                                                                                        const ImageValidator&          validator,
+                                                                                                                        const CmdBufferType            cmdBufferType)
        : ProtectedTestInstance (ctx)
        , m_imageFormat                 (vk::VK_FORMAT_R8G8B8A8_UNORM)
        , m_clearValue                  (clearValue)
        , m_refData                             (refData)
        , m_validator                   (validator)
+       , m_cmdBufferType               (cmdBufferType)
 {
 }
 
@@ -129,6 +136,8 @@ tcu::TestStatus AttachmentClearTestInstance::iterate()
 
        vk::Unique<vk::VkCommandPool>           cmdPool                         (makeCommandPool(vk, device, PROTECTION_ENABLED, queueFamilyIndex));
        vk::Unique<vk::VkCommandBuffer>         cmdBuffer                       (vk::allocateCommandBuffer(vk, device, *cmdPool, vk::VK_COMMAND_BUFFER_LEVEL_PRIMARY));
+       vk::Unique<vk::VkCommandBuffer>         secondaryCmdBuffer      (vk::allocateCommandBuffer(vk, device, *cmdPool, vk::VK_COMMAND_BUFFER_LEVEL_SECONDARY));
+       vk::VkCommandBuffer                                     targetCmdBuffer         = (m_cmdBufferType == CMD_BUFFER_SECONDARY) ? *secondaryCmdBuffer : *cmdBuffer;
 
        // Begin cmd buffer
        beginCommandBuffer(vk, *cmdBuffer);
@@ -182,7 +191,27 @@ tcu::TestStatus AttachmentClearTestInstance::iterate()
                &clearValue                                                                                             // pClearValues
        };
 
-       vk.cmdBeginRenderPass(*cmdBuffer, &passBeginInfo, vk::VK_SUBPASS_CONTENTS_INLINE);
+       const vk::VkSubpassContents                     subpassContents         = m_cmdBufferType == CMD_BUFFER_SECONDARY
+                                                                                                                         ? vk::VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS
+                                                                                                                         : vk::VK_SUBPASS_CONTENTS_INLINE;
+       vk.cmdBeginRenderPass(*cmdBuffer, &passBeginInfo, subpassContents);
+
+       if (m_cmdBufferType == CMD_BUFFER_SECONDARY)
+       {
+               // Begin secondary command buffer
+               const vk::VkCommandBufferInheritanceInfo        bufferInheritanceInfo   =
+               {
+                       vk::VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO,          // sType
+                       DE_NULL,                                                                                                        // pNext
+                       *renderPass,                                                                                            // renderPass
+                       0u,                                                                                                                     // subpass
+                       *framebuffer,                                                                                           // framebuffer
+                       VK_FALSE,                                                                                                       // occlusionQueryEnable
+                       (vk::VkQueryControlFlags)0u,                                                            // queryFlags
+                       (vk::VkQueryPipelineStatisticFlags)0u,                                          // pipelineStatistics
+               };
+               beginSecondaryCommandBuffer(vk, *secondaryCmdBuffer, bufferInheritanceInfo);
+       }
 
        {
                const vk::VkClearAttachment             pAttachments            =
@@ -212,7 +241,13 @@ tcu::TestStatus AttachmentClearTestInstance::iterate()
                        0u,                                                                                                     // deUint32                             baseArrayLayer;
                        1u                                                                                                      // deUint32                             layerCount;
                };
-               vk.cmdClearAttachments(*cmdBuffer, 1u, &pAttachments, 1u, &clearRect);
+               vk.cmdClearAttachments(targetCmdBuffer, 1u, &pAttachments, 1u, &clearRect);
+       }
+
+       if (m_cmdBufferType == CMD_BUFFER_SECONDARY)
+       {
+               VK_CHECK(vk.endCommandBuffer(*secondaryCmdBuffer));
+               vk.cmdExecuteCommands(*cmdBuffer, 1u, &secondaryCmdBuffer.get());
        }
 
        vk.cmdEndRenderPass(*cmdBuffer);
@@ -265,9 +300,7 @@ tcu::TestStatus AttachmentClearTestInstance::iterate()
                return tcu::TestStatus::fail("Something went really wrong");
 }
 
-} // anonymous
-
-tcu::TestCaseGroup*    createAttachmentClearTests (tcu::TestContext& testCtx)
+tcu::TestCaseGroup*    createAttachmentClearTests (tcu::TestContext& testCtx, CmdBufferType cmdBufferType)
 {
        struct {
                const vk::VkClearValue          clearValue;
@@ -336,7 +369,7 @@ tcu::TestCaseGroup* createAttachmentClearTests (tcu::TestContext& testCtx)
        for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(testData); ++ndx)
        {
                const std::string name = "clear_" +  de::toString(ndx + 1);
-               clearStaticTests->addChild(new AttachmentClearTestCase(testCtx, name.c_str(), testData[ndx].clearValue, testData[ndx].data));
+               clearStaticTests->addChild(new AttachmentClearTestCase(testCtx, name.c_str(), testData[ndx].clearValue, testData[ndx].data, cmdBufferType));
        }
 
        /* Add a few randomized tests */
@@ -362,17 +395,26 @@ tcu::TestCaseGroup*       createAttachmentClearTests (tcu::TestContext& testCtx)
                        { refValue, refValue, refValue, refValue }
                };
 
-               clearRandomTests->addChild(new AttachmentClearTestCase(testCtx, name.c_str(), clearValue, data));
+               clearRandomTests->addChild(new AttachmentClearTestCase(testCtx, name.c_str(), clearValue, data, cmdBufferType));
        }
 
+       std::string groupName = getCmdBufferTypeStr(cmdBufferType);
+       std::string groupDesc = "Attachment Clear Op Tests with " + groupName + " command buffer";
+       de::MovePtr<tcu::TestCaseGroup> clearTests (new tcu::TestCaseGroup(testCtx, groupName.c_str(), groupDesc.c_str()));
+       clearTests->addChild(clearStaticTests.release());
+       clearTests->addChild(clearRandomTests.release());
+       return clearTests.release();
+}
+
+} // anonymous
+
+tcu::TestCaseGroup*    createAttachmentClearTests (tcu::TestContext& testCtx)
+{
        de::MovePtr<tcu::TestCaseGroup> clearTests (new tcu::TestCaseGroup(testCtx, "clear_op", "Attachment Clear Op Tests"));
-       {
-               de::MovePtr<tcu::TestCaseGroup> primaryTests (new tcu::TestCaseGroup(testCtx, "primary", "Attachment Clear Op Tests using primary command buffer"));
-               primaryTests->addChild(clearStaticTests.release());
-               primaryTests->addChild(clearRandomTests.release());
 
-               clearTests->addChild(primaryTests.release());
-       }
+       clearTests->addChild(createAttachmentClearTests(testCtx, CMD_BUFFER_PRIMARY));
+       clearTests->addChild(createAttachmentClearTests(testCtx, CMD_BUFFER_SECONDARY));
+
        return clearTests.release();
 }
 
index 1c41ffd..bb42723 100644 (file)
@@ -57,7 +57,8 @@ public:
                                                                        BlitImageTestInstance   (Context&                                               ctx,
                                                                                                                         const vk::VkClearColorValue&   clearColorValue,
                                                                                                                         const ValidationData&                  refData,
-                                                                                                                        const ImageValidator&                  validator);
+                                                                                                                        const ImageValidator&                  validator,
+                                                                                                                        const CmdBufferType                    cmdBufferType);
        virtual tcu::TestStatus                 iterate                                  (void);
 
 private:
@@ -65,6 +66,7 @@ private:
        const vk::VkClearColorValue&    m_clearColorValue;
        const ValidationData&                   m_refData;
        const ImageValidator&                   m_validator;
+       const CmdBufferType                             m_cmdBufferType;
 };
 
 class BlitImageTestCase : public TestCase
@@ -73,17 +75,19 @@ public:
                                                                BlitImageTestCase                       (tcu::TestContext&                      testCtx,
                                                                                                                         const std::string&                     name,
                                                                                                                         vk::VkClearColorValue          clearColorValue,
-                                                                                                                        ValidationData                         data)
+                                                                                                                        ValidationData                         data,
+                                                                                                                        CmdBufferType                          cmdBufferType)
                                                                        : TestCase                              (testCtx, name, "Clear and blit image.")
                                                                        , m_clearColorValue             (clearColorValue)
                                                                        , m_refData                             (data)
+                                                                       , m_cmdBufferType               (cmdBufferType)
                                                                {
                                                                }
 
        virtual                                         ~BlitImageTestCase                      (void) {}
        virtual TestInstance*           createInstance                          (Context& ctx) const
                                                                {
-                                                                       return new BlitImageTestInstance(ctx, m_clearColorValue, m_refData, m_validator);
+                                                                       return new BlitImageTestInstance(ctx, m_clearColorValue, m_refData, m_validator, m_cmdBufferType);
                                                                }
        virtual void                            initPrograms                            (vk::SourceCollections& programCollection) const
                                                                {
@@ -93,17 +97,20 @@ private:
        vk::VkClearColorValue           m_clearColorValue;
        ValidationData                          m_refData;
        ImageValidator                          m_validator;
+       CmdBufferType                           m_cmdBufferType;
 };
 
 BlitImageTestInstance::BlitImageTestInstance   (Context&                                               ctx,
                                                                                                 const vk::VkClearColorValue&   clearColorValue,
                                                                                                 const ValidationData&                  refData,
-                                                                                                const ImageValidator&                  validator)
+                                                                                                const ImageValidator&                  validator,
+                                                                                                                        const CmdBufferType                    cmdBufferType)
        : ProtectedTestInstance         (ctx)
        , m_imageFormat                         (vk::VK_FORMAT_R8G8B8A8_UNORM)
        , m_clearColorValue                     (clearColorValue)
        , m_refData                                     (refData)
        , m_validator                           (validator)
+       , m_cmdBufferType                       (cmdBufferType)
 {
 }
 
@@ -132,10 +139,29 @@ tcu::TestStatus BlitImageTestInstance::iterate()
 
        vk::Unique<vk::VkCommandPool>           cmdPool                         (makeCommandPool(vk, device, PROTECTION_ENABLED, queueFamilyIndex));
        vk::Unique<vk::VkCommandBuffer>         cmdBuffer                       (vk::allocateCommandBuffer(vk, device, *cmdPool, vk::VK_COMMAND_BUFFER_LEVEL_PRIMARY));
+       vk::Unique<vk::VkCommandBuffer>         secondaryCmdBuffer      (vk::allocateCommandBuffer(vk, device, *cmdPool, vk::VK_COMMAND_BUFFER_LEVEL_SECONDARY));
+       vk::VkCommandBuffer                                     targetCmdBuffer         = (m_cmdBufferType == CMD_BUFFER_SECONDARY) ? *secondaryCmdBuffer : *cmdBuffer;
 
        // Begin cmd buffer
        beginCommandBuffer(vk, *cmdBuffer);
 
+       if (m_cmdBufferType == CMD_BUFFER_SECONDARY)
+       {
+               // Begin secondary command buffer
+               const vk::VkCommandBufferInheritanceInfo        secCmdBufInheritInfo    =
+               {
+                       vk::VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO,
+                       DE_NULL,
+                       (vk::VkRenderPass)0u,                                                                           // renderPass
+                       0u,                                                                                                                     // subpass
+                       (vk::VkFramebuffer)0u,                                                                          // framebuffer
+                       VK_FALSE,                                                                                                       // occlusionQueryEnable
+                       (vk::VkQueryControlFlags)0u,                                                            // queryFlags
+                       (vk::VkQueryPipelineStatisticFlags)0u,                                          // pipelineStatistics
+               };
+               beginSecondaryCommandBuffer(vk, *secondaryCmdBuffer, secCmdBufInheritInfo);
+       }
+
        // Start image barrier for source image.
        {
                const vk::VkImageMemoryBarrier  startImgBarrier         =
@@ -158,7 +184,7 @@ tcu::TestStatus BlitImageTestInstance::iterate()
                        }
                };
 
-               vk.cmdPipelineBarrier(*cmdBuffer,
+               vk.cmdPipelineBarrier(targetCmdBuffer,
                                                          vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
                                                          vk::VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
                                                          (vk::VkDependencyFlags)0,
@@ -176,7 +202,7 @@ tcu::TestStatus BlitImageTestInstance::iterate()
                0u,                                                                                                             // uint32_t                                             baseArrayLayer
                1u,                                                                                                             // uint32_t                                             layerCount
        };
-       vk.cmdClearColorImage(*cmdBuffer, **colorImageSrc, vk::VK_IMAGE_LAYOUT_GENERAL, &m_clearColorValue, 1, &subresourceRange);
+       vk.cmdClearColorImage(targetCmdBuffer, **colorImageSrc, vk::VK_IMAGE_LAYOUT_GENERAL, &m_clearColorValue, 1, &subresourceRange);
 
        // Image barrier to change accessMask to transfer read bit for source image.
        {
@@ -200,7 +226,7 @@ tcu::TestStatus BlitImageTestInstance::iterate()
                        }
                };
 
-               vk.cmdPipelineBarrier(*cmdBuffer,
+               vk.cmdPipelineBarrier(targetCmdBuffer,
                                                          vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
                                                          vk::VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
                                                          (vk::VkDependencyFlags)0,
@@ -231,7 +257,7 @@ tcu::TestStatus BlitImageTestInstance::iterate()
                        }
                };
 
-               vk.cmdPipelineBarrier(*cmdBuffer,
+               vk.cmdPipelineBarrier(targetCmdBuffer,
                                                          vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
                                                          vk::VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
                                                          (vk::VkDependencyFlags)0,
@@ -263,7 +289,7 @@ tcu::TestStatus BlitImageTestInstance::iterate()
                        imageOffset,
                },                                                                                                              // VkOffset3D                                   dstOffsets[2];
         };
-       vk.cmdBlitImage(*cmdBuffer, **colorImageSrc, vk::VK_IMAGE_LAYOUT_GENERAL,
+       vk.cmdBlitImage(targetCmdBuffer, **colorImageSrc, vk::VK_IMAGE_LAYOUT_GENERAL,
                                        **colorImage, vk::VK_IMAGE_LAYOUT_GENERAL, 1u, &imageBlit, vk::VK_FILTER_NEAREST);
 
        {
@@ -286,7 +312,7 @@ tcu::TestStatus BlitImageTestInstance::iterate()
                                1u,                                                                                             // subresourceRange
                        }
                };
-               vk.cmdPipelineBarrier(*cmdBuffer,
+               vk.cmdPipelineBarrier(targetCmdBuffer,
                                                          vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
                                                          vk::VK_PIPELINE_STAGE_TRANSFER_BIT,
                                                          (vk::VkDependencyFlags)0,
@@ -295,6 +321,12 @@ tcu::TestStatus BlitImageTestInstance::iterate()
                                                          1, &endImgBarrier);
        }
 
+       if (m_cmdBufferType == CMD_BUFFER_SECONDARY)
+       {
+               VK_CHECK(vk.endCommandBuffer(*secondaryCmdBuffer));
+               vk.cmdExecuteCommands(*cmdBuffer, 1u, &secondaryCmdBuffer.get());
+       }
+
        VK_CHECK(vk.endCommandBuffer(*cmdBuffer));
 
        // Submit command buffer
@@ -312,9 +344,7 @@ tcu::TestStatus BlitImageTestInstance::iterate()
                return tcu::TestStatus::fail("Something went really wrong");
 }
 
-} // anonymous
-
-tcu::TestCaseGroup*    createBlitImageTests (tcu::TestContext& testCtx)
+tcu::TestCaseGroup*    createBlitImageTests (tcu::TestContext& testCtx, CmdBufferType cmdBufferType)
 {
        struct {
                const vk::VkClearColorValue             clearColorValue;
@@ -383,7 +413,7 @@ tcu::TestCaseGroup* createBlitImageTests (tcu::TestContext& testCtx)
        for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(testData); ++ndx)
        {
                const std::string name = "blit_" + de::toString(ndx + 1);
-               blitStaticTests->addChild(new BlitImageTestCase(testCtx, name.c_str(), testData[ndx].clearColorValue, testData[ndx].data));
+               blitStaticTests->addChild(new BlitImageTestCase(testCtx, name.c_str(), testData[ndx].clearColorValue, testData[ndx].data, cmdBufferType));
        }
 
        /* Add a few randomized tests */
@@ -408,18 +438,26 @@ tcu::TestCaseGroup*       createBlitImageTests (tcu::TestContext& testCtx)
                          tcu::Vec4(rnd.getFloat(0.0f, 1.0f), rnd.getFloat(0.0f, 1.0f), rnd.getFloat(0.0f, 1.0f), rnd.getFloat(0.0f, 1.0f)) },
                        { refValue, refValue, refValue, refValue }
                };
-
-               blitRandomTests->addChild(new BlitImageTestCase(testCtx, name.c_str(), clearValue.color, data));
+               blitRandomTests->addChild(new BlitImageTestCase(testCtx, name.c_str(), clearValue.color, data, cmdBufferType));
        }
 
+       std::string groupName = getCmdBufferTypeStr(cmdBufferType);
+       std::string groupDesc = "Blit Image Tests with " + groupName + " command buffer";
+       de::MovePtr<tcu::TestCaseGroup> blitTests (new tcu::TestCaseGroup(testCtx, groupName.c_str(), groupDesc.c_str()));
+       blitTests->addChild(blitStaticTests.release());
+       blitTests->addChild(blitRandomTests.release());
+       return blitTests.release();
+}
+
+} // anonymous
+
+tcu::TestCaseGroup*    createBlitImageTests (tcu::TestContext& testCtx)
+{
        de::MovePtr<tcu::TestCaseGroup> blitTests (new tcu::TestCaseGroup(testCtx, "blit", "Blit Image Tests"));
-       {
-               de::MovePtr<tcu::TestCaseGroup> primaryTests (new tcu::TestCaseGroup(testCtx, "primary", "Blit Image Tests using primary command buffer"));
-               primaryTests->addChild(blitStaticTests.release());
-               primaryTests->addChild(blitRandomTests.release());
 
-               blitTests->addChild(primaryTests.release());
-       }
+       blitTests->addChild(createBlitImageTests(testCtx, CMD_BUFFER_PRIMARY));
+       blitTests->addChild(createBlitImageTests(testCtx, CMD_BUFFER_SECONDARY));
+
        return blitTests.release();
 }
 
index cb5b0aa..60625d2 100644 (file)
@@ -57,7 +57,8 @@ public:
                                                                                ClearColorImageTestInstance     (Context&                                               ctx,
                                                                                                                                         const vk::VkClearColorValue&   clearColorValue,
                                                                                                                                         const ValidationData&                  refData,
-                                                                                                                                        const ImageValidator&                  validator);
+                                                                                                                                        const ImageValidator&                  validator,
+                                                                                                                                        const CmdBufferType                    cmdBufferType);
        virtual tcu::TestStatus                         iterate                                         (void);
 
 private:
@@ -65,6 +66,7 @@ private:
        const vk::VkClearColorValue&            m_clearColorValue;
        const ValidationData&                           m_refData;
        const ImageValidator&                           m_validator;
+       const CmdBufferType                                     m_cmdBufferType;
 };
 
 class ClearColorImageTestCase : public TestCase
@@ -73,17 +75,19 @@ public:
                                                                ClearColorImageTestCase         (tcu::TestContext&                      testCtx,
                                                                                                                         const std::string&                     name,
                                                                                                                         vk::VkClearColorValue          clearColorValue,
-                                                                                                                        ValidationData                         data)
+                                                                                                                        ValidationData                         data,
+                                                                                                                        CmdBufferType                          cmdBufferType)
                                                                        : TestCase                              (testCtx, name, "Clear color image.")
                                                                        , m_clearColorValue             (clearColorValue)
                                                                        , m_refData                             (data)
+                                                                       , m_cmdBufferType               (cmdBufferType)
                                                                {
                                                                }
 
        virtual                                         ~ClearColorImageTestCase        (void) {}
        virtual TestInstance*           createInstance                          (Context& ctx) const
                                                                {
-                                                                       return new ClearColorImageTestInstance(ctx, m_clearColorValue, m_refData, m_validator);
+                                                                       return new ClearColorImageTestInstance(ctx, m_clearColorValue, m_refData, m_validator, m_cmdBufferType);
                                                                }
        virtual void                            initPrograms                            (vk::SourceCollections& programCollection) const
                                                                {
@@ -93,17 +97,20 @@ private:
        vk::VkClearColorValue           m_clearColorValue;
        ValidationData                          m_refData;
        ImageValidator                          m_validator;
+       CmdBufferType                           m_cmdBufferType;
 };
 
 ClearColorImageTestInstance::ClearColorImageTestInstance       (Context&                                               ctx,
                                                                                                                         const vk::VkClearColorValue&   clearColorValue,
                                                                                                                         const ValidationData&                  refData,
-                                                                                                                        const ImageValidator&                  validator)
+                                                                                                                        const ImageValidator&                  validator,
+                                                                                                                        const CmdBufferType                    cmdBufferType)
        : ProtectedTestInstance         (ctx)
        , m_imageFormat                         (vk::VK_FORMAT_R8G8B8A8_UNORM)
        , m_clearColorValue                     (clearColorValue)
        , m_refData                                     (refData)
        , m_validator                           (validator)
+       , m_cmdBufferType                       (cmdBufferType)
 {
 }
 
@@ -125,6 +132,8 @@ tcu::TestStatus ClearColorImageTestInstance::iterate()
 
        vk::Unique<vk::VkCommandPool>           cmdPool                         (makeCommandPool(vk, device, PROTECTION_ENABLED, queueFamilyIndex));
        vk::Unique<vk::VkCommandBuffer>         cmdBuffer                       (vk::allocateCommandBuffer(vk, device, *cmdPool, vk::VK_COMMAND_BUFFER_LEVEL_PRIMARY));
+       vk::Unique<vk::VkCommandBuffer>         secondaryCmdBuffer      (vk::allocateCommandBuffer(vk, device, *cmdPool, vk::VK_COMMAND_BUFFER_LEVEL_SECONDARY));
+       vk::VkCommandBuffer                                     targetCmdBuffer         = (m_cmdBufferType == CMD_BUFFER_SECONDARY) ? *secondaryCmdBuffer : *cmdBuffer;
 
        const vk::VkImageSubresourceRange subresourceRange =
        {
@@ -137,6 +146,23 @@ tcu::TestStatus ClearColorImageTestInstance::iterate()
        // Begin cmd buffer
        beginCommandBuffer(vk, *cmdBuffer);
 
+       if (m_cmdBufferType == CMD_BUFFER_SECONDARY)
+       {
+               // Begin secondary command buffer
+               const vk::VkCommandBufferInheritanceInfo        bufferInheritanceInfo   =
+               {
+                       vk::VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO,          // sType
+                       DE_NULL,                                                                                                        // pNext
+                       DE_NULL,                                                                                                        // renderPass
+                       0u,                                                                                                                     // subpass
+                       DE_NULL,                                                                                                        // framebuffer
+                       VK_FALSE,                                                                                                       // occlusionQueryEnable
+                       (vk::VkQueryControlFlags)0u,                                                            // queryFlags
+                       (vk::VkQueryPipelineStatisticFlags)0u,                                          // pipelineStatistics
+               };
+               beginSecondaryCommandBuffer(vk, *secondaryCmdBuffer, bufferInheritanceInfo);
+       }
+
        // Start image barrier
        {
                const vk::VkImageMemoryBarrier  initializeBarrier       =
@@ -153,7 +179,7 @@ tcu::TestStatus ClearColorImageTestInstance::iterate()
                        subresourceRange,                                                                       // subresourceRange
                };
 
-               vk.cmdPipelineBarrier(*cmdBuffer,
+               vk.cmdPipelineBarrier(targetCmdBuffer,
                                                          vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
                                                          vk::VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
                                                          (vk::VkDependencyFlags)0,
@@ -163,7 +189,7 @@ tcu::TestStatus ClearColorImageTestInstance::iterate()
        }
 
        // Image clear
-       vk.cmdClearColorImage(*cmdBuffer, **colorImage, vk::VK_IMAGE_LAYOUT_GENERAL, &m_clearColorValue, 1, &subresourceRange);
+       vk.cmdClearColorImage(targetCmdBuffer, **colorImage, vk::VK_IMAGE_LAYOUT_GENERAL, &m_clearColorValue, 1, &subresourceRange);
 
        {
                const vk::VkImageMemoryBarrier  initializeBarrier       =
@@ -179,7 +205,7 @@ tcu::TestStatus ClearColorImageTestInstance::iterate()
                        **colorImage,                                                                           // image
                        subresourceRange                                                                        // subresourceRange
                };
-               vk.cmdPipelineBarrier(*cmdBuffer,
+               vk.cmdPipelineBarrier(targetCmdBuffer,
                                                          vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
                                                          vk::VK_PIPELINE_STAGE_TRANSFER_BIT,
                                                          (vk::VkDependencyFlags)0,
@@ -188,6 +214,12 @@ tcu::TestStatus ClearColorImageTestInstance::iterate()
                                                          1, &initializeBarrier);
        }
 
+       if (m_cmdBufferType == CMD_BUFFER_SECONDARY)
+       {
+               VK_CHECK(vk.endCommandBuffer(*secondaryCmdBuffer));
+               vk.cmdExecuteCommands(*cmdBuffer, 1u, &secondaryCmdBuffer.get());
+       }
+
        VK_CHECK(vk.endCommandBuffer(*cmdBuffer));
 
        // Submit command buffer
@@ -205,9 +237,7 @@ tcu::TestStatus ClearColorImageTestInstance::iterate()
                return tcu::TestStatus::fail("Something went really wrong");
 }
 
-} // anonymous
-
-tcu::TestCaseGroup*    createClearColorImageTests (tcu::TestContext& testCtx)
+tcu::TestCaseGroup*    createClearColorImageTests (tcu::TestContext& testCtx, CmdBufferType cmdBufferType)
 {
        struct {
                vk::VkClearColorValue   clearColorValue;
@@ -276,7 +306,7 @@ tcu::TestCaseGroup* createClearColorImageTests (tcu::TestContext& testCtx)
        for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(testData); ++ndx)
        {
                const std::string name = "clear_" + de::toString(ndx + 1);
-               clearStaticTests->addChild(new ClearColorImageTestCase(testCtx, name.c_str(), testData[ndx].clearColorValue, testData[ndx].data));
+               clearStaticTests->addChild(new ClearColorImageTestCase(testCtx, name.c_str(), testData[ndx].clearColorValue, testData[ndx].data, cmdBufferType));
        }
 
        /* Add a few randomized tests */
@@ -301,18 +331,26 @@ tcu::TestCaseGroup*       createClearColorImageTests (tcu::TestContext& testCtx)
                          tcu::Vec4(rnd.getFloat(0.0f, 1.0f), rnd.getFloat(0.0f, 1.0f), rnd.getFloat(0.0f, 1.0f), rnd.getFloat(0.0f, 1.0f)) },
                        { refValue, refValue, refValue, refValue }
                };
-
-               clearRandomTests->addChild(new ClearColorImageTestCase(testCtx, name.c_str(), clearValue.color, data));
+               clearRandomTests->addChild(new ClearColorImageTestCase(testCtx, name.c_str(), clearValue.color, data, cmdBufferType));
        }
 
+       std::string groupName = getCmdBufferTypeStr(cmdBufferType);
+       std::string groupDesc = "Clear Color Image Tests with " + groupName + " command buffer";
+       de::MovePtr<tcu::TestCaseGroup> clearTests (new tcu::TestCaseGroup(testCtx, groupName.c_str(), groupDesc.c_str()));
+       clearTests->addChild(clearStaticTests.release());
+       clearTests->addChild(clearRandomTests.release());
+       return clearTests.release();
+}
+
+} // anonymous
+
+tcu::TestCaseGroup*    createClearColorImageTests (tcu::TestContext& testCtx)
+{
        de::MovePtr<tcu::TestCaseGroup> clearTests (new tcu::TestCaseGroup(testCtx, "clear_color", "Clear Color Image Tests"));
-       {
-               de::MovePtr<tcu::TestCaseGroup> primaryTests (new tcu::TestCaseGroup(testCtx, "primary", "Clear Color Image Tests using primary command buffer"));
-               primaryTests->addChild(clearStaticTests.release());
-               primaryTests->addChild(clearRandomTests.release());
 
-               clearTests->addChild(primaryTests.release());
-       }
+       clearTests->addChild(createClearColorImageTests(testCtx, CMD_BUFFER_PRIMARY));
+       clearTests->addChild(createClearColorImageTests(testCtx, CMD_BUFFER_SECONDARY));
+
        return clearTests.release();
 }
 
index 0c9d745..bdd0ef2 100644 (file)
@@ -58,7 +58,8 @@ public:
                                                                        CopyBufferToImageTestInstance   (Context&                                       ctx,
                                                                                                                                         const deUint32                         fillValue,
                                                                                                                                         const ValidationData&          refData,
-                                                                                                                                        const ImageValidator&          validator);
+                                                                                                                                        const ImageValidator&          validator,
+                                                                                                                                        const CmdBufferType            cmdBufferType);
 virtual tcu::TestStatus                                iterate                                                  (void);
 
 private:
@@ -66,6 +67,7 @@ private:
        const deUint32                                  m_fillValue;
        const ValidationData&                   m_refData;
        const ImageValidator&                   m_validator;
+       const CmdBufferType                             m_cmdBufferType;
 };
 
 class CopyBufferToImageTestCase : public TestCase
@@ -74,17 +76,19 @@ public:
                                                                CopyBufferToImageTestCase       (tcu::TestContext&                      testCtx,
                                                                                                                         const std::string&                     name,
                                                                                                                         deUint32                                       fillValue,
-                                                                                                                        ValidationData                         data)
+                                                                                                                        ValidationData                         data,
+                                                                                                                        CmdBufferType                          cmdBufferType)
                                                                        : TestCase                              (testCtx, name, "Copy buffer to image.")
                                                                        , m_fillValue                   (fillValue)
                                                                        , m_refData                             (data)
+                                                                       , m_cmdBufferType               (cmdBufferType)
                                                                {
                                                                }
 
        virtual                                         ~CopyBufferToImageTestCase      (void) {}
        virtual TestInstance*           createInstance                          (Context& ctx) const
                                                                {
-                                                                       return new CopyBufferToImageTestInstance(ctx, m_fillValue, m_refData, m_validator);
+                                                                       return new CopyBufferToImageTestInstance(ctx, m_fillValue, m_refData, m_validator, m_cmdBufferType);
                                                                }
        virtual void                            initPrograms                            (vk::SourceCollections& programCollection) const
                                                                {
@@ -94,17 +98,20 @@ private:
        deUint32                                        m_fillValue;
        ValidationData                          m_refData;
        ImageValidator                          m_validator;
+       CmdBufferType                           m_cmdBufferType;
 };
 
 CopyBufferToImageTestInstance::CopyBufferToImageTestInstance   (Context&                                       ctx,
                                                                                                                                 const deUint32                         fillValue,
                                                                                                                                 const ValidationData&          refData,
-                                                                                                                                const ImageValidator&          validator)
+                                                                                                                                const ImageValidator&          validator,
+                                                                                                                                const CmdBufferType            cmdBufferType)
        : ProtectedTestInstance         (ctx)
        , m_imageFormat                         (vk::VK_FORMAT_R32G32B32A32_UINT)
        , m_fillValue                           (fillValue)
        , m_refData                                     (refData)
        , m_validator                           (validator)
+       , m_cmdBufferType                       (cmdBufferType)
 {
 }
 
@@ -132,10 +139,29 @@ tcu::TestStatus CopyBufferToImageTestInstance::iterate()
 
        vk::Unique<vk::VkCommandPool>           cmdPool                         (makeCommandPool(vk, device, PROTECTION_ENABLED, queueFamilyIndex));
        vk::Unique<vk::VkCommandBuffer>         cmdBuffer                       (vk::allocateCommandBuffer(vk, device, *cmdPool, vk::VK_COMMAND_BUFFER_LEVEL_PRIMARY));
+       vk::Unique<vk::VkCommandBuffer>         secondaryCmdBuffer      (vk::allocateCommandBuffer(vk, device, *cmdPool, vk::VK_COMMAND_BUFFER_LEVEL_SECONDARY));
+       vk::VkCommandBuffer                                     targetCmdBuffer         = (m_cmdBufferType == CMD_BUFFER_SECONDARY) ? *secondaryCmdBuffer : *cmdBuffer;
 
        // Begin cmd buffer
        beginCommandBuffer(vk, *cmdBuffer);
 
+       if (m_cmdBufferType == CMD_BUFFER_SECONDARY)
+       {
+               // Begin secondary command buffer
+               const vk::VkCommandBufferInheritanceInfo        bufferInheritanceInfo   =
+               {
+                       vk::VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO,          // sType
+                       DE_NULL,                                                                                                        // pNext
+                       DE_NULL,                                                                                                        // renderPass
+                       0u,                                                                                                                     // subpass
+                       DE_NULL,                                                                                                        // framebuffer
+                       VK_FALSE,                                                                                                       // occlusionQueryEnable
+                       (vk::VkQueryControlFlags)0u,                                                            // queryFlags
+                       (vk::VkQueryPipelineStatisticFlags)0u,                                          // pipelineStatistics
+               };
+               beginSecondaryCommandBuffer(vk, *secondaryCmdBuffer, bufferInheritanceInfo);
+       }
+
        // Start src buffer barrier
        {
                const vk::VkBufferMemoryBarrier startBufferBarrier =
@@ -150,7 +176,7 @@ tcu::TestStatus CopyBufferToImageTestInstance::iterate()
                        0u,                                                                                             // VkDeviceSize                 offset
                        VK_WHOLE_SIZE,                                                                  // VkDeviceSize                 size
                };
-               vk.cmdPipelineBarrier(*cmdBuffer,
+               vk.cmdPipelineBarrier(targetCmdBuffer,
                                                          vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
                                                          vk::VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
                                                          (vk::VkDependencyFlags) 0,
@@ -158,7 +184,7 @@ tcu::TestStatus CopyBufferToImageTestInstance::iterate()
                                                          1, &startBufferBarrier,
                                                          0, (const vk::VkImageMemoryBarrier *) DE_NULL);
        }
-       vk.cmdFillBuffer(*cmdBuffer, **srcBuffer, 0u, VK_WHOLE_SIZE, m_fillValue);
+       vk.cmdFillBuffer(targetCmdBuffer, **srcBuffer, 0u, VK_WHOLE_SIZE, m_fillValue);
 
        // Barrier to change accessMask to transfer read bit for source buffer
        {
@@ -174,7 +200,7 @@ tcu::TestStatus CopyBufferToImageTestInstance::iterate()
                        0u,                                                                                                     // VkDeviceSize                 offset
                        VK_WHOLE_SIZE,                                                                          // VkDeviceSize                 size
                };
-               vk.cmdPipelineBarrier(*cmdBuffer,
+               vk.cmdPipelineBarrier(targetCmdBuffer,
                                                          vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
                                                          vk::VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
                                                          (vk::VkDependencyFlags)0,
@@ -205,7 +231,7 @@ tcu::TestStatus CopyBufferToImageTestInstance::iterate()
                        }
                };
 
-               vk.cmdPipelineBarrier(*cmdBuffer,
+               vk.cmdPipelineBarrier(targetCmdBuffer,
                                                          vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
                                                          vk::VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
                                                          (vk::VkDependencyFlags)0,
@@ -233,7 +259,7 @@ tcu::TestStatus CopyBufferToImageTestInstance::iterate()
                nullOffset,                                             // VkOffset3D                           imageOffset
                imageExtent,                                    // VkExtent3D                           imageExtent
        };
-       vk.cmdCopyBufferToImage(*cmdBuffer, **srcBuffer, **colorImage, vk::VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1u, &copyRegion);
+       vk.cmdCopyBufferToImage(targetCmdBuffer, **srcBuffer, **colorImage, vk::VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1u, &copyRegion);
 
        {
                const vk::VkImageMemoryBarrier  endImgBarrier           =
@@ -255,7 +281,7 @@ tcu::TestStatus CopyBufferToImageTestInstance::iterate()
                                1u,                                                                                             // uint32_t                             subresourceRange
                        }
                };
-               vk.cmdPipelineBarrier(*cmdBuffer,
+               vk.cmdPipelineBarrier(targetCmdBuffer,
                                                          vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
                                                          vk::VK_PIPELINE_STAGE_TRANSFER_BIT,
                                                          (vk::VkDependencyFlags)0,
@@ -264,6 +290,12 @@ tcu::TestStatus CopyBufferToImageTestInstance::iterate()
                                                          1, &endImgBarrier);
        }
 
+       if (m_cmdBufferType == CMD_BUFFER_SECONDARY)
+       {
+               VK_CHECK(vk.endCommandBuffer(*secondaryCmdBuffer));
+               vk.cmdExecuteCommands(*cmdBuffer, 1u, &secondaryCmdBuffer.get());
+       }
+
        VK_CHECK(vk.endCommandBuffer(*cmdBuffer));
 
        // Submit command buffer
@@ -281,9 +313,7 @@ tcu::TestStatus CopyBufferToImageTestInstance::iterate()
                return tcu::TestStatus::fail("Something went really wrong");
 }
 
-} // anonymous
-
-tcu::TestCaseGroup*    createCopyBufferToImageTests (tcu::TestContext& testCtx)
+tcu::TestCaseGroup*    createCopyBufferToImageTests (tcu::TestContext& testCtx, CmdBufferType cmdBufferType)
 {
        struct {
                const union {
@@ -347,7 +377,7 @@ tcu::TestCaseGroup* createCopyBufferToImageTests (tcu::TestContext& testCtx)
        for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(testData); ++ndx)
        {
                const std::string name = "copy_" + de::toString(ndx + 1);
-               copyStaticTests->addChild(new CopyBufferToImageTestCase(testCtx, name.c_str(), testData[ndx].fillValue.uint, testData[ndx].data));
+               copyStaticTests->addChild(new CopyBufferToImageTestCase(testCtx, name.c_str(), testData[ndx].fillValue.uint, testData[ndx].data, cmdBufferType));
        }
 
        /* Add a few randomized tests */
@@ -372,20 +402,28 @@ tcu::TestCaseGroup*       createCopyBufferToImageTests (tcu::TestContext& testCtx)
                          tcu::Vec4(rnd.getFloat(0.0f, 1.0f), rnd.getFloat(0.0f, 1.0f), rnd.getFloat(0.0f, 1.0f), rnd.getFloat(0.0f, 1.0f)) },
                        { refValue, refValue, refValue, refValue }
                };
-
-               copyRandomTests->addChild(new CopyBufferToImageTestCase(testCtx, name.c_str(), fillValue.uint, data));
+               copyRandomTests->addChild(new CopyBufferToImageTestCase(testCtx, name.c_str(), fillValue.uint, data, cmdBufferType));
        }
 
-       de::MovePtr<tcu::TestCaseGroup> copyTests (new tcu::TestCaseGroup(testCtx, "copy_buffer_to_image", "Copy Buffer To Image Tests"));
-       {
-               de::MovePtr<tcu::TestCaseGroup> primaryTests (new tcu::TestCaseGroup(testCtx, "primary", "Copy Buffer To Image Tests using primary command buffer"));
-               primaryTests->addChild(copyStaticTests.release());
-               primaryTests->addChild(copyRandomTests.release());
-
-               copyTests->addChild(primaryTests.release());
-       }
+       std::string groupName = getCmdBufferTypeStr(cmdBufferType);
+       std::string groupDesc = "Copy Buffer To Image Tests with " + groupName + " command buffer";
+       de::MovePtr<tcu::TestCaseGroup> copyTests (new tcu::TestCaseGroup(testCtx, groupName.c_str(), groupDesc.c_str()));
+       copyTests->addChild(copyStaticTests.release());
+       copyTests->addChild(copyRandomTests.release());
        return copyTests.release();
 }
 
+} // anonymous
+
+tcu::TestCaseGroup*    createCopyBufferToImageTests (tcu::TestContext& testCtx)
+{
+       de::MovePtr<tcu::TestCaseGroup> clearTests (new tcu::TestCaseGroup(testCtx, "copy_buffer_to_image", "Copy Buffer To Image Tests"));
+
+       clearTests->addChild(createCopyBufferToImageTests(testCtx, CMD_BUFFER_PRIMARY));
+       clearTests->addChild(createCopyBufferToImageTests(testCtx, CMD_BUFFER_SECONDARY));
+
+       return clearTests.release();
+}
+
 } // ProtectedMem
 } // vkt
index 6e83172..7dfde4b 100644 (file)
@@ -57,7 +57,8 @@ public:
                                                                        CopyImageTestInstance   (Context&                                               ctx,
                                                                                                                         const vk::VkClearColorValue&   clearColorValue,
                                                                                                                         const ValidationData&                  refData,
-                                                                                                                        const ImageValidator&                  validator);
+                                                                                                                        const ImageValidator&                  validator,
+                                                                                                                        const CmdBufferType                    cmdBufferType);
 virtual tcu::TestStatus                                iterate                                  (void);
 
 private:
@@ -65,6 +66,7 @@ private:
        const vk::VkClearColorValue&    m_clearColorValue;
        const ValidationData&                   m_refData;
        const ImageValidator&                   m_validator;
+       const CmdBufferType                             m_cmdBufferType;
 };
 
 class CopyImageTestCase : public TestCase
@@ -73,17 +75,19 @@ public:
                                                                CopyImageTestCase               (tcu::TestContext&                      testCtx,
                                                                                                                 const std::string&                     name,
                                                                                                                 vk::VkClearColorValue          clearColorValue,
-                                                                                                                ValidationData                         data)
+                                                                                                                ValidationData                         data,
+                                                                                                                CmdBufferType                          cmdBufferType)
                                                                        : TestCase                      (testCtx, name, "Clear and copy image.")
                                                                        , m_clearColorValue     (clearColorValue)
                                                                        , m_refData                     (data)
+                                                                       , m_cmdBufferType       (cmdBufferType)
                                                                {
                                                                }
 
        virtual                                         ~CopyImageTestCase              (void) {}
        virtual TestInstance*           createInstance                  (Context& ctx) const
                                                                {
-                                                                       return new CopyImageTestInstance(ctx, m_clearColorValue, m_refData, m_validator);
+                                                                       return new CopyImageTestInstance(ctx, m_clearColorValue, m_refData, m_validator, m_cmdBufferType);
                                                                }
        virtual void                            initPrograms                    (vk::SourceCollections& programCollection) const
                                                                {
@@ -93,17 +97,20 @@ private:
        vk::VkClearColorValue           m_clearColorValue;
        ValidationData                          m_refData;
        ImageValidator                          m_validator;
+       CmdBufferType                           m_cmdBufferType;
 };
 
 CopyImageTestInstance::CopyImageTestInstance   (Context&                                               ctx,
                                                                                                 const vk::VkClearColorValue&   clearColorValue,
                                                                                                 const ValidationData&                  refData,
-                                                                                                const ImageValidator&                  validator)
+                                                                                                const ImageValidator&                  validator,
+                                                                                                const CmdBufferType                    cmdBufferType)
        : ProtectedTestInstance         (ctx)
        , m_imageFormat                         (vk::VK_FORMAT_R8G8B8A8_UNORM)
        , m_clearColorValue                     (clearColorValue)
        , m_refData                                     (refData)
        , m_validator                           (validator)
+       , m_cmdBufferType                       (cmdBufferType)
 {
 }
 
@@ -132,10 +139,29 @@ tcu::TestStatus CopyImageTestInstance::iterate()
 
        vk::Unique<vk::VkCommandPool>           cmdPool                         (makeCommandPool(vk, device, PROTECTION_ENABLED, queueFamilyIndex));
        vk::Unique<vk::VkCommandBuffer>         cmdBuffer                       (vk::allocateCommandBuffer(vk, device, *cmdPool, vk::VK_COMMAND_BUFFER_LEVEL_PRIMARY));
+       vk::Unique<vk::VkCommandBuffer>         secondaryCmdBuffer      (vk::allocateCommandBuffer(vk, device, *cmdPool, vk::VK_COMMAND_BUFFER_LEVEL_SECONDARY));
+       vk::VkCommandBuffer                                     targetCmdBuffer         = (m_cmdBufferType == CMD_BUFFER_SECONDARY) ? *secondaryCmdBuffer : *cmdBuffer;
 
        // Begin cmd buffer
        beginCommandBuffer(vk, *cmdBuffer);
 
+       if (m_cmdBufferType == CMD_BUFFER_SECONDARY)
+       {
+               // Begin secondary command buffer
+               const vk::VkCommandBufferInheritanceInfo        secCmdBufInheritInfo    =
+               {
+                       vk::VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO,
+                       DE_NULL,
+                       (vk::VkRenderPass)0u,                                                                           // renderPass
+                       0u,                                                                                                                     // subpass
+                       (vk::VkFramebuffer)0u,                                                                          // framebuffer
+                       VK_FALSE,                                                                                                       // occlusionQueryEnable
+                       (vk::VkQueryControlFlags)0u,                                                            // queryFlags
+                       (vk::VkQueryPipelineStatisticFlags)0u,                                          // pipelineStatistics
+               };
+               beginSecondaryCommandBuffer(vk, *secondaryCmdBuffer, secCmdBufInheritInfo);
+       }
+
        // Start image barrier for source image.
        {
                const vk::VkImageMemoryBarrier  startImgBarrier         =
@@ -158,7 +184,7 @@ tcu::TestStatus CopyImageTestInstance::iterate()
                        }
                };
 
-               vk.cmdPipelineBarrier(*cmdBuffer,
+               vk.cmdPipelineBarrier(targetCmdBuffer,
                                                          vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
                                                          vk::VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
                                                          (vk::VkDependencyFlags)0,
@@ -176,7 +202,7 @@ tcu::TestStatus CopyImageTestInstance::iterate()
                0u,                                                             // uint32_t                             baseArrayLayer
                1u,                                                             // uint32_t                             layerCount
        };
-       vk.cmdClearColorImage(*cmdBuffer, **colorImageSrc, vk::VK_IMAGE_LAYOUT_GENERAL, &m_clearColorValue, 1, &subresourceRange);
+       vk.cmdClearColorImage(targetCmdBuffer, **colorImageSrc, vk::VK_IMAGE_LAYOUT_GENERAL, &m_clearColorValue, 1, &subresourceRange);
 
        // Image barrier to change accessMask to transfer read bit for source image.
        {
@@ -200,7 +226,7 @@ tcu::TestStatus CopyImageTestInstance::iterate()
                        }
                };
 
-               vk.cmdPipelineBarrier(*cmdBuffer,
+               vk.cmdPipelineBarrier(targetCmdBuffer,
                                                          vk::VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT,
                                                          vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
                                                          (vk::VkDependencyFlags)0,
@@ -231,7 +257,7 @@ tcu::TestStatus CopyImageTestInstance::iterate()
                        }
                };
 
-               vk.cmdPipelineBarrier(*cmdBuffer,
+               vk.cmdPipelineBarrier(targetCmdBuffer,
                                                          vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
                                                          vk::VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
                                                          (vk::VkDependencyFlags)0,
@@ -259,7 +285,7 @@ tcu::TestStatus CopyImageTestInstance::iterate()
                imageExtent,                                                    // VkExtent3D                           extent;
 
        };
-       vk.cmdCopyImage(*cmdBuffer, **colorImageSrc, vk::VK_IMAGE_LAYOUT_GENERAL,
+       vk.cmdCopyImage(targetCmdBuffer, **colorImageSrc, vk::VK_IMAGE_LAYOUT_GENERAL,
                                        **colorImage, vk::VK_IMAGE_LAYOUT_GENERAL, 1u, &copyImageRegion);
 
        {
@@ -282,7 +308,7 @@ tcu::TestStatus CopyImageTestInstance::iterate()
                                1u,                                                                                             // subresourceRange
                        }
                };
-               vk.cmdPipelineBarrier(*cmdBuffer,
+               vk.cmdPipelineBarrier(targetCmdBuffer,
                                                          vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
                                                          vk::VK_PIPELINE_STAGE_TRANSFER_BIT,
                                                          (vk::VkDependencyFlags)0,
@@ -291,6 +317,12 @@ tcu::TestStatus CopyImageTestInstance::iterate()
                                                          1, &endImgBarrier);
        }
 
+       if (m_cmdBufferType == CMD_BUFFER_SECONDARY)
+       {
+               VK_CHECK(vk.endCommandBuffer(*secondaryCmdBuffer));
+               vk.cmdExecuteCommands(*cmdBuffer, 1u, &secondaryCmdBuffer.get());
+       }
+
        VK_CHECK(vk.endCommandBuffer(*cmdBuffer));
 
        // Submit command buffer
@@ -308,9 +340,7 @@ tcu::TestStatus CopyImageTestInstance::iterate()
                return tcu::TestStatus::fail("Something went really wrong");
 }
 
-} // anonymous
-
-tcu::TestCaseGroup*    createCopyImageTests (tcu::TestContext& testCtx)
+tcu::TestCaseGroup*    createCopyImageTests (tcu::TestContext& testCtx, CmdBufferType cmdBufferType)
 {
        struct {
                const vk::VkClearColorValue             clearColorValue;
@@ -379,7 +409,7 @@ tcu::TestCaseGroup* createCopyImageTests (tcu::TestContext& testCtx)
        for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(testData); ++ndx)
        {
                const std::string name = "copy_" + de::toString(ndx + 1);
-               copyStaticTests->addChild(new CopyImageTestCase(testCtx, name.c_str(), testData[ndx].clearColorValue, testData[ndx].data));
+               copyStaticTests->addChild(new CopyImageTestCase(testCtx, name.c_str(), testData[ndx].clearColorValue, testData[ndx].data, cmdBufferType));
        }
 
        /* Add a few randomized tests */
@@ -404,18 +434,26 @@ tcu::TestCaseGroup*       createCopyImageTests (tcu::TestContext& testCtx)
                          tcu::Vec4(rnd.getFloat(0.0f, 1.0f), rnd.getFloat(0.0f, 1.0f), rnd.getFloat(0.0f, 1.0f), rnd.getFloat(0.0f, 1.0f)) },
                        { refValue, refValue, refValue, refValue }
                };
-
-               copyRandomTests->addChild(new CopyImageTestCase(testCtx, name.c_str(), clearValue.color, data));
+               copyRandomTests->addChild(new CopyImageTestCase(testCtx, name.c_str(), clearValue.color, data, cmdBufferType));
        }
 
+       std::string groupName = getCmdBufferTypeStr(cmdBufferType);
+       std::string groupDesc = "Copy Image Tests with " + groupName + " command buffer";
+       de::MovePtr<tcu::TestCaseGroup> copyTests (new tcu::TestCaseGroup(testCtx, groupName.c_str(), groupDesc.c_str()));
+       copyTests->addChild(copyStaticTests.release());
+       copyTests->addChild(copyRandomTests.release());
+       return copyTests.release();
+}
+
+} // anonymous
+
+tcu::TestCaseGroup*    createCopyImageTests (tcu::TestContext& testCtx)
+{
        de::MovePtr<tcu::TestCaseGroup> copyTests (new tcu::TestCaseGroup(testCtx, "copy", "Copy Image Tests"));
-       {
-               de::MovePtr<tcu::TestCaseGroup> primaryTests (new tcu::TestCaseGroup(testCtx, "primary", "Copy Image Tests using primary command buffer"));
-               primaryTests->addChild(copyStaticTests.release());
-               primaryTests->addChild(copyRandomTests.release());
 
-               copyTests->addChild(primaryTests.release());
-       }
+       copyTests->addChild(createCopyImageTests(testCtx, CMD_BUFFER_PRIMARY));
+       copyTests->addChild(createCopyImageTests(testCtx, CMD_BUFFER_SECONDARY));
+
        return copyTests.release();
 }
 
index 8fc75c2..90b04df 100644 (file)
@@ -60,13 +60,15 @@ class CopyImageToBufferTestInstance : public ProtectedTestInstance
 public:
                                                                        CopyImageToBufferTestInstance   (Context&                                               ctx,
                                                                                                                                         const vk::VkClearColorValue    fillValue,
-                                                                                                                                        const BufferValidator<T>&              validator);
+                                                                                                                                        const BufferValidator<T>&              validator,
+                                                                                                                                        const CmdBufferType                    cmdBufferType);
        virtual tcu::TestStatus                 iterate                                                 (void);
 
 private:
        const vk::VkFormat                              m_imageFormat;
        const vk::VkClearColorValue             m_fillValue;
        const BufferValidator<T>&               m_validator;
+       const CmdBufferType                                     m_cmdBufferType;
 };
 
 
@@ -77,17 +79,19 @@ public:
                                                        CopyImageToBufferTestCase       (tcu::TestContext&              testCtx,
                                                                                                                 const std::string&             name,
                                                                                                                 vk::VkClearColorValue  fillValue,
-                                                                                                                ValidationData<T>              data)
+                                                                                                                ValidationData<T>              data,
+                                                                                                                CmdBufferType                  cmdBufferType)
                                                                : TestCase                              (testCtx, name, "Copy image to buffer.")
                                                                , m_fillValue                   (fillValue)
                                                                , m_validator                   (data)
+                                                               , m_cmdBufferType               (cmdBufferType)
                                                        {
                                                        }
 
        virtual                                 ~CopyImageToBufferTestCase      (void) {}
        virtual TestInstance*   createInstance                          (Context& ctx) const
                                                        {
-                                                               return new CopyImageToBufferTestInstance<T>(ctx, m_fillValue, m_validator);
+                                                               return new CopyImageToBufferTestInstance<T>(ctx, m_fillValue, m_validator, m_cmdBufferType);
                                                        }
        virtual void                    initPrograms                            (vk::SourceCollections& programCollection) const
                                                        {
@@ -96,16 +100,19 @@ public:
 private:
        vk::VkClearColorValue   m_fillValue;
        BufferValidator<T>              m_validator;
+       CmdBufferType                   m_cmdBufferType;
 };
 
 template<typename T>
 CopyImageToBufferTestInstance<T>::CopyImageToBufferTestInstance        (Context&                                               ctx,
                                                                                                                                 const vk::VkClearColorValue    fillValue,
-                                                                                                                                const BufferValidator<T>&              validator)
+                                                                                                                                const BufferValidator<T>&              validator,
+                                                                                                                                const CmdBufferType                    cmdBufferType)
        : ProtectedTestInstance (ctx)
        , m_imageFormat                 (vk::VK_FORMAT_R32G32B32A32_UINT)
        , m_fillValue                   (fillValue)
        , m_validator                   (validator)
+       , m_cmdBufferType               (cmdBufferType)
 {
 }
 
@@ -135,10 +142,28 @@ tcu::TestStatus CopyImageToBufferTestInstance<T>::iterate()
 
        vk::Unique<vk::VkCommandPool>           cmdPool                         (makeCommandPool(vk, device, PROTECTION_ENABLED, queueFamilyIndex));
        vk::Unique<vk::VkCommandBuffer>         cmdBuffer                       (vk::allocateCommandBuffer(vk, device, *cmdPool, vk::VK_COMMAND_BUFFER_LEVEL_PRIMARY));
+       vk::Unique<vk::VkCommandBuffer>         secondaryCmdBuffer      (vk::allocateCommandBuffer(vk, device, *cmdPool, vk::VK_COMMAND_BUFFER_LEVEL_SECONDARY));
+       vk::VkCommandBuffer                                     targetCmdBuffer         = (m_cmdBufferType == CMD_BUFFER_SECONDARY) ? *secondaryCmdBuffer : *cmdBuffer;
 
        // Begin cmd buffer
        beginCommandBuffer(vk, *cmdBuffer);
 
+       if (m_cmdBufferType == CMD_BUFFER_SECONDARY)
+       {
+               // Begin secondary command buffer
+               const vk::VkCommandBufferInheritanceInfo        secCmdBufInheritInfo    =
+               {
+                       vk::VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO,
+                       DE_NULL,
+                       (vk::VkRenderPass)0u,                                                                           // renderPass
+                       0u,                                                                                                                     // subpass
+                       (vk::VkFramebuffer)0u,                                                                          // framebuffer
+                       VK_FALSE,                                                                                                       // occlusionQueryEnable
+                       (vk::VkQueryControlFlags)0u,                                                            // queryFlags
+                       (vk::VkQueryPipelineStatisticFlags)0u,                                          // pipelineStatistics
+               };
+               beginSecondaryCommandBuffer(vk, *secondaryCmdBuffer, secCmdBufInheritInfo);
+       }
 
        // Start image barrier for source image.
        {
@@ -162,7 +187,7 @@ tcu::TestStatus CopyImageToBufferTestInstance<T>::iterate()
                        }
                };
 
-               vk.cmdPipelineBarrier(*cmdBuffer,
+               vk.cmdPipelineBarrier(targetCmdBuffer,
                                                          vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
                                                          vk::VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
                                                          (vk::VkDependencyFlags)0,
@@ -181,7 +206,7 @@ tcu::TestStatus CopyImageToBufferTestInstance<T>::iterate()
                1u,                                                             // uint32_t                             layerCount
        };
 
-       vk.cmdClearColorImage(*cmdBuffer, **colorImage, vk::VK_IMAGE_LAYOUT_GENERAL, &m_fillValue, 1, &subresourceRange);
+       vk.cmdClearColorImage(targetCmdBuffer, **colorImage, vk::VK_IMAGE_LAYOUT_GENERAL, &m_fillValue, 1, &subresourceRange);
 
        // Image barrier to change accessMask to transfer read bit for source image.
        {
@@ -205,7 +230,7 @@ tcu::TestStatus CopyImageToBufferTestInstance<T>::iterate()
                        }
                };
 
-               vk.cmdPipelineBarrier(*cmdBuffer,
+               vk.cmdPipelineBarrier(targetCmdBuffer,
                                                          vk::VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT,
                                                          vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
                                                          (vk::VkDependencyFlags)0,
@@ -229,7 +254,7 @@ tcu::TestStatus CopyImageToBufferTestInstance<T>::iterate()
                        VK_WHOLE_SIZE,                                                                          // VkDeviceSize                 size
                };
 
-               vk.cmdPipelineBarrier(*cmdBuffer,
+               vk.cmdPipelineBarrier(targetCmdBuffer,
                                                          vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
                                                          vk::VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
                                                          (vk::VkDependencyFlags)0,
@@ -258,7 +283,7 @@ tcu::TestStatus CopyImageToBufferTestInstance<T>::iterate()
                nullOffset,                                             // VkOffset3D                           imageOffset
                imageExtent,                                    // VkExtent3D                           imageExtent
        };
-       vk.cmdCopyImageToBuffer(*cmdBuffer, **colorImage, vk::VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, **dstBuffer, 1u, &copyRegion);
+       vk.cmdCopyImageToBuffer(targetCmdBuffer, **colorImage, vk::VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, **dstBuffer, 1u, &copyRegion);
 
        {
                const vk::VkBufferMemoryBarrier endBufferBarrier                =
@@ -273,7 +298,7 @@ tcu::TestStatus CopyImageToBufferTestInstance<T>::iterate()
                        0u,                                                                                                     // VkDeviceSize                 offset
                        VK_WHOLE_SIZE,                                                                          // VkDeviceSize                 size
                };
-               vk.cmdPipelineBarrier(*cmdBuffer,
+               vk.cmdPipelineBarrier(targetCmdBuffer,
                                                                vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
                                                                vk::VK_PIPELINE_STAGE_TRANSFER_BIT,
                                                                (vk::VkDependencyFlags)0,
@@ -282,6 +307,12 @@ tcu::TestStatus CopyImageToBufferTestInstance<T>::iterate()
                                                                0, (const vk::VkImageMemoryBarrier*)DE_NULL);
        }
 
+       if (m_cmdBufferType == CMD_BUFFER_SECONDARY)
+       {
+               VK_CHECK(vk.endCommandBuffer(*secondaryCmdBuffer));
+               vk.cmdExecuteCommands(*cmdBuffer, 1u, &secondaryCmdBuffer.get());
+       }
+
        VK_CHECK(vk.endCommandBuffer(*cmdBuffer));
 
        // Submit command buffer
@@ -299,9 +330,7 @@ tcu::TestStatus CopyImageToBufferTestInstance<T>::iterate()
                return tcu::TestStatus::fail("Something went really wrong");
 }
 
-} // anonymous
-
-tcu::TestCaseGroup*    createCopyImageToFloatBufferTests(tcu::TestContext& testCtx)
+tcu::TestCaseGroup*    createCopyImageToFloatBufferTests(tcu::TestContext& testCtx, CmdBufferType cmdBufferType)
 {
        struct {
                const vk::VkClearColorValue             fillValue;
@@ -355,7 +384,7 @@ tcu::TestCaseGroup* createCopyImageToFloatBufferTests(tcu::TestContext& testCtx)
                DE_ASSERT(testData[ndx].data.positions[3].x() < MAX_POSITION);
 
                const std::string name = "copy_" + de::toString(ndx + 1);
-               copyStaticTests->addChild(new CopyImageToBufferTestCase<tcu::Vec4>(testCtx, name.c_str(), testData[ndx].fillValue, testData[ndx].data));
+               copyStaticTests->addChild(new CopyImageToBufferTestCase<tcu::Vec4>(testCtx, name.c_str(), testData[ndx].fillValue, testData[ndx].data, cmdBufferType));
        }
 
        /* Add a few randomized tests */
@@ -386,17 +415,26 @@ tcu::TestCaseGroup*       createCopyImageToFloatBufferTests(tcu::TestContext& testCtx)
                DE_ASSERT(data.positions[2].x() < MAX_POSITION);
                DE_ASSERT(data.positions[3].x() < MAX_POSITION);
 
-               copyRandomTests->addChild(new CopyImageToBufferTestCase<tcu::Vec4>(testCtx, name.c_str(), clearValue.color, data));
+               copyRandomTests->addChild(new CopyImageToBufferTestCase<tcu::Vec4>(testCtx, name.c_str(), clearValue.color, data, cmdBufferType));
        }
 
+       std::string groupName = getCmdBufferTypeStr(cmdBufferType);
+       std::string groupDesc = "Copy Image to Buffer Tests with " + groupName + " command buffer";
+       de::MovePtr<tcu::TestCaseGroup> copyTests (new tcu::TestCaseGroup(testCtx, groupName.c_str(), groupDesc.c_str()));
+       copyTests->addChild(copyStaticTests.release());
+       copyTests->addChild(copyRandomTests.release());
+       return copyTests.release();
+}
+
+} // anonymous
+
+tcu::TestCaseGroup*    createCopyImageToFloatBufferTests (tcu::TestContext& testCtx)
+{
        de::MovePtr<tcu::TestCaseGroup> copyTests (new tcu::TestCaseGroup(testCtx, "copy_image_to_float_buffer", "Copy Image to Buffer Tests"));
-       {
-               de::MovePtr<tcu::TestCaseGroup> primaryTests (new tcu::TestCaseGroup(testCtx, "primary", "Copy Image to Buffer Tests using primary command buffer"));
-               primaryTests->addChild(copyStaticTests.release());
-               primaryTests->addChild(copyRandomTests.release());
 
-               copyTests->addChild(primaryTests.release());
-       }
+       copyTests->addChild(createCopyImageToFloatBufferTests(testCtx, CMD_BUFFER_PRIMARY));
+       copyTests->addChild(createCopyImageToFloatBufferTests(testCtx, CMD_BUFFER_SECONDARY));
+
        return copyTests.release();
 }
 
index 591ed10..6a424a0 100644 (file)
@@ -77,13 +77,15 @@ public:
                                                                FillUpdateCopyBufferTestInstance        (Context&                                       ctx,
                                                                                                                                         const deUint32                         fillValue,
                                                                                                                                         const BufferValidator<T>&      validator,
-                                                                                                                                        CmdType                                        cmdType);
+                                                                                                                                        CmdType                                        cmdType,
+                                                                                                                                        const CmdBufferType            cmdBufferType);
        virtual tcu::TestStatus         iterate                                                         (void);
 
 private:
        const deUint32                          m_fillValue;
        const BufferValidator<T>&       m_validator;
        CmdType                                         m_cmdType;
+       const CmdBufferType                     m_cmdBufferType;
 };
 
 
@@ -95,18 +97,20 @@ public:
                                                                                                                         const std::string&             name,
                                                                                                                         deUint32                               fillValue,
                                                                                                                         ValidationData<T>              data,
-                                                                                                                        CmdType                                cmdType)
-                                                               : TestCase              (testCtx, name, getTestTypeName(cmdType))
-                                                               , m_fillValue   (fillValue)
-                                                               , m_validator   (data)
-                                                               , m_cmdType             (cmdType)
+                                                                                                                        CmdType                                cmdType,
+                                                                                                                        CmdBufferType                  cmdBufferType)
+                                                               : TestCase                      (testCtx, name, getTestTypeName(cmdType))
+                                                               , m_fillValue           (fillValue)
+                                                               , m_validator           (data)
+                                                               , m_cmdType                     (cmdType)
+                                                               , m_cmdBufferType       (cmdBufferType)
                                                        {
                                                        }
 
        virtual                                 ~FillUpdateCopyBufferTestCase   (void) {}
        virtual TestInstance*   createInstance                                  (Context& ctx) const
                                                        {
-                                                               return new FillUpdateCopyBufferTestInstance<T>(ctx, m_fillValue, m_validator, m_cmdType);
+                                                               return new FillUpdateCopyBufferTestInstance<T>(ctx, m_fillValue, m_validator, m_cmdType, m_cmdBufferType);
                                                        }
        virtual void                    initPrograms                                    (vk::SourceCollections& programCollection) const
                                                        {
@@ -116,17 +120,20 @@ private:
        deUint32                                m_fillValue;
        BufferValidator<T>              m_validator;
        CmdType                                 m_cmdType;
+       CmdBufferType                   m_cmdBufferType;
 };
 
 template<typename T>
 FillUpdateCopyBufferTestInstance<T>::FillUpdateCopyBufferTestInstance  (Context&                                       ctx,
                                                                                                                                                 const deUint32                         fillValue,
                                                                                                                                                 const BufferValidator<T>&      validator,
-                                                                                                                                                CmdType                                        cmdType)
+                                                                                                                                                CmdType                                        cmdType,
+                                                                                                                                                const CmdBufferType            cmdBufferType)
        : ProtectedTestInstance (ctx)
        , m_fillValue                   (fillValue)
        , m_validator                   (validator)
        , m_cmdType                             (cmdType)
+       , m_cmdBufferType               (cmdBufferType)
 {
 }
 
@@ -159,10 +166,29 @@ tcu::TestStatus FillUpdateCopyBufferTestInstance<T>::iterate()
 
        vk::Unique<vk::VkCommandPool>           cmdPool                         (makeCommandPool(vk, device, PROTECTION_ENABLED, queueFamilyIndex));
        vk::Unique<vk::VkCommandBuffer>         cmdBuffer                       (vk::allocateCommandBuffer(vk, device, *cmdPool, vk::VK_COMMAND_BUFFER_LEVEL_PRIMARY));
+       vk::Unique<vk::VkCommandBuffer>         secondaryCmdBuffer      (vk::allocateCommandBuffer(vk, device, *cmdPool, vk::VK_COMMAND_BUFFER_LEVEL_SECONDARY));
+       vk::VkCommandBuffer                                     targetCmdBuffer         = (m_cmdBufferType == CMD_BUFFER_SECONDARY) ? *secondaryCmdBuffer : *cmdBuffer;
 
        // Begin cmd buffer
        beginCommandBuffer(vk, *cmdBuffer);
 
+       if (m_cmdBufferType == CMD_BUFFER_SECONDARY)
+       {
+               // Begin secondary command buffer
+               const vk::VkCommandBufferInheritanceInfo        secCmdBufInheritInfo    =
+               {
+                       vk::VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO,
+                       DE_NULL,
+                       (vk::VkRenderPass)0u,                                                                           // renderPass
+                       0u,                                                                                                                     // subpass
+                       (vk::VkFramebuffer)0u,                                                                          // framebuffer
+                       VK_FALSE,                                                                                                       // occlusionQueryEnable
+                       (vk::VkQueryControlFlags)0u,                                                            // queryFlags
+                       (vk::VkQueryPipelineStatisticFlags)0u,                                          // pipelineStatistics
+               };
+               beginSecondaryCommandBuffer(vk, *secondaryCmdBuffer, secCmdBufInheritInfo);
+       }
+
        switch (m_cmdType) {
                case FILL_BUFFER:
                        {
@@ -178,7 +204,7 @@ tcu::TestStatus FillUpdateCopyBufferTestInstance<T>::iterate()
                                        0u,                                                                                             // VkDeviceSize                 offset
                                        VK_WHOLE_SIZE,                                                                  // VkDeviceSize                 size
                                };
-                               vk.cmdPipelineBarrier(*cmdBuffer,
+                               vk.cmdPipelineBarrier(targetCmdBuffer,
                                                                          vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
                                                                          vk::VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
                                                                          (vk::VkDependencyFlags) 0,
@@ -186,7 +212,7 @@ tcu::TestStatus FillUpdateCopyBufferTestInstance<T>::iterate()
                                                                          1, &startFillBufferBarrier,
                                                                          0, (const vk::VkImageMemoryBarrier *) DE_NULL);
                                // Fill buffer
-                               vk.cmdFillBuffer(*cmdBuffer, **dstBuffer, 0u, VK_WHOLE_SIZE, m_fillValue);
+                               vk.cmdFillBuffer(targetCmdBuffer, **dstBuffer, 0u, VK_WHOLE_SIZE, m_fillValue);
                                break;
                        }
 
@@ -204,7 +230,7 @@ tcu::TestStatus FillUpdateCopyBufferTestInstance<T>::iterate()
                                        0u,                                                                                             // VkDeviceSize                 offset
                                        VK_WHOLE_SIZE,                                                                  // VkDeviceSize                 size
                                };
-                               vk.cmdPipelineBarrier(*cmdBuffer,
+                               vk.cmdPipelineBarrier(targetCmdBuffer,
                                                                          vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
                                                                          vk::VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
                                                                          (vk::VkDependencyFlags) 0,
@@ -215,7 +241,7 @@ tcu::TestStatus FillUpdateCopyBufferTestInstance<T>::iterate()
                                deUint32 data[BUFFER_SIZE];
                                for (size_t ndx = 0; ndx < BUFFER_SIZE; ndx++)
                                        data[ndx] = m_fillValue;
-                               vk.cmdUpdateBuffer(*cmdBuffer, **dstBuffer, 0u, bufferSize, (const deUint32 *) &data);
+                               vk.cmdUpdateBuffer(targetCmdBuffer, **dstBuffer, 0u, bufferSize, (const deUint32 *) &data);
                                break;
                        }
 
@@ -234,14 +260,14 @@ tcu::TestStatus FillUpdateCopyBufferTestInstance<T>::iterate()
                                        0u,                                                                                             // VkDeviceSize                 offset
                                        VK_WHOLE_SIZE,                                                                  // VkDeviceSize                 size
                                };
-                               vk.cmdPipelineBarrier(*cmdBuffer,
+                               vk.cmdPipelineBarrier(targetCmdBuffer,
                                                                          vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
                                                                          vk::VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
                                                                          (vk::VkDependencyFlags) 0,
                                                                          0, (const vk::VkMemoryBarrier *) DE_NULL,
                                                                          1, &startBufferBarrier,
                                                                          0, (const vk::VkImageMemoryBarrier *) DE_NULL);
-                               vk.cmdFillBuffer(*cmdBuffer, **srcBuffer, 0u, VK_WHOLE_SIZE, m_fillValue);
+                               vk.cmdFillBuffer(targetCmdBuffer, **srcBuffer, 0u, VK_WHOLE_SIZE, m_fillValue);
 
                                // Barrier to change accessMask to transfer read bit for source buffer
                                const vk::VkBufferMemoryBarrier startCopyBufferBarrier  =
@@ -276,7 +302,7 @@ tcu::TestStatus FillUpdateCopyBufferTestInstance<T>::iterate()
                                        startCopyBufferBarrier,
                                        dstBufferBarrier
                                };
-                               vk.cmdPipelineBarrier(*cmdBuffer,
+                               vk.cmdPipelineBarrier(targetCmdBuffer,
                                                                          vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
                                                                          vk::VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
                                                                          (vk::VkDependencyFlags)0,
@@ -290,7 +316,7 @@ tcu::TestStatus FillUpdateCopyBufferTestInstance<T>::iterate()
                                        0ull,                                                           // VkDeviceSize         dstOffset;
                                        bufferSize                                                      // VkDeviceSize         size;
                                };
-                               vk.cmdCopyBuffer(*cmdBuffer, **srcBuffer, **dstBuffer, 1u, &copyBufferRegion);
+                               vk.cmdCopyBuffer(targetCmdBuffer, **srcBuffer, **dstBuffer, 1u, &copyBufferRegion);
                                break;
                        }
 
@@ -312,7 +338,7 @@ tcu::TestStatus FillUpdateCopyBufferTestInstance<T>::iterate()
                        0u,                                                                                                     // VkDeviceSize                 offset
                        VK_WHOLE_SIZE,                                                                          // VkDeviceSize                 size
                };
-               vk.cmdPipelineBarrier(*cmdBuffer,
+               vk.cmdPipelineBarrier(targetCmdBuffer,
                                                          vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
                                                          vk::VK_PIPELINE_STAGE_TRANSFER_BIT,
                                                          (vk::VkDependencyFlags)0,
@@ -321,6 +347,12 @@ tcu::TestStatus FillUpdateCopyBufferTestInstance<T>::iterate()
                                                          0, (const vk::VkImageMemoryBarrier*)DE_NULL);
        }
 
+       if (m_cmdBufferType == CMD_BUFFER_SECONDARY)
+       {
+               VK_CHECK(vk.endCommandBuffer(*secondaryCmdBuffer));
+               vk.cmdExecuteCommands(*cmdBuffer, 1u, &secondaryCmdBuffer.get());
+       }
+
        VK_CHECK(vk.endCommandBuffer(*cmdBuffer));
 
        // Submit command buffer
@@ -338,7 +370,7 @@ tcu::TestStatus FillUpdateCopyBufferTestInstance<T>::iterate()
                return tcu::TestStatus::fail("Something went really wrong");
 }
 
-tcu::TestCaseGroup*    createFillUpdateCopyBufferFloatTests (tcu::TestContext& testCtx, CmdType cmdType)
+tcu::TestCaseGroup*    createFillUpdateCopyBufferFloatTests (tcu::TestContext& testCtx, CmdType cmdType, CmdBufferType cmdBufferType)
 {
        struct {
                const union {
@@ -397,7 +429,7 @@ tcu::TestCaseGroup* createFillUpdateCopyBufferFloatTests (tcu::TestContext& test
 
                const std::string name = "test_" + de::toString(ndx + 1);
                staticTests->addChild(new FillUpdateCopyBufferTestCase<tcu::Vec4>(
-                                                       testCtx, name.c_str(), testData[ndx].fillValue.uint, testData[ndx].data, cmdType));
+                                                       testCtx, name.c_str(), testData[ndx].fillValue.uint, testData[ndx].data, cmdType, cmdBufferType));
        }
 
        /* Add a few randomized tests */
@@ -427,21 +459,27 @@ tcu::TestCaseGroup*       createFillUpdateCopyBufferFloatTests (tcu::TestContext& test
                DE_ASSERT(data.positions[2].x() < MAX_POSITION);
                DE_ASSERT(data.positions[3].x() < MAX_POSITION);
 
-               randomTests->addChild(new FillUpdateCopyBufferTestCase<tcu::Vec4>(testCtx, name.c_str(), fillValue.uint, data, cmdType));
+               randomTests->addChild(new FillUpdateCopyBufferTestCase<tcu::Vec4>(testCtx, name.c_str(), fillValue.uint, data, cmdType, cmdBufferType));
        }
 
-       de::MovePtr<tcu::TestCaseGroup> testGroup (new tcu::TestCaseGroup(testCtx, "float_buffer", desc.c_str()));
-       {
-               de::MovePtr<tcu::TestCaseGroup> primaryGroup (new tcu::TestCaseGroup(testCtx, "primary", (desc + " using primary command buffer").c_str()));
-               primaryGroup->addChild(staticTests.release());
-               primaryGroup->addChild(randomTests.release());
+       const std::string                               groupName               = getCmdBufferTypeStr(cmdBufferType);
+       de::MovePtr<tcu::TestCaseGroup> primaryGroup    (new tcu::TestCaseGroup(testCtx, groupName.c_str(), (desc + " using " + groupName.c_str() + " command buffer").c_str()));
+       primaryGroup->addChild(staticTests.release());
+       primaryGroup->addChild(randomTests.release());
 
-               testGroup->addChild(primaryGroup.release());
-       }
+       return primaryGroup.release();
+}
+
+tcu::TestCaseGroup*    createFillUpdateCopyBufferFloatTests (tcu::TestContext& testCtx, CmdType cmdType)
+{
+       const std::string desc = std::string(getTestTypeName(cmdType)) + " (float)";
+       de::MovePtr<tcu::TestCaseGroup> testGroup (new tcu::TestCaseGroup(testCtx, "float_buffer", desc.c_str()));
+       testGroup->addChild(createFillUpdateCopyBufferFloatTests(testCtx, cmdType, CMD_BUFFER_PRIMARY));
+       testGroup->addChild(createFillUpdateCopyBufferFloatTests(testCtx, cmdType, CMD_BUFFER_SECONDARY));
        return testGroup.release();
 }
 
-tcu::TestCaseGroup*    createFillUpdateCopyBufferIntegerTests (tcu::TestContext& testCtx, CmdType cmdType)
+tcu::TestCaseGroup*    createFillUpdateCopyBufferIntegerTests (tcu::TestContext& testCtx, CmdType cmdType, CmdBufferType cmdBufferType)
 {
        struct {
                const union {
@@ -500,7 +538,7 @@ tcu::TestCaseGroup* createFillUpdateCopyBufferIntegerTests (tcu::TestContext& te
 
                const std::string name = "test_" + de::toString(ndx + 1);
                staticTests->addChild(new FillUpdateCopyBufferTestCase<tcu::IVec4>(
-                                                       testCtx, name.c_str(), testData[ndx].fillValue.uint, testData[ndx].data, cmdType));
+                                                       testCtx, name.c_str(), testData[ndx].fillValue.uint, testData[ndx].data, cmdType, cmdBufferType));
        }
 
        /* Add a few randomized tests */
@@ -530,21 +568,27 @@ tcu::TestCaseGroup*       createFillUpdateCopyBufferIntegerTests (tcu::TestContext& te
                DE_ASSERT(data.positions[2].x() < MAX_POSITION);
                DE_ASSERT(data.positions[3].x() < MAX_POSITION);
 
-               randomTests->addChild(new FillUpdateCopyBufferTestCase<tcu::IVec4>(testCtx, name.c_str(), fillValue.uint, data, cmdType));
+               randomTests->addChild(new FillUpdateCopyBufferTestCase<tcu::IVec4>(testCtx, name.c_str(), fillValue.uint, data, cmdType, cmdBufferType));
        }
 
-       de::MovePtr<tcu::TestCaseGroup> testGroup (new tcu::TestCaseGroup(testCtx, "integer_buffer", desc.c_str()));
-       {
-               de::MovePtr<tcu::TestCaseGroup> primaryGroup (new tcu::TestCaseGroup(testCtx, "primary", (desc + " using primary command buffer").c_str()));
-               primaryGroup->addChild(staticTests.release());
-               primaryGroup->addChild(randomTests.release());
+       const std::string                               groupName               = getCmdBufferTypeStr(cmdBufferType);
+       de::MovePtr<tcu::TestCaseGroup> primaryGroup    (new tcu::TestCaseGroup(testCtx, groupName.c_str(), (desc + " using " + groupName.c_str() + " command buffer").c_str()));
+       primaryGroup->addChild(staticTests.release());
+       primaryGroup->addChild(randomTests.release());
 
-               testGroup->addChild(primaryGroup.release());
-       }
+       return primaryGroup.release();
+}
+
+tcu::TestCaseGroup*    createFillUpdateCopyBufferIntegerTests (tcu::TestContext& testCtx, CmdType cmdType)
+{
+       const std::string desc = std::string(getTestTypeName(cmdType)) + " (integer)";
+       de::MovePtr<tcu::TestCaseGroup> testGroup (new tcu::TestCaseGroup(testCtx, "integer_buffer", desc.c_str()));
+       testGroup->addChild(createFillUpdateCopyBufferIntegerTests(testCtx, cmdType, CMD_BUFFER_PRIMARY));
+       testGroup->addChild(createFillUpdateCopyBufferIntegerTests(testCtx, cmdType, CMD_BUFFER_SECONDARY));
        return testGroup.release();
 }
 
-tcu::TestCaseGroup*    createFillUpdateCopyBufferUnsignedTests (tcu::TestContext& testCtx, CmdType cmdType)
+tcu::TestCaseGroup*    createFillUpdateCopyBufferUnsignedTests (tcu::TestContext& testCtx, CmdType cmdType, CmdBufferType cmdBufferType)
 {
        struct {
                deUint32                                        fillValue;
@@ -600,7 +644,7 @@ tcu::TestCaseGroup* createFillUpdateCopyBufferUnsignedTests (tcu::TestContext& t
 
                const std::string name = "test_" + de::toString(ndx + 1);
                staticTests->addChild(new FillUpdateCopyBufferTestCase<tcu::UVec4>(
-                                                       testCtx, name.c_str(), testData[ndx].fillValue, testData[ndx].data, cmdType));
+                                                       testCtx, name.c_str(), testData[ndx].fillValue, testData[ndx].data, cmdType, cmdBufferType));
        }
 
        /* Add a few randomized tests */
@@ -626,43 +670,58 @@ tcu::TestCaseGroup*       createFillUpdateCopyBufferUnsignedTests (tcu::TestContext& t
                DE_ASSERT(data.positions[2].x() < MAX_POSITION);
                DE_ASSERT(data.positions[3].x() < MAX_POSITION);
 
-               randomTests->addChild(new FillUpdateCopyBufferTestCase<tcu::UVec4>(testCtx, name.c_str(), fillValue, data, cmdType));
+               randomTests->addChild(new FillUpdateCopyBufferTestCase<tcu::UVec4>(testCtx, name.c_str(), fillValue, data, cmdType, cmdBufferType));
        }
 
-       de::MovePtr<tcu::TestCaseGroup> testGroup (new tcu::TestCaseGroup(testCtx, "unsigned_buffer", desc.c_str()));
-       {
-               de::MovePtr<tcu::TestCaseGroup> primaryGroup (new tcu::TestCaseGroup(testCtx, "primary", (desc + " using primary command buffer").c_str()));
-               primaryGroup->addChild(staticTests.release());
-               primaryGroup->addChild(randomTests.release());
+       const std::string                               groupName               = getCmdBufferTypeStr(cmdBufferType);
+       de::MovePtr<tcu::TestCaseGroup> testGroup       (new tcu::TestCaseGroup(testCtx, groupName.c_str(), (desc + " using " + groupName.c_str() + " command buffer").c_str()));
+       testGroup->addChild(staticTests.release());
+       testGroup->addChild(randomTests.release());
 
-               testGroup->addChild(primaryGroup.release());
-       }
+       return testGroup.release();
+}
+
+tcu::TestCaseGroup*    createFillUpdateCopyBufferUnsignedTests (tcu::TestContext& testCtx, CmdType cmdType)
+{
+       const std::string desc = std::string(getTestTypeName(cmdType)) + " (unsinged)";
+       de::MovePtr<tcu::TestCaseGroup> testGroup (new tcu::TestCaseGroup(testCtx, "unsigned_buffer", desc.c_str()));
+       testGroup->addChild(createFillUpdateCopyBufferUnsignedTests(testCtx, cmdType, CMD_BUFFER_PRIMARY));
+       testGroup->addChild(createFillUpdateCopyBufferUnsignedTests(testCtx, cmdType, CMD_BUFFER_SECONDARY));
        return testGroup.release();
 }
 
 } // anonymous
 
-tcu::TestCaseGroup* createFillBufferTests(tcu::TestContext& testCtx) {
+tcu::TestCaseGroup*    createFillBufferTests (tcu::TestContext& testCtx)
+{
        de::MovePtr<tcu::TestCaseGroup> testGroup (new tcu::TestCaseGroup(testCtx, "fill", "Fill Buffer Tests"));
+
        testGroup->addChild(createFillUpdateCopyBufferFloatTests(testCtx, FILL_BUFFER));
        testGroup->addChild(createFillUpdateCopyBufferIntegerTests(testCtx, FILL_BUFFER));
        testGroup->addChild(createFillUpdateCopyBufferUnsignedTests(testCtx, FILL_BUFFER));
+
        return testGroup.release();
 }
 
-tcu::TestCaseGroup* createUpdateBufferTests(tcu::TestContext& testCtx) {
+tcu::TestCaseGroup*    createUpdateBufferTests (tcu::TestContext& testCtx)
+{
        de::MovePtr<tcu::TestCaseGroup> updateTests (new tcu::TestCaseGroup(testCtx, "update", "Update Buffer Tests"));
-       updateTests->addChild(createFillUpdateCopyBufferFloatTests(testCtx, UPDATE_BUFFER));
-       updateTests->addChild(createFillUpdateCopyBufferIntegerTests(testCtx, UPDATE_BUFFER));
-       updateTests->addChild(createFillUpdateCopyBufferUnsignedTests(testCtx, UPDATE_BUFFER));
+
+       updateTests->addChild(createFillUpdateCopyBufferFloatTests(testCtx, FILL_BUFFER));
+       updateTests->addChild(createFillUpdateCopyBufferIntegerTests(testCtx, FILL_BUFFER));
+       updateTests->addChild(createFillUpdateCopyBufferUnsignedTests(testCtx, FILL_BUFFER));
+
        return updateTests.release();
 }
 
-tcu::TestCaseGroup* createCopyBufferTests(tcu::TestContext& testCtx) {
+tcu::TestCaseGroup*    createCopyBufferTests (tcu::TestContext& testCtx)
+{
        de::MovePtr<tcu::TestCaseGroup> copyTests (new tcu::TestCaseGroup(testCtx, "copy", "Copy Buffer Tests"));
-       copyTests->addChild(createFillUpdateCopyBufferFloatTests(testCtx, COPY_BUFFER));
-       copyTests->addChild(createFillUpdateCopyBufferIntegerTests(testCtx, COPY_BUFFER));
-       copyTests->addChild(createFillUpdateCopyBufferUnsignedTests(testCtx, COPY_BUFFER));
+
+       copyTests->addChild(createFillUpdateCopyBufferFloatTests(testCtx, FILL_BUFFER));
+       copyTests->addChild(createFillUpdateCopyBufferIntegerTests(testCtx, FILL_BUFFER));
+       copyTests->addChild(createFillUpdateCopyBufferUnsignedTests(testCtx, FILL_BUFFER));
+
        return copyTests.release();
 }
 
index 43de927..e1014a0 100644 (file)
@@ -391,6 +391,23 @@ void beginCommandBuffer (const vk::DeviceInterface& vk, const vk::VkCommandBuffe
        VK_CHECK(vk.beginCommandBuffer(commandBuffer, &beginInfo));
 }
 
+void beginSecondaryCommandBuffer (const vk::DeviceInterface&                           vk,
+                                                                 const vk::VkCommandBuffer                                     secondaryCmdBuffer,
+                                                                 const vk::VkCommandBufferInheritanceInfo      bufferInheritanceInfo)
+{
+       const vk::VkCommandBufferUsageFlags     flags           = bufferInheritanceInfo.renderPass != DE_NULL
+                                                                                                         ? (vk::VkCommandBufferUsageFlags)vk::VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT
+                                                                                                         : (vk::VkCommandBufferUsageFlags)0u;
+       const vk::VkCommandBufferBeginInfo      beginInfo       =
+       {
+               vk::VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO,                        // sType
+               DE_NULL,                                                                                                        // pNext
+               flags,                                                                                                          // flags
+               &bufferInheritanceInfo,                                                                         // pInheritanceInfo
+       };
+       VK_CHECK(vk.beginCommandBuffer(secondaryCmdBuffer, &beginInfo));
+}
+
 
 vk::VkResult queueSubmit (ProtectedContext&            context,
                                                  ProtectionMode                protectionMode,
@@ -687,5 +704,17 @@ vk::Move<vk::VkPipeline> makeGraphicsPipeline (const vk::DeviceInterface&          vk,
        return vk::createGraphicsPipeline(vk, device, DE_NULL, &graphicsPipelineParams);
 }
 
+const char* getCmdBufferTypeStr (const CmdBufferType cmdBufferType)
+{
+       switch (cmdBufferType)
+       {
+               case CMD_BUFFER_PRIMARY:        return "primary";
+               case CMD_BUFFER_SECONDARY:      return "secondary";
+
+               default: DE_FATAL("Invalid command buffer type"); return "";
+       }
+}
+
+
 } // ProtectedMem
 } // vkt
index d62a93e..44c8241 100644 (file)
@@ -87,6 +87,18 @@ vk::Move<vk::VkFramebuffer>                  createFramebuffer                                       (ProtectedContext&                                      conte
 vk::Move<vk::VkPipelineLayout>         createPipelineLayout                            (ProtectedContext&                                      context,
                                                                                                                                                 deUint32                                                       layoutCount,
                                                                                                                                                 vk::VkDescriptorSetLayout*                     setLayouts);
+
+typedef vk::VkCommandBufferInheritanceInfo CmdBuffInheritance;
+enum CmdBufferType {
+       CMD_BUFFER_PRIMARY,
+       CMD_BUFFER_SECONDARY,
+};
+
+const char*                                                    getCmdBufferTypeStr                                     (const CmdBufferType                            cmdBufferType);
+void                                                           beginSecondaryCommandBuffer                     (const vk::DeviceInterface&                     vk,
+                                                                                                                                                const vk::VkCommandBuffer                      secondaryCmdBuffer,
+                                                                                                                                                const CmdBuffInheritance                       secCmdBufInheritInfo);
+
 void                                                           beginCommandBuffer                                      (const vk::DeviceInterface&                     vk,
                                                                                                                                                 const vk::VkCommandBuffer                      commandBuffer);
 vk::VkResult                                           queueSubmit                                                     (ProtectedContext&                                      context,
@@ -117,7 +129,6 @@ vk::Move<vk::VkCommandPool>                 makeCommandPool                                         (const vk::DeviceInterface&
                                                                                                                                                 ProtectionMode                                         protectionMode,
                                                                                                                                                 const deUint32                                         queueFamilyIdx);
 
-
 vk::Move<vk::VkPipeline>                       makeGraphicsPipeline                            (const vk::DeviceInterface&                     vk,
                                                                                                                                                 const vk::VkDevice                                     device,
                                                                                                                                                 const vk::VkPipelineLayout                     pipelineLayout,
index dcca32e..145c883 100755 (executable)
@@ -265609,6 +265609,23 @@ dEQP-VK.protected_memory.attachment.clear_op.primary.random.clear_7
 dEQP-VK.protected_memory.attachment.clear_op.primary.random.clear_8
 dEQP-VK.protected_memory.attachment.clear_op.primary.random.clear_9
 dEQP-VK.protected_memory.attachment.clear_op.primary.random.clear_10
+dEQP-VK.protected_memory.attachment.clear_op.secondary.static.clear_1
+dEQP-VK.protected_memory.attachment.clear_op.secondary.static.clear_2
+dEQP-VK.protected_memory.attachment.clear_op.secondary.static.clear_3
+dEQP-VK.protected_memory.attachment.clear_op.secondary.static.clear_4
+dEQP-VK.protected_memory.attachment.clear_op.secondary.static.clear_5
+dEQP-VK.protected_memory.attachment.clear_op.secondary.static.clear_6
+dEQP-VK.protected_memory.attachment.clear_op.secondary.static.clear_7
+dEQP-VK.protected_memory.attachment.clear_op.secondary.random.clear_1
+dEQP-VK.protected_memory.attachment.clear_op.secondary.random.clear_2
+dEQP-VK.protected_memory.attachment.clear_op.secondary.random.clear_3
+dEQP-VK.protected_memory.attachment.clear_op.secondary.random.clear_4
+dEQP-VK.protected_memory.attachment.clear_op.secondary.random.clear_5
+dEQP-VK.protected_memory.attachment.clear_op.secondary.random.clear_6
+dEQP-VK.protected_memory.attachment.clear_op.secondary.random.clear_7
+dEQP-VK.protected_memory.attachment.clear_op.secondary.random.clear_8
+dEQP-VK.protected_memory.attachment.clear_op.secondary.random.clear_9
+dEQP-VK.protected_memory.attachment.clear_op.secondary.random.clear_10
 dEQP-VK.protected_memory.image.copy.primary.static.copy_1
 dEQP-VK.protected_memory.image.copy.primary.static.copy_2
 dEQP-VK.protected_memory.image.copy.primary.static.copy_3
@@ -265626,6 +265643,23 @@ dEQP-VK.protected_memory.image.copy.primary.random.copy_7
 dEQP-VK.protected_memory.image.copy.primary.random.copy_8
 dEQP-VK.protected_memory.image.copy.primary.random.copy_9
 dEQP-VK.protected_memory.image.copy.primary.random.copy_10
+dEQP-VK.protected_memory.image.copy.secondary.static.copy_1
+dEQP-VK.protected_memory.image.copy.secondary.static.copy_2
+dEQP-VK.protected_memory.image.copy.secondary.static.copy_3
+dEQP-VK.protected_memory.image.copy.secondary.static.copy_4
+dEQP-VK.protected_memory.image.copy.secondary.static.copy_5
+dEQP-VK.protected_memory.image.copy.secondary.static.copy_6
+dEQP-VK.protected_memory.image.copy.secondary.static.copy_7
+dEQP-VK.protected_memory.image.copy.secondary.random.copy_1
+dEQP-VK.protected_memory.image.copy.secondary.random.copy_2
+dEQP-VK.protected_memory.image.copy.secondary.random.copy_3
+dEQP-VK.protected_memory.image.copy.secondary.random.copy_4
+dEQP-VK.protected_memory.image.copy.secondary.random.copy_5
+dEQP-VK.protected_memory.image.copy.secondary.random.copy_6
+dEQP-VK.protected_memory.image.copy.secondary.random.copy_7
+dEQP-VK.protected_memory.image.copy.secondary.random.copy_8
+dEQP-VK.protected_memory.image.copy.secondary.random.copy_9
+dEQP-VK.protected_memory.image.copy.secondary.random.copy_10
 dEQP-VK.protected_memory.image.blit.primary.static.blit_1
 dEQP-VK.protected_memory.image.blit.primary.static.blit_2
 dEQP-VK.protected_memory.image.blit.primary.static.blit_3
@@ -265643,6 +265677,23 @@ dEQP-VK.protected_memory.image.blit.primary.random.blit_7
 dEQP-VK.protected_memory.image.blit.primary.random.blit_8
 dEQP-VK.protected_memory.image.blit.primary.random.blit_9
 dEQP-VK.protected_memory.image.blit.primary.random.blit_10
+dEQP-VK.protected_memory.image.blit.secondary.static.blit_1
+dEQP-VK.protected_memory.image.blit.secondary.static.blit_2
+dEQP-VK.protected_memory.image.blit.secondary.static.blit_3
+dEQP-VK.protected_memory.image.blit.secondary.static.blit_4
+dEQP-VK.protected_memory.image.blit.secondary.static.blit_5
+dEQP-VK.protected_memory.image.blit.secondary.static.blit_6
+dEQP-VK.protected_memory.image.blit.secondary.static.blit_7
+dEQP-VK.protected_memory.image.blit.secondary.random.blit_1
+dEQP-VK.protected_memory.image.blit.secondary.random.blit_2
+dEQP-VK.protected_memory.image.blit.secondary.random.blit_3
+dEQP-VK.protected_memory.image.blit.secondary.random.blit_4
+dEQP-VK.protected_memory.image.blit.secondary.random.blit_5
+dEQP-VK.protected_memory.image.blit.secondary.random.blit_6
+dEQP-VK.protected_memory.image.blit.secondary.random.blit_7
+dEQP-VK.protected_memory.image.blit.secondary.random.blit_8
+dEQP-VK.protected_memory.image.blit.secondary.random.blit_9
+dEQP-VK.protected_memory.image.blit.secondary.random.blit_10
 dEQP-VK.protected_memory.image.clear_color.primary.static.clear_1
 dEQP-VK.protected_memory.image.clear_color.primary.static.clear_2
 dEQP-VK.protected_memory.image.clear_color.primary.static.clear_3
@@ -265660,6 +265711,23 @@ dEQP-VK.protected_memory.image.clear_color.primary.random.clear_7
 dEQP-VK.protected_memory.image.clear_color.primary.random.clear_8
 dEQP-VK.protected_memory.image.clear_color.primary.random.clear_9
 dEQP-VK.protected_memory.image.clear_color.primary.random.clear_10
+dEQP-VK.protected_memory.image.clear_color.secondary.static.clear_1
+dEQP-VK.protected_memory.image.clear_color.secondary.static.clear_2
+dEQP-VK.protected_memory.image.clear_color.secondary.static.clear_3
+dEQP-VK.protected_memory.image.clear_color.secondary.static.clear_4
+dEQP-VK.protected_memory.image.clear_color.secondary.static.clear_5
+dEQP-VK.protected_memory.image.clear_color.secondary.static.clear_6
+dEQP-VK.protected_memory.image.clear_color.secondary.static.clear_7
+dEQP-VK.protected_memory.image.clear_color.secondary.random.clear_1
+dEQP-VK.protected_memory.image.clear_color.secondary.random.clear_2
+dEQP-VK.protected_memory.image.clear_color.secondary.random.clear_3
+dEQP-VK.protected_memory.image.clear_color.secondary.random.clear_4
+dEQP-VK.protected_memory.image.clear_color.secondary.random.clear_5
+dEQP-VK.protected_memory.image.clear_color.secondary.random.clear_6
+dEQP-VK.protected_memory.image.clear_color.secondary.random.clear_7
+dEQP-VK.protected_memory.image.clear_color.secondary.random.clear_8
+dEQP-VK.protected_memory.image.clear_color.secondary.random.clear_9
+dEQP-VK.protected_memory.image.clear_color.secondary.random.clear_10
 dEQP-VK.protected_memory.image.copy_buffer_to_image.primary.static.copy_1
 dEQP-VK.protected_memory.image.copy_buffer_to_image.primary.static.copy_2
 dEQP-VK.protected_memory.image.copy_buffer_to_image.primary.static.copy_3
@@ -265676,6 +265744,22 @@ dEQP-VK.protected_memory.image.copy_buffer_to_image.primary.random.copy_7
 dEQP-VK.protected_memory.image.copy_buffer_to_image.primary.random.copy_8
 dEQP-VK.protected_memory.image.copy_buffer_to_image.primary.random.copy_9
 dEQP-VK.protected_memory.image.copy_buffer_to_image.primary.random.copy_10
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.static.copy_1
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.static.copy_2
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.static.copy_3
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.static.copy_4
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.static.copy_5
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.static.copy_6
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.random.copy_1
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.random.copy_2
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.random.copy_3
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.random.copy_4
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.random.copy_5
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.random.copy_6
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.random.copy_7
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.random.copy_8
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.random.copy_9
+dEQP-VK.protected_memory.image.copy_buffer_to_image.secondary.random.copy_10
 dEQP-VK.protected_memory.buffer.fill.float_buffer.primary.static.test_1
 dEQP-VK.protected_memory.buffer.fill.float_buffer.primary.static.test_2
 dEQP-VK.protected_memory.buffer.fill.float_buffer.primary.static.test_3
@@ -265692,6 +265776,22 @@ dEQP-VK.protected_memory.buffer.fill.float_buffer.primary.random.test_7
 dEQP-VK.protected_memory.buffer.fill.float_buffer.primary.random.test_8
 dEQP-VK.protected_memory.buffer.fill.float_buffer.primary.random.test_9
 dEQP-VK.protected_memory.buffer.fill.float_buffer.primary.random.test_10
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.static.test_1
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.static.test_2
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.static.test_3
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.static.test_4
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.static.test_5
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.static.test_6
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.random.test_1
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.random.test_2
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.random.test_3
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.random.test_4
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.random.test_5
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.random.test_6
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.random.test_7
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.random.test_8
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.random.test_9
+dEQP-VK.protected_memory.buffer.fill.float_buffer.secondary.random.test_10
 dEQP-VK.protected_memory.buffer.fill.integer_buffer.primary.static.test_1
 dEQP-VK.protected_memory.buffer.fill.integer_buffer.primary.static.test_2
 dEQP-VK.protected_memory.buffer.fill.integer_buffer.primary.static.test_3
@@ -265708,6 +265808,22 @@ dEQP-VK.protected_memory.buffer.fill.integer_buffer.primary.random.test_7
 dEQP-VK.protected_memory.buffer.fill.integer_buffer.primary.random.test_8
 dEQP-VK.protected_memory.buffer.fill.integer_buffer.primary.random.test_9
 dEQP-VK.protected_memory.buffer.fill.integer_buffer.primary.random.test_10
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.static.test_1
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.static.test_2
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.static.test_3
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.static.test_4
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.static.test_5
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.static.test_6
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.random.test_1
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.random.test_2
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.random.test_3
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.random.test_4
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.random.test_5
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.random.test_6
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.random.test_7
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.random.test_8
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.random.test_9
+dEQP-VK.protected_memory.buffer.fill.integer_buffer.secondary.random.test_10
 dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.primary.static.test_1
 dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.primary.static.test_2
 dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.primary.static.test_3
@@ -265724,6 +265840,22 @@ dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.primary.random.test_7
 dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.primary.random.test_8
 dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.primary.random.test_9
 dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.primary.random.test_10
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.static.test_1
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.static.test_2
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.static.test_3
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.static.test_4
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.static.test_5
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.static.test_6
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.random.test_1
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.random.test_2
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.random.test_3
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.random.test_4
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.random.test_5
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.random.test_6
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.random.test_7
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.random.test_8
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.random.test_9
+dEQP-VK.protected_memory.buffer.fill.unsigned_buffer.secondary.random.test_10
 dEQP-VK.protected_memory.buffer.update.float_buffer.primary.static.test_1
 dEQP-VK.protected_memory.buffer.update.float_buffer.primary.static.test_2
 dEQP-VK.protected_memory.buffer.update.float_buffer.primary.static.test_3
@@ -265740,6 +265872,22 @@ dEQP-VK.protected_memory.buffer.update.float_buffer.primary.random.test_7
 dEQP-VK.protected_memory.buffer.update.float_buffer.primary.random.test_8
 dEQP-VK.protected_memory.buffer.update.float_buffer.primary.random.test_9
 dEQP-VK.protected_memory.buffer.update.float_buffer.primary.random.test_10
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.static.test_1
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.static.test_2
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.static.test_3
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.static.test_4
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.static.test_5
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.static.test_6
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.random.test_1
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.random.test_2
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.random.test_3
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.random.test_4
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.random.test_5
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.random.test_6
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.random.test_7
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.random.test_8
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.random.test_9
+dEQP-VK.protected_memory.buffer.update.float_buffer.secondary.random.test_10
 dEQP-VK.protected_memory.buffer.update.integer_buffer.primary.static.test_1
 dEQP-VK.protected_memory.buffer.update.integer_buffer.primary.static.test_2
 dEQP-VK.protected_memory.buffer.update.integer_buffer.primary.static.test_3
@@ -265756,6 +265904,22 @@ dEQP-VK.protected_memory.buffer.update.integer_buffer.primary.random.test_7
 dEQP-VK.protected_memory.buffer.update.integer_buffer.primary.random.test_8
 dEQP-VK.protected_memory.buffer.update.integer_buffer.primary.random.test_9
 dEQP-VK.protected_memory.buffer.update.integer_buffer.primary.random.test_10
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.static.test_1
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.static.test_2
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.static.test_3
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.static.test_4
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.static.test_5
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.static.test_6
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.random.test_1
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.random.test_2
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.random.test_3
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.random.test_4
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.random.test_5
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.random.test_6
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.random.test_7
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.random.test_8
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.random.test_9
+dEQP-VK.protected_memory.buffer.update.integer_buffer.secondary.random.test_10
 dEQP-VK.protected_memory.buffer.update.unsigned_buffer.primary.static.test_1
 dEQP-VK.protected_memory.buffer.update.unsigned_buffer.primary.static.test_2
 dEQP-VK.protected_memory.buffer.update.unsigned_buffer.primary.static.test_3
@@ -265772,6 +265936,22 @@ dEQP-VK.protected_memory.buffer.update.unsigned_buffer.primary.random.test_7
 dEQP-VK.protected_memory.buffer.update.unsigned_buffer.primary.random.test_8
 dEQP-VK.protected_memory.buffer.update.unsigned_buffer.primary.random.test_9
 dEQP-VK.protected_memory.buffer.update.unsigned_buffer.primary.random.test_10
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.static.test_1
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.static.test_2
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.static.test_3
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.static.test_4
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.static.test_5
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.static.test_6
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.random.test_1
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.random.test_2
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.random.test_3
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.random.test_4
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.random.test_5
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.random.test_6
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.random.test_7
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.random.test_8
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.random.test_9
+dEQP-VK.protected_memory.buffer.update.unsigned_buffer.secondary.random.test_10
 dEQP-VK.protected_memory.buffer.copy.float_buffer.primary.static.test_1
 dEQP-VK.protected_memory.buffer.copy.float_buffer.primary.static.test_2
 dEQP-VK.protected_memory.buffer.copy.float_buffer.primary.static.test_3
@@ -265788,6 +265968,22 @@ dEQP-VK.protected_memory.buffer.copy.float_buffer.primary.random.test_7
 dEQP-VK.protected_memory.buffer.copy.float_buffer.primary.random.test_8
 dEQP-VK.protected_memory.buffer.copy.float_buffer.primary.random.test_9
 dEQP-VK.protected_memory.buffer.copy.float_buffer.primary.random.test_10
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.static.test_1
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.static.test_2
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.static.test_3
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.static.test_4
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.static.test_5
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.static.test_6
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.random.test_1
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.random.test_2
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.random.test_3
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.random.test_4
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.random.test_5
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.random.test_6
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.random.test_7
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.random.test_8
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.random.test_9
+dEQP-VK.protected_memory.buffer.copy.float_buffer.secondary.random.test_10
 dEQP-VK.protected_memory.buffer.copy.integer_buffer.primary.static.test_1
 dEQP-VK.protected_memory.buffer.copy.integer_buffer.primary.static.test_2
 dEQP-VK.protected_memory.buffer.copy.integer_buffer.primary.static.test_3
@@ -265804,6 +266000,22 @@ dEQP-VK.protected_memory.buffer.copy.integer_buffer.primary.random.test_7
 dEQP-VK.protected_memory.buffer.copy.integer_buffer.primary.random.test_8
 dEQP-VK.protected_memory.buffer.copy.integer_buffer.primary.random.test_9
 dEQP-VK.protected_memory.buffer.copy.integer_buffer.primary.random.test_10
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.static.test_1
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.static.test_2
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.static.test_3
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.static.test_4
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.static.test_5
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.static.test_6
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.random.test_1
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.random.test_2
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.random.test_3
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.random.test_4
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.random.test_5
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.random.test_6
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.random.test_7
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.random.test_8
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.random.test_9
+dEQP-VK.protected_memory.buffer.copy.integer_buffer.secondary.random.test_10
 dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.primary.static.test_1
 dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.primary.static.test_2
 dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.primary.static.test_3
@@ -265820,6 +266032,22 @@ dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.primary.random.test_7
 dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.primary.random.test_8
 dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.primary.random.test_9
 dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.primary.random.test_10
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.static.test_1
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.static.test_2
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.static.test_3
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.static.test_4
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.static.test_5
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.static.test_6
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.random.test_1
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.random.test_2
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.random.test_3
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.random.test_4
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.random.test_5
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.random.test_6
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.random.test_7
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.random.test_8
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.random.test_9
+dEQP-VK.protected_memory.buffer.copy.unsigned_buffer.secondary.random.test_10
 dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.primary.static.copy_1
 dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.primary.static.copy_2
 dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.primary.static.copy_3
@@ -265836,6 +266064,22 @@ dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.primary.random.copy_7
 dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.primary.random.copy_8
 dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.primary.random.copy_9
 dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.primary.random.copy_10
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.static.copy_1
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.static.copy_2
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.static.copy_3
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.static.copy_4
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.static.copy_5
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.static.copy_6
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.random.copy_1
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.random.copy_2
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.random.copy_3
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.random.copy_4
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.random.copy_5
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.random.copy_6
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.random.copy_7
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.random.copy_8
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.random.copy_9
+dEQP-VK.protected_memory.buffer.copy_image_to_float_buffer.secondary.random.copy_10
 dEQP-VK.protected_memory.ssbo.ssbo_read.fragment.static.read_1
 dEQP-VK.protected_memory.ssbo.ssbo_read.fragment.static.read_2
 dEQP-VK.protected_memory.ssbo.ssbo_read.fragment.static.read_3