Snap for 4890645 from f76e580fa8bb208efe75ae875e50f90b0fc692a1 to oreo-mr1-cts-release
Change-Id: I8c9b61084441e5415ed6b2733fc6718032f75b08
diff --git a/android/cts/master/vk-master.txt b/android/cts/master/vk-master.txt
index c9d76f4..ebe1dee 100644
--- a/android/cts/master/vk-master.txt
+++ b/android/cts/master/vk-master.txt
@@ -159812,14 +159812,8 @@
dEQP-VK.renderpass.suballocation.formats.d32_sfloat.input.dont_care.dont_care.clear_draw_use_input_aspect
dEQP-VK.renderpass.suballocation.formats.d32_sfloat.input.dont_care.dont_care.self_dep_clear_draw_use_input_aspect
dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.clear.clear
-dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.clear.clear_depth_read_only
-dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.clear.clear_stencil_read_only
dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.clear.draw
-dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.clear.draw_depth_read_only
-dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.clear.draw_stencil_read_only
dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.clear.clear_draw
-dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.clear.clear_draw_depth_read_only
-dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.clear.clear_draw_stencil_read_only
dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.load.clear
dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.load.clear_depth_read_only
dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.load.clear_stencil_read_only
@@ -160055,14 +160049,8 @@
dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.input.dont_care.dont_care.clear_draw_use_input_aspect_stencil_read_only
dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.input.dont_care.dont_care.self_dep_clear_draw_use_input_aspect_stencil_read_only
dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.clear.clear
-dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.clear.clear_depth_read_only
-dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.clear.clear_stencil_read_only
dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.clear.draw
-dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.clear.draw_depth_read_only
-dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.clear.draw_stencil_read_only
dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.clear.clear_draw
-dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.clear.clear_draw_depth_read_only
-dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.clear.clear_draw_stencil_read_only
dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.load.clear
dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.load.clear_depth_read_only
dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.load.clear_stencil_read_only
@@ -165736,14 +165724,8 @@
dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat.input.dont_care.dont_care.clear_draw_use_input_aspect
dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat.input.dont_care.dont_care.self_dep_clear_draw_use_input_aspect
dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.clear.clear
-dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.clear.clear_depth_read_only
-dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.clear.clear_stencil_read_only
dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.clear.draw
-dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.clear.draw_depth_read_only
-dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.clear.draw_stencil_read_only
dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.clear.clear_draw
-dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.clear.clear_draw_depth_read_only
-dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.clear.clear_draw_stencil_read_only
dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.load.clear
dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.load.clear_depth_read_only
dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.load.clear_stencil_read_only
@@ -165979,14 +165961,8 @@
dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.input.dont_care.dont_care.clear_draw_use_input_aspect_stencil_read_only
dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.input.dont_care.dont_care.self_dep_clear_draw_use_input_aspect_stencil_read_only
dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.clear.clear
-dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.clear.clear_depth_read_only
-dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.clear.clear_stencil_read_only
dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.clear.draw
-dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.clear.draw_depth_read_only
-dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.clear.draw_stencil_read_only
dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.clear.clear_draw
-dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.clear.clear_draw_depth_read_only
-dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.clear.clear_draw_stencil_read_only
dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.load.clear
dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.load.clear_depth_read_only
dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.load.clear_stencil_read_only
diff --git a/external/vulkancts/modules/vulkan/api/vktApiExternalMemoryTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiExternalMemoryTests.cpp
index 13dffec..05fc65c 100644
--- a/external/vulkancts/modules/vulkan/api/vktApiExternalMemoryTests.cpp
+++ b/external/vulkancts/modules/vulkan/api/vktApiExternalMemoryTests.cpp
@@ -493,6 +493,71 @@
VK_CHECK(vkd.queueSubmit(queue, 1, &submit, (vk::VkFence)0u));
}
+void submitDummySignalAndGetSemaphoreNative ( const vk::DeviceInterface& vk,
+ vk::VkDevice device,
+ vk::VkQueue queue,
+ deUint32 queueFamilyIndex,
+ vk::VkSemaphore semaphore,
+ vk::VkExternalSemaphoreHandleTypeFlagBitsKHR externalType,
+ NativeHandle& nativeHandle)
+{
+ const vk::Unique<vk::VkCommandPool> cmdPool(createCommandPool(vk, device, vk::VK_COMMAND_POOL_CREATE_TRANSIENT_BIT, queueFamilyIndex, DE_NULL));
+ const vk::Unique<vk::VkCommandBuffer> cmdBuffer(allocateCommandBuffer(vk, device, *cmdPool, vk::VK_COMMAND_BUFFER_LEVEL_PRIMARY));
+
+ const vk::VkEventCreateInfo eventCreateInfo =
+ {
+ vk::VK_STRUCTURE_TYPE_EVENT_CREATE_INFO,
+ DE_NULL,
+ 0u
+ };
+
+ const vk::Unique<vk::VkEvent> event(createEvent(vk, device, &eventCreateInfo, DE_NULL));
+
+ const vk::VkCommandBufferBeginInfo cmdBufferBeginInfo =
+ {
+ vk::VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO,
+ DE_NULL,
+ vk::VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT,
+ DE_NULL,
+ };
+
+ VK_CHECK(vk.beginCommandBuffer(*cmdBuffer, &cmdBufferBeginInfo));
+ /*
+ The submitDummySignal function calls vkQueueSubmit with an empty VkSubmitInfo structure and a
+ VkSemaphore to be signalled when the work is finished. Because there is no work in the submission, vkQueueSubmit
+ may signal the semaphore immediately. When a semaphore's file descriptor is obtained using vkGetFenceFdKHR, if the
+ handle type is VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT_KHR, vkGetFenceFdKHR is allowed to return -1 if the fence
+ is already signalled, instead of a file descriptor, . In order to make sure that a valid file descriptor is returned
+ we use vkCmdWaitEvents to make sure that vkQueueSubmit doesn't signal the fence.
+ */
+ vk.cmdWaitEvents(*cmdBuffer, 1, &event.get(), vk::VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, 0, DE_NULL, 0, DE_NULL, 0, DE_NULL);
+ vk.endCommandBuffer(*cmdBuffer);
+
+ const vk::VkSubmitInfo submit =
+ {
+ vk::VK_STRUCTURE_TYPE_SUBMIT_INFO,
+ DE_NULL,
+
+ 0u,
+ DE_NULL,
+ DE_NULL,
+
+ 1u,
+ &cmdBuffer.get(),
+
+ 1u,
+ &semaphore
+ };
+
+ VK_CHECK(vk.queueSubmit(queue, 1, &submit, (vk::VkFence)0u));
+
+ getSemaphoreNative(vk, device, semaphore, externalType, nativeHandle);
+
+ VK_CHECK(vk.setEvent(device, *event));
+
+ VK_CHECK(vk.queueWaitIdle(queue));
+}
+
void submitDummyWait (const vk::DeviceInterface& vkd,
vk::VkQueue queue,
vk::VkSemaphore semaphore)
@@ -540,6 +605,71 @@
VK_CHECK(vkd.queueSubmit(queue, 1, &submit, fence));
}
+void submitDummySignalAndGetFenceNative ( const vk::DeviceInterface& vk,
+ vk::VkDevice device,
+ vk::VkQueue queue,
+ deUint32 queueFamilyIndex,
+ vk::VkFence fence,
+ vk::VkExternalFenceHandleTypeFlagBitsKHR externalType,
+ NativeHandle& nativeHandle)
+{
+ const vk::Unique<vk::VkCommandPool> cmdPool(createCommandPool(vk, device, vk::VK_COMMAND_POOL_CREATE_TRANSIENT_BIT, queueFamilyIndex, DE_NULL));
+ const vk::Unique<vk::VkCommandBuffer> cmdBuffer(allocateCommandBuffer(vk, device, *cmdPool, vk::VK_COMMAND_BUFFER_LEVEL_PRIMARY));
+
+ const vk::VkEventCreateInfo eventCreateInfo =
+ {
+ vk::VK_STRUCTURE_TYPE_EVENT_CREATE_INFO,
+ DE_NULL,
+ 0u
+ };
+
+ const vk::Unique<vk::VkEvent> event(createEvent(vk, device, &eventCreateInfo, DE_NULL));
+
+ const vk::VkCommandBufferBeginInfo cmdBufferBeginInfo =
+ {
+ vk::VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO,
+ DE_NULL,
+ vk::VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT,
+ DE_NULL,
+ };
+
+ VK_CHECK(vk.beginCommandBuffer(*cmdBuffer, &cmdBufferBeginInfo));
+ /*
+ The submitDummySignal function calls vkQueueSubmit with an empty VkSubmitInfo structure and a
+ VkFence to be signalled when the work is finished. Because there is no work in the submission, vkQueueSubmit
+ could signal the fence immediately. When a fence's file descriptor is obtained using vkGetFenceFdKHR, if the
+ handle type is VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT_KHR, vkGetFenceFdKHR is allowed to return -1 instead of a
+ file descriptor, if the fence is already signalled. In order to make sure that a valid file descriptor is returned
+ we use vkCmdWaitEvents to make sure that vkQueueSubmit doesn't signal the fence.
+ */
+ vk.cmdWaitEvents(*cmdBuffer, 1, &event.get(), vk::VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, 0, DE_NULL, 0, DE_NULL, 0, DE_NULL);
+ vk.endCommandBuffer(*cmdBuffer);
+
+ const vk::VkSubmitInfo submit =
+ {
+ vk::VK_STRUCTURE_TYPE_SUBMIT_INFO,
+ DE_NULL,
+
+ 0u,
+ DE_NULL,
+ DE_NULL,
+
+ 1u,
+ &cmdBuffer.get(),
+
+ 0u,
+ DE_NULL
+ };
+
+ VK_CHECK(vk.queueSubmit(queue, 1, &submit, fence));
+
+ getFenceNative(vk, device, fence, externalType, nativeHandle);
+
+ VK_CHECK(vk.setEvent(device, *event));
+
+ VK_CHECK(vk.queueWaitIdle(queue));
+}
+
tcu::TestStatus testSemaphoreQueries (Context& context, vk::VkExternalSemaphoreHandleTypeFlagBitsKHR externalType)
{
const vk::PlatformInterface& vkp (context.getPlatformInterface());
@@ -675,12 +805,12 @@
const vk::DeviceDriver vkd (vki, *device);
const vk::VkQueue queue (getQueue(vkd, *device, queueFamilyIndex));
const vk::Unique<vk::VkSemaphore> semaphore (createExportableSemaphore(vkd, *device, config.externalType));
+ NativeHandle handleA;
if (transference == TRANSFERENCE_COPY)
- submitDummySignal(vkd, queue, *semaphore);
-
- NativeHandle handleA;
- getSemaphoreNative(vkd, *device, *semaphore, config.externalType, handleA);
+ submitDummySignalAndGetSemaphoreNative(vkd, *device, queue, queueFamilyIndex, *semaphore, config.externalType, handleA);
+ else
+ getSemaphoreNative(vkd, *device, *semaphore, config.externalType, handleA);
{
NativeHandle handleB (handleA);
@@ -723,12 +853,12 @@
const vk::VkQueue queue (getQueue(vkd, *device, queueFamilyIndex));
const vk::Unique<vk::VkSemaphore> semaphoreA (createExportableSemaphore(vkd, *device, config.externalType));
+ NativeHandle handleA;
if (transference == TRANSFERENCE_COPY)
- submitDummySignal(vkd, queue, *semaphoreA);
-
- NativeHandle handleA;
- getSemaphoreNative(vkd, *device, *semaphoreA, config.externalType, handleA);
+ submitDummySignalAndGetSemaphoreNative(vkd, *device, queue, queueFamilyIndex, *semaphoreA, config.externalType, handleA);
+ else
+ getSemaphoreNative(vkd, *device, *semaphoreA, config.externalType, handleA);
NativeHandle handleB (handleA);
const vk::VkSemaphoreImportFlagsKHR flags = config.permanence == PERMANENCE_TEMPORARY ? vk::VK_SEMAPHORE_IMPORT_TEMPORARY_BIT_KHR : (vk::VkSemaphoreImportFlagBitsKHR)0u;
@@ -768,13 +898,10 @@
const vk::DeviceDriver vkd (vki, *device);
const vk::VkQueue queue (getQueue(vkd, *device, queueFamilyIndex));
const vk::Unique<vk::VkSemaphore> semaphoreA (createExportableSemaphore(vkd, *device, config.externalType));
-
- submitDummySignal(vkd, queue, *semaphoreA);
-
{
NativeHandle handle;
- getSemaphoreNative(vkd, *device, *semaphoreA, config.externalType, handle);
+ submitDummySignalAndGetSemaphoreNative(vkd, *device, queue, queueFamilyIndex, *semaphoreA, config.externalType, handle);
{
const vk::VkSemaphoreImportFlagsKHR flags = config.permanence == PERMANENCE_TEMPORARY ? vk::VK_SEMAPHORE_IMPORT_TEMPORARY_BIT_KHR : (vk::VkSemaphoreImportFlagBitsKHR)0u;
@@ -847,7 +974,7 @@
const vk::Unique<vk::VkSemaphore> semaphoreA (createExportableSemaphore(vkd, *device, config.externalType));
NativeHandle handle;
- getSemaphoreNative(vkd, *device, *semaphoreA, config.externalType, handle);
+ submitDummySignalAndGetSemaphoreNative(vkd, *device, queue, queueFamilyIndex, *semaphoreA, config.externalType, handle);
const vk::Unique<vk::VkSemaphore> semaphoreB (createAndImportSemaphore(vkd, *device, config.externalType, handle, flags));
@@ -886,9 +1013,9 @@
VK_CHECK(vkd.queueWaitIdle(queue));
if (transference == TRANSFERENCE_COPY)
- submitDummySignal(vkd, queue, *semaphoreA);
-
- getSemaphoreNative(vkd, *device, *semaphoreA, config.externalType, handle);
+ submitDummySignalAndGetSemaphoreNative(vkd, *device, queue, queueFamilyIndex, *semaphoreA, config.externalType, handle);
+ else
+ getSemaphoreNative(vkd, *device, *semaphoreA, config.externalType, handle);
importSemaphore(vkd, *device, *semaphoreB, config.externalType, handle, flags);
@@ -931,9 +1058,9 @@
NativeHandle handle;
if (transference == TRANSFERENCE_COPY)
- submitDummySignal(vkd, queue, *semaphoreA);
-
- getSemaphoreNative(vkd, *device, *semaphoreA, config.externalType, handle);
+ submitDummySignalAndGetSemaphoreNative(vkd, *device, queue, queueFamilyIndex, *semaphoreA, config.externalType, handle);
+ else
+ getSemaphoreNative(vkd, *device, *semaphoreA, config.externalType, handle);
submitDummySignal(vkd, queue, *semaphoreB);
submitDummyWait(vkd, queue, *semaphoreB);
@@ -982,9 +1109,9 @@
NativeHandle handle;
if (transference == TRANSFERENCE_COPY)
- submitDummySignal(vkd, queue, *semaphore);
-
- getSemaphoreNative(vkd, *device, *semaphore, config.externalType, handle);
+ submitDummySignalAndGetSemaphoreNative(vkd, *device, queue, queueFamilyIndex, *semaphore, config.externalType, handle);
+ else
+ getSemaphoreNative(vkd, *device, *semaphore, config.externalType, handle);
}
submitDummySignal(vkd, queue, *semaphore);
@@ -1018,9 +1145,9 @@
NativeHandle handleA;
if (transference == TRANSFERENCE_COPY)
- submitDummySignal(vkd, queue, *semaphoreA);
-
- getSemaphoreNative(vkd, *device, *semaphoreA, config.externalType, handleA);
+ submitDummySignalAndGetSemaphoreNative(vkd, *device, queue, queueFamilyIndex, *semaphoreA, config.externalType, handleA);
+ else
+ getSemaphoreNative(vkd, *device, *semaphoreA, config.externalType, handleA);
for (size_t importNdx = 0; importNdx < importCount; importNdx++)
{
@@ -1068,9 +1195,7 @@
const vk::Unique<vk::VkSemaphore> semaphoreA (createExportableSemaphore(vkd, *device, config.externalType));
NativeHandle handle;
- submitDummySignal(vkd, queue, *semaphoreA);
-
- getSemaphoreNative(vkd, *device, *semaphoreA, config.externalType, handle);
+ submitDummySignalAndGetSemaphoreNative(vkd, *device, queue, queueFamilyIndex, *semaphoreA, config.externalType, handle);
{
const vk::Unique<vk::VkSemaphore> semaphoreB (createAndImportSemaphore(vkd, *device, config.externalType, handle, flags));
@@ -1163,11 +1288,14 @@
TestLog& log = context.getTestContext().getLog();
const vk::Unique<vk::VkSemaphore> semaphoreA (createExportableSemaphore(vkd, *device, config.externalType));
- if (transference == TRANSFERENCE_COPY)
- submitDummySignal(vkd, queue, *semaphoreA);
-
{
- const NativeHandle fd (getSemaphoreFd(vkd, *device, *semaphoreA, config.externalType));
+ NativeHandle fd;
+
+ if (transference == TRANSFERENCE_COPY)
+ submitDummySignalAndGetSemaphoreNative(vkd, *device, queue, queueFamilyIndex, *semaphoreA, config.externalType, fd);
+ else
+ getSemaphoreNative(vkd, *device, *semaphoreA, config.externalType, fd);
+
NativeHandle newFd (dup(fd.getFd()));
if (newFd.getFd() < 0)
@@ -1224,15 +1352,20 @@
const vk::Unique<vk::VkSemaphore> semaphoreA (createExportableSemaphore(vkd, *device, config.externalType));
const vk::Unique<vk::VkSemaphore> semaphoreB (createExportableSemaphore(vkd, *device, config.externalType));
- if (transference == TRANSFERENCE_COPY)
{
- submitDummySignal(vkd, queue, *semaphoreA);
- submitDummySignal(vkd, queue, *semaphoreB);
- }
+ NativeHandle fd, secondFd;
- {
- const NativeHandle fd (getSemaphoreFd(vkd, *device, *semaphoreA, config.externalType));
- NativeHandle secondFd (getSemaphoreFd(vkd, *device, *semaphoreB, config.externalType));
+ if (transference == TRANSFERENCE_COPY)
+ {
+ submitDummySignalAndGetSemaphoreNative(vkd, *device, queue, queueFamilyIndex, *semaphoreA, config.externalType, fd);
+ submitDummySignalAndGetSemaphoreNative(vkd, *device, queue, queueFamilyIndex, *semaphoreB, config.externalType, secondFd);
+ }
+ else
+ {
+ getSemaphoreNative(vkd, *device, *semaphoreA, config.externalType, fd);
+ getSemaphoreNative(vkd, *device, *semaphoreB, config.externalType, secondFd);
+ }
+
int newFd (dup2(fd.getFd(), secondFd.getFd()));
if (newFd < 0)
@@ -1288,16 +1421,21 @@
const vk::Unique<vk::VkSemaphore> semaphoreA (createExportableSemaphore(vkd, *device, config.externalType));
const vk::Unique<vk::VkSemaphore> semaphoreB (createExportableSemaphore(vkd, *device, config.externalType));
- if (transference == TRANSFERENCE_COPY)
{
- submitDummySignal(vkd, queue, *semaphoreA);
- submitDummySignal(vkd, queue, *semaphoreB);
- }
+ NativeHandle fd, secondFd;
- {
+ if (transference == TRANSFERENCE_COPY)
+ {
+ submitDummySignalAndGetSemaphoreNative(vkd, *device, queue, queueFamilyIndex, *semaphoreA, config.externalType, fd);
+ submitDummySignalAndGetSemaphoreNative(vkd, *device, queue, queueFamilyIndex, *semaphoreB, config.externalType, secondFd);
+ }
+ else
+ {
+ getSemaphoreNative(vkd, *device, *semaphoreA, config.externalType, fd);
+ getSemaphoreNative(vkd, *device, *semaphoreB, config.externalType, secondFd);
+ }
+
const vk::VkSemaphoreImportFlagsKHR flags = config.permanence == PERMANENCE_TEMPORARY ? vk::VK_SEMAPHORE_IMPORT_TEMPORARY_BIT_KHR : (vk::VkSemaphoreImportFlagBitsKHR)0u;
- const NativeHandle fd (getSemaphoreFd(vkd, *device, *semaphoreA, config.externalType));
- NativeHandle secondFd (getSemaphoreFd(vkd, *device, *semaphoreB, config.externalType));
const int newFd (dup3(fd.getFd(), secondFd.getFd(), 0));
if (newFd < 0)
@@ -1351,11 +1489,12 @@
TestLog& log = context.getTestContext().getLog();
const vk::Unique<vk::VkSemaphore> semaphore (createExportableSemaphore(vkd, *device, config.externalType));
+ NativeHandle fd;
if (transference == TRANSFERENCE_COPY)
- submitDummySignal(vkd, queue, *semaphore);
-
- const NativeHandle fd (getSemaphoreFd(vkd, *device, *semaphore, config.externalType));
+ submitDummySignalAndGetSemaphoreNative(vkd, *device, queue, queueFamilyIndex, *semaphore, config.externalType, fd);
+ else
+ getSemaphoreNative(vkd, *device, *semaphore, config.externalType, fd);
{
int sv[2];
@@ -1606,12 +1745,12 @@
const vk::DeviceDriver vkd (vki, *device);
const vk::VkQueue queue (getQueue(vkd, *device, queueFamilyIndex));
const vk::Unique<vk::VkFence> fence (createExportableFence(vkd, *device, config.externalType));
+ NativeHandle handleA;
if (transference == TRANSFERENCE_COPY)
- submitDummySignal(vkd, queue, *fence);
-
- NativeHandle handleA;
- getFenceNative(vkd, *device, *fence, config.externalType, handleA);
+ submitDummySignalAndGetFenceNative(vkd, *device, queue, queueFamilyIndex, *fence, config.externalType, handleA);
+ else
+ getFenceNative(vkd, *device, *fence, config.externalType, handleA);
{
NativeHandle handleB (handleA);
@@ -1654,12 +1793,12 @@
const vk::VkQueue queue (getQueue(vkd, *device, queueFamilyIndex));
const vk::Unique<vk::VkFence> fenceA (createExportableFence(vkd, *device, config.externalType));
+ NativeHandle handleA;
if (transference == TRANSFERENCE_COPY)
- submitDummySignal(vkd, queue, *fenceA);
-
- NativeHandle handleA;
- getFenceNative(vkd, *device, *fenceA, config.externalType, handleA);
+ submitDummySignalAndGetFenceNative(vkd, *device, queue, queueFamilyIndex, *fenceA, config.externalType, handleA);
+ else
+ getFenceNative(vkd, *device, *fenceA, config.externalType, handleA);
NativeHandle handleB (handleA);
const vk::VkFenceImportFlagsKHR flags = config.permanence == PERMANENCE_TEMPORARY ? vk::VK_FENCE_IMPORT_TEMPORARY_BIT_KHR : (vk::VkFenceImportFlagBitsKHR)0u;
@@ -1700,12 +1839,10 @@
const vk::VkQueue queue (getQueue(vkd, *device, queueFamilyIndex));
const vk::Unique<vk::VkFence> fenceA (createExportableFence(vkd, *device, config.externalType));
- submitDummySignal(vkd, queue, *fenceA);
-
{
NativeHandle handle;
- getFenceNative(vkd, *device, *fenceA, config.externalType, handle);
+ submitDummySignalAndGetFenceNative(vkd, *device, queue, queueFamilyIndex, *fenceA, config.externalType, handle);
{
const vk::VkFenceImportFlagsKHR flags = config.permanence == PERMANENCE_TEMPORARY ? vk::VK_FENCE_IMPORT_TEMPORARY_BIT_KHR : (vk::VkFenceImportFlagBitsKHR)0u;
@@ -1817,9 +1954,9 @@
VK_CHECK(vkd.queueWaitIdle(queue));
if (transference == TRANSFERENCE_COPY)
- submitDummySignal(vkd, queue, *fenceA);
-
- getFenceNative(vkd, *device, *fenceA, config.externalType, handle);
+ submitDummySignalAndGetFenceNative(vkd, *device, queue, queueFamilyIndex, *fenceA, config.externalType, handle);
+ else
+ getFenceNative(vkd, *device, *fenceA, config.externalType, handle);
importFence(vkd, *device, *fenceB, config.externalType, handle, flags);
@@ -1865,9 +2002,7 @@
submitDummySignal(vkd, queue, *fenceB);
VK_CHECK(vkd.queueWaitIdle(queue));
- submitDummySignal(vkd, queue, *fenceA);
-
- getFenceNative(vkd, *device, *fenceA, config.externalType, handle);
+ submitDummySignalAndGetFenceNative(vkd, *device, queue, queueFamilyIndex, *fenceA, config.externalType, handle);
{
NativeHandle handleB (handle);
importFence(vkd, *device, *fenceB, config.externalType, handleB, flags);
@@ -1931,9 +2066,9 @@
NativeHandle handle;
if (transference == TRANSFERENCE_COPY)
- submitDummySignal(vkd, queue, *fenceA);
-
- getFenceNative(vkd, *device, *fenceA, config.externalType, handle);
+ submitDummySignalAndGetFenceNative(vkd, *device, queue, queueFamilyIndex, *fenceA, config.externalType, handle);
+ else
+ getFenceNative(vkd, *device, *fenceA, config.externalType, handle);
submitDummySignal(vkd, queue, *fenceB);
VK_CHECK(vkd.waitForFences(*device, 1u, &*fenceB, VK_TRUE, ~0ull));
@@ -1982,9 +2117,9 @@
NativeHandle handle;
if (transference == TRANSFERENCE_COPY)
- submitDummySignal(vkd, queue, *fence);
-
- getFenceNative(vkd, *device, *fence, config.externalType, handle);
+ submitDummySignalAndGetFenceNative(vkd, *device, queue, queueFamilyIndex, *fence, config.externalType, handle);
+ else
+ getFenceNative(vkd, *device, *fence, config.externalType, handle);
}
submitDummySignal(vkd, queue, *fence);
@@ -2018,9 +2153,9 @@
NativeHandle handleA;
if (transference == TRANSFERENCE_COPY)
- submitDummySignal(vkd, queue, *fenceA);
-
- getFenceNative(vkd, *device, *fenceA, config.externalType, handleA);
+ submitDummySignalAndGetFenceNative(vkd, *device, queue, queueFamilyIndex, *fenceA, config.externalType, handleA);
+ else
+ getFenceNative(vkd, *device, *fenceA, config.externalType, handleA);
for (size_t importNdx = 0; importNdx < importCount; importNdx++)
{
@@ -2068,9 +2203,7 @@
const vk::Unique<vk::VkFence> fenceA (createExportableFence(vkd, *device, config.externalType));
NativeHandle handle;
- submitDummySignal(vkd, queue, *fenceA);
-
- getFenceNative(vkd, *device, *fenceA, config.externalType, handle);
+ submitDummySignalAndGetFenceNative(vkd, *device, queue, queueFamilyIndex, *fenceA, config.externalType, handle);
{
const vk::Unique<vk::VkFence> fenceB (createAndImportFence(vkd, *device, config.externalType, handle, flags));
@@ -2169,11 +2302,14 @@
TestLog& log = context.getTestContext().getLog();
const vk::Unique<vk::VkFence> fenceA (createExportableFence(vkd, *device, config.externalType));
- if (transference == TRANSFERENCE_COPY)
- submitDummySignal(vkd, queue, *fenceA);
-
{
- const NativeHandle fd (getFenceFd(vkd, *device, *fenceA, config.externalType));
+ NativeHandle fd;
+
+ if (transference == TRANSFERENCE_COPY)
+ submitDummySignalAndGetFenceNative(vkd, *device, queue, queueFamilyIndex, *fenceA, config.externalType, fd);
+ else
+ getFenceNative(vkd, *device, *fenceA, config.externalType, fd);
+
NativeHandle newFd (dup(fd.getFd()));
if (newFd.getFd() < 0)
@@ -2230,15 +2366,20 @@
const vk::Unique<vk::VkFence> fenceA (createExportableFence(vkd, *device, config.externalType));
const vk::Unique<vk::VkFence> fenceB (createExportableFence(vkd, *device, config.externalType));
- if (transference == TRANSFERENCE_COPY)
{
- submitDummySignal(vkd, queue, *fenceA);
- submitDummySignal(vkd, queue, *fenceB);
- }
+ NativeHandle fd, secondFd;
- {
- const NativeHandle fd (getFenceFd(vkd, *device, *fenceA, config.externalType));
- NativeHandle secondFd (getFenceFd(vkd, *device, *fenceB, config.externalType));
+ if (transference == TRANSFERENCE_COPY)
+ {
+ submitDummySignalAndGetFenceNative(vkd, *device, queue, queueFamilyIndex, *fenceA, config.externalType, fd);
+ submitDummySignalAndGetFenceNative(vkd, *device, queue, queueFamilyIndex, *fenceB, config.externalType, secondFd);
+ }
+ else
+ {
+ getFenceNative(vkd, *device, *fenceA, config.externalType, fd);
+ getFenceNative(vkd, *device, *fenceB, config.externalType, secondFd);
+ }
+
int newFd (dup2(fd.getFd(), secondFd.getFd()));
if (newFd < 0)
@@ -2294,16 +2435,21 @@
const vk::Unique<vk::VkFence> fenceA (createExportableFence(vkd, *device, config.externalType));
const vk::Unique<vk::VkFence> fenceB (createExportableFence(vkd, *device, config.externalType));
- if (transference == TRANSFERENCE_COPY)
{
- submitDummySignal(vkd, queue, *fenceA);
- submitDummySignal(vkd, queue, *fenceB);
- }
+ NativeHandle fd, secondFd;
- {
+ if (transference == TRANSFERENCE_COPY)
+ {
+ submitDummySignalAndGetFenceNative(vkd, *device, queue, queueFamilyIndex, *fenceA, config.externalType, fd);
+ submitDummySignalAndGetFenceNative(vkd, *device, queue, queueFamilyIndex, *fenceB, config.externalType, secondFd);
+ }
+ else
+ {
+ getFenceNative(vkd, *device, *fenceA, config.externalType, fd);
+ getFenceNative(vkd, *device, *fenceB, config.externalType, secondFd);
+ }
+
const vk::VkFenceImportFlagsKHR flags = config.permanence == PERMANENCE_TEMPORARY ? vk::VK_FENCE_IMPORT_TEMPORARY_BIT_KHR : (vk::VkFenceImportFlagBitsKHR)0u;
- const NativeHandle fd (getFenceFd(vkd, *device, *fenceA, config.externalType));
- NativeHandle secondFd (getFenceFd(vkd, *device, *fenceB, config.externalType));
const int newFd (dup3(fd.getFd(), secondFd.getFd(), 0));
if (newFd < 0)
@@ -2357,11 +2503,12 @@
TestLog& log = context.getTestContext().getLog();
const vk::Unique<vk::VkFence> fence (createExportableFence(vkd, *device, config.externalType));
+ NativeHandle fd;
if (transference == TRANSFERENCE_COPY)
- submitDummySignal(vkd, queue, *fence);
-
- const NativeHandle fd (getFenceFd(vkd, *device, *fence, config.externalType));
+ submitDummySignalAndGetFenceNative(vkd, *device, queue, queueFamilyIndex, *fence, config.externalType, fd);
+ else
+ getFenceNative(vkd, *device, *fence, config.externalType, fd);
{
int sv[2];
diff --git a/external/vulkancts/modules/vulkan/geometry/vktGeometryBasicGeometryShaderTests.cpp b/external/vulkancts/modules/vulkan/geometry/vktGeometryBasicGeometryShaderTests.cpp
index 4508bb9..3afe635 100644
--- a/external/vulkancts/modules/vulkan/geometry/vktGeometryBasicGeometryShaderTests.cpp
+++ b/external/vulkancts/modules/vulkan/geometry/vktGeometryBasicGeometryShaderTests.cpp
@@ -1035,12 +1035,13 @@
<< " const vec4 blue = vec4(0.0, 0.0, 1.0, 1.0);\n"
<< " const vec4 yellow = vec4(1.0, 1.0, 0.0, 1.0);\n"
<< " const vec4 colors[4] = vec4[4](red, green, blue, yellow);\n"
- << " for (float percent=0.00; percent < 0.30; percent+=0.10)\n"
- "{\n"
- << " gl_Position = gl_in[0].gl_Position * vec4(1.0+percent, 1.0+percent, 1.0, 1.0);\n"
+ << " for (int counter = 0; counter < 3; ++counter)\n"
+ << " {\n"
+ << " float percent = 0.1 * counter;\n"
+ << " gl_Position = gl_in[0].gl_Position * vec4(1.0 + percent, 1.0 + percent, 1.0, 1.0);\n"
<< " v_frag_FragColor = colors[gl_PrimitiveIDIn % 4];\n"
<< " EmitVertex();\n"
- << " gl_Position = gl_in[1].gl_Position * vec4(1.0+percent, 1.0+percent, 1.0, 1.0);\n"
+ << " gl_Position = gl_in[1].gl_Position * vec4(1.0 + percent, 1.0 + percent, 1.0, 1.0);\n"
<< " v_frag_FragColor = colors[gl_PrimitiveIDIn % 4];\n"
<< " EmitVertex();\n"
<< " }\n"
diff --git a/external/vulkancts/modules/vulkan/memory/vktMemoryBindingTests.cpp b/external/vulkancts/modules/vulkan/memory/vktMemoryBindingTests.cpp
index 6e47e24..3764625 100644
--- a/external/vulkancts/modules/vulkan/memory/vktMemoryBindingTests.cpp
+++ b/external/vulkancts/modules/vulkan/memory/vktMemoryBindingTests.cpp
@@ -93,6 +93,14 @@
VK_CHECK(vk.flushMappedMemoryRanges(dev, 1u, &range));
}
+ void invalidate (VkDeviceSize offset,
+ VkDeviceSize size)
+ {
+ const VkMappedMemoryRange range = makeMemoryRange(offset, size);
+ VK_CHECK(vk.invalidateMappedMemoryRanges(dev, 1u, &range));
+ }
+
+
protected:
const DeviceInterface& vk;
const VkDevice& dev;
@@ -818,6 +826,8 @@
deUint8* hostBuffer = static_cast<deUint8*>(hostMemory.ptr());
SimpleRandomGenerator random (dataSeed);
+ hostMemory.invalidate(0u, params.bufferSize);
+
for (deUint32 i = 0u; i < params.bufferSize; ++i)
{
if (hostBuffer[i] != static_cast<deUint8>(random.getNext() & 0xFFu) )
diff --git a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassTests.cpp b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassTests.cpp
index 68faea6..7237e30 100644
--- a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassTests.cpp
+++ b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassTests.cpp
@@ -677,7 +677,7 @@
const vector<Attachment>& getAttachments (void) const { return m_attachments; }
const vector<Subpass>& getSubpasses (void) const { return m_subpasses; }
const vector<SubpassDependency>& getDependencies (void) const { return m_dependencies; }
- const vector<VkInputAttachmentAspectReferenceKHR> getInputAspects (void) const { return m_inputAspects; }
+ const vector<VkInputAttachmentAspectReferenceKHR>& getInputAspects (void) const { return m_inputAspects; }
private:
const vector<Attachment> m_attachments;
@@ -5849,7 +5849,7 @@
addFunctionCaseWithPrograms<TestConfig>(loadOpGroup.get(), renderTypes[renderTypeNdx].str, renderTypes[renderTypeNdx].str, createTestShaders, renderPassTest, TestConfig(renderPass, renderTypes[renderTypeNdx].types, TestConfig::COMMANDBUFFERTYPES_INLINE, TestConfig::IMAGEMEMORY_STRICT, targetSize, renderPos, renderSize, 90239, allocationKind));
}
- if (isStencilAttachment && isDepthAttachment)
+ if (isStencilAttachment && isDepthAttachment && loadOp != VK_ATTACHMENT_LOAD_OP_CLEAR)
{
{
const RenderPass renderPass (vector<Attachment>(1, Attachment(vkFormat,
diff --git a/external/vulkancts/mustpass/1.0.2/vk-default.txt b/external/vulkancts/mustpass/1.0.2/vk-default.txt
index b1e635f..a696771 100644
--- a/external/vulkancts/mustpass/1.0.2/vk-default.txt
+++ b/external/vulkancts/mustpass/1.0.2/vk-default.txt
@@ -159805,14 +159805,8 @@
dEQP-VK.renderpass.suballocation.formats.d32_sfloat.input.dont_care.dont_care.clear_draw_use_input_aspect
dEQP-VK.renderpass.suballocation.formats.d32_sfloat.input.dont_care.dont_care.self_dep_clear_draw_use_input_aspect
dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.clear.clear
-dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.clear.clear_depth_read_only
-dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.clear.clear_stencil_read_only
dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.clear.draw
-dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.clear.draw_depth_read_only
-dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.clear.draw_stencil_read_only
dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.clear.clear_draw
-dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.clear.clear_draw_depth_read_only
-dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.clear.clear_draw_stencil_read_only
dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.load.clear
dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.load.clear_depth_read_only
dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.load.clear_stencil_read_only
@@ -160048,14 +160042,8 @@
dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.input.dont_care.dont_care.clear_draw_use_input_aspect_stencil_read_only
dEQP-VK.renderpass.suballocation.formats.d24_unorm_s8_uint.input.dont_care.dont_care.self_dep_clear_draw_use_input_aspect_stencil_read_only
dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.clear.clear
-dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.clear.clear_depth_read_only
-dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.clear.clear_stencil_read_only
dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.clear.draw
-dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.clear.draw_depth_read_only
-dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.clear.draw_stencil_read_only
dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.clear.clear_draw
-dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.clear.clear_draw_depth_read_only
-dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.clear.clear_draw_stencil_read_only
dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.load.clear
dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.load.clear_depth_read_only
dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.load.clear_stencil_read_only
@@ -165729,14 +165717,8 @@
dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat.input.dont_care.dont_care.clear_draw_use_input_aspect
dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat.input.dont_care.dont_care.self_dep_clear_draw_use_input_aspect
dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.clear.clear
-dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.clear.clear_depth_read_only
-dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.clear.clear_stencil_read_only
dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.clear.draw
-dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.clear.draw_depth_read_only
-dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.clear.draw_stencil_read_only
dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.clear.clear_draw
-dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.clear.clear_draw_depth_read_only
-dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.clear.clear_draw_stencil_read_only
dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.load.clear
dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.load.clear_depth_read_only
dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.load.clear_stencil_read_only
@@ -165972,14 +165954,8 @@
dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.input.dont_care.dont_care.clear_draw_use_input_aspect_stencil_read_only
dEQP-VK.renderpass.dedicated_allocation.formats.d24_unorm_s8_uint.input.dont_care.dont_care.self_dep_clear_draw_use_input_aspect_stencil_read_only
dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.clear.clear
-dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.clear.clear_depth_read_only
-dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.clear.clear_stencil_read_only
dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.clear.draw
-dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.clear.draw_depth_read_only
-dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.clear.draw_stencil_read_only
dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.clear.clear_draw
-dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.clear.clear_draw_depth_read_only
-dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.clear.clear_draw_stencil_read_only
dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.load.clear
dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.load.clear_depth_read_only
dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.load.clear_stencil_read_only