Add tests for VK_EXT_private_data
authorJeff Bolz <jbolz@nvidia.com>
Sun, 5 Apr 2020 07:02:52 +0000 (02:02 -0500)
committerAlexander Galazin <alexander.galazin@arm.com>
Sat, 4 Jul 2020 07:58:11 +0000 (09:58 +0200)
Component: Vulkan
New Tests: dEQP-VK.api.object_management.private_data.*
New Tests: dEQP-VK.wsi.*.private_data.*

Change-Id: I465e0969cc5f1e82dc2e1face019412ecfb44e27

android/cts/master/vk-master-2020-03-01.txt
android/cts/master/vk-master.txt
external/vulkancts/framework/vulkan/vkObjTypeImpl.inl [new file with mode: 0644]
external/vulkancts/modules/vulkan/api/vktApiObjectManagementTests.cpp
external/vulkancts/modules/vulkan/wsi/vktWsiSwapchainTests.cpp
external/vulkancts/mustpass/master/vk-default.txt
external/vulkancts/scripts/gen_framework.py [changed mode: 0644->0755]

index 64bfa9b..e5a9b67 100644 (file)
@@ -27,6 +27,46 @@ dEQP-VK.api.info.vulkan1p2_limits_validation.ext_line_rasterization
 dEQP-VK.api.device_init.create_instance_extension_name_abuse
 dEQP-VK.api.device_init.create_instance_layer_name_abuse
 dEQP-VK.api.device_init.enumerate_devices_alloc_leak
 dEQP-VK.api.device_init.create_instance_extension_name_abuse
 dEQP-VK.api.device_init.create_instance_layer_name_abuse
 dEQP-VK.api.device_init.enumerate_devices_alloc_leak
+dEQP-VK.api.object_management.private_data.device_memory_small
+dEQP-VK.api.object_management.private_data.buffer_uniform_small
+dEQP-VK.api.object_management.private_data.buffer_uniform_large
+dEQP-VK.api.object_management.private_data.buffer_storage_small
+dEQP-VK.api.object_management.private_data.buffer_storage_large
+dEQP-VK.api.object_management.private_data.buffer_view_uniform_r8g8b8a8_unorm
+dEQP-VK.api.object_management.private_data.buffer_view_storage_r8g8b8a8_unorm
+dEQP-VK.api.object_management.private_data.image_1d
+dEQP-VK.api.object_management.private_data.image_2d
+dEQP-VK.api.object_management.private_data.image_3d
+dEQP-VK.api.object_management.private_data.image_view_1d
+dEQP-VK.api.object_management.private_data.image_view_1d_arr
+dEQP-VK.api.object_management.private_data.image_view_2d
+dEQP-VK.api.object_management.private_data.image_view_2d_arr
+dEQP-VK.api.object_management.private_data.image_view_cube
+dEQP-VK.api.object_management.private_data.image_view_cube_arr
+dEQP-VK.api.object_management.private_data.image_view_3d
+dEQP-VK.api.object_management.private_data.semaphore
+dEQP-VK.api.object_management.private_data.event
+dEQP-VK.api.object_management.private_data.fence
+dEQP-VK.api.object_management.private_data.fence_signaled
+dEQP-VK.api.object_management.private_data.query_pool
+dEQP-VK.api.object_management.private_data.sampler
+dEQP-VK.api.object_management.private_data.shader_module
+dEQP-VK.api.object_management.private_data.pipeline_cache
+dEQP-VK.api.object_management.private_data.pipeline_layout_empty
+dEQP-VK.api.object_management.private_data.pipeline_layout_single
+dEQP-VK.api.object_management.private_data.render_pass
+dEQP-VK.api.object_management.private_data.graphics_pipeline
+dEQP-VK.api.object_management.private_data.compute_pipeline
+dEQP-VK.api.object_management.private_data.descriptor_set_layout_empty
+dEQP-VK.api.object_management.private_data.descriptor_set_layout_single
+dEQP-VK.api.object_management.private_data.descriptor_pool
+dEQP-VK.api.object_management.private_data.descriptor_pool_free_descriptor_set
+dEQP-VK.api.object_management.private_data.descriptor_set
+dEQP-VK.api.object_management.private_data.framebuffer
+dEQP-VK.api.object_management.private_data.command_pool
+dEQP-VK.api.object_management.private_data.command_pool_transient
+dEQP-VK.api.object_management.private_data.command_buffer_primary
+dEQP-VK.api.object_management.private_data.command_buffer_secondary
 dEQP-VK.api.buffer.basic.size_max_uint64
 dEQP-VK.api.buffer_marker.graphics.external_host_mem.top_of_pipe.sequential.4
 dEQP-VK.api.buffer_marker.graphics.external_host_mem.top_of_pipe.sequential.64
 dEQP-VK.api.buffer.basic.size_max_uint64
 dEQP-VK.api.buffer_marker.graphics.external_host_mem.top_of_pipe.sequential.4
 dEQP-VK.api.buffer_marker.graphics.external_host_mem.top_of_pipe.sequential.64
@@ -155428,6 +155468,15 @@ dEQP-VK.wsi.android.swapchain.render.10swapchains
 dEQP-VK.wsi.android.swapchain.render.10swapchains2
 dEQP-VK.wsi.android.swapchain.acquire.too_many
 dEQP-VK.wsi.android.swapchain.acquire.too_many_timeout
 dEQP-VK.wsi.android.swapchain.render.10swapchains2
 dEQP-VK.wsi.android.swapchain.acquire.too_many
 dEQP-VK.wsi.android.swapchain.acquire.too_many_timeout
+dEQP-VK.wsi.android.swapchain.private_data.min_image_count
+dEQP-VK.wsi.android.swapchain.private_data.image_format
+dEQP-VK.wsi.android.swapchain.private_data.image_array_layers
+dEQP-VK.wsi.android.swapchain.private_data.image_usage
+dEQP-VK.wsi.android.swapchain.private_data.image_sharing_mode
+dEQP-VK.wsi.android.swapchain.private_data.pre_transform
+dEQP-VK.wsi.android.swapchain.private_data.composite_alpha
+dEQP-VK.wsi.android.swapchain.private_data.present_mode
+dEQP-VK.wsi.android.swapchain.private_data.clipped
 dEQP-VK.wsi.macos.surface.query_presentation_support
 dEQP-VK.wsi.macos.surface.query_surface_counters
 dEQP-VK.wsi.macos.swapchain.create.image_swapchain_create_info
 dEQP-VK.wsi.macos.surface.query_presentation_support
 dEQP-VK.wsi.macos.surface.query_surface_counters
 dEQP-VK.wsi.macos.swapchain.create.image_swapchain_create_info
@@ -155441,6 +155490,15 @@ dEQP-VK.wsi.macos.swapchain.render.10swapchains
 dEQP-VK.wsi.macos.swapchain.render.10swapchains2
 dEQP-VK.wsi.macos.swapchain.acquire.too_many
 dEQP-VK.wsi.macos.swapchain.acquire.too_many_timeout
 dEQP-VK.wsi.macos.swapchain.render.10swapchains2
 dEQP-VK.wsi.macos.swapchain.acquire.too_many
 dEQP-VK.wsi.macos.swapchain.acquire.too_many_timeout
+dEQP-VK.wsi.macos.swapchain.private_data.min_image_count
+dEQP-VK.wsi.macos.swapchain.private_data.image_format
+dEQP-VK.wsi.macos.swapchain.private_data.image_array_layers
+dEQP-VK.wsi.macos.swapchain.private_data.image_usage
+dEQP-VK.wsi.macos.swapchain.private_data.image_sharing_mode
+dEQP-VK.wsi.macos.swapchain.private_data.pre_transform
+dEQP-VK.wsi.macos.swapchain.private_data.composite_alpha
+dEQP-VK.wsi.macos.swapchain.private_data.present_mode
+dEQP-VK.wsi.macos.swapchain.private_data.clipped
 dEQP-VK.wsi.display.surface_counters
 dEQP-VK.wsi.display_control.swapchain_counter
 dEQP-VK.wsi.display_control.display_power_control
 dEQP-VK.wsi.display.surface_counters
 dEQP-VK.wsi.display_control.swapchain_counter
 dEQP-VK.wsi.display_control.display_power_control
index b5f07f5..8992c2f 100644 (file)
@@ -4125,6 +4125,46 @@ dEQP-VK.api.object_management.alloc_callback_fail_multiple.compute_pipeline
 dEQP-VK.api.object_management.alloc_callback_fail_multiple.descriptor_set
 dEQP-VK.api.object_management.alloc_callback_fail_multiple.command_buffer_primary
 dEQP-VK.api.object_management.alloc_callback_fail_multiple.command_buffer_secondary
 dEQP-VK.api.object_management.alloc_callback_fail_multiple.descriptor_set
 dEQP-VK.api.object_management.alloc_callback_fail_multiple.command_buffer_primary
 dEQP-VK.api.object_management.alloc_callback_fail_multiple.command_buffer_secondary
+dEQP-VK.api.object_management.private_data.device_memory_small
+dEQP-VK.api.object_management.private_data.buffer_uniform_small
+dEQP-VK.api.object_management.private_data.buffer_uniform_large
+dEQP-VK.api.object_management.private_data.buffer_storage_small
+dEQP-VK.api.object_management.private_data.buffer_storage_large
+dEQP-VK.api.object_management.private_data.buffer_view_uniform_r8g8b8a8_unorm
+dEQP-VK.api.object_management.private_data.buffer_view_storage_r8g8b8a8_unorm
+dEQP-VK.api.object_management.private_data.image_1d
+dEQP-VK.api.object_management.private_data.image_2d
+dEQP-VK.api.object_management.private_data.image_3d
+dEQP-VK.api.object_management.private_data.image_view_1d
+dEQP-VK.api.object_management.private_data.image_view_1d_arr
+dEQP-VK.api.object_management.private_data.image_view_2d
+dEQP-VK.api.object_management.private_data.image_view_2d_arr
+dEQP-VK.api.object_management.private_data.image_view_cube
+dEQP-VK.api.object_management.private_data.image_view_cube_arr
+dEQP-VK.api.object_management.private_data.image_view_3d
+dEQP-VK.api.object_management.private_data.semaphore
+dEQP-VK.api.object_management.private_data.event
+dEQP-VK.api.object_management.private_data.fence
+dEQP-VK.api.object_management.private_data.fence_signaled
+dEQP-VK.api.object_management.private_data.query_pool
+dEQP-VK.api.object_management.private_data.sampler
+dEQP-VK.api.object_management.private_data.shader_module
+dEQP-VK.api.object_management.private_data.pipeline_cache
+dEQP-VK.api.object_management.private_data.pipeline_layout_empty
+dEQP-VK.api.object_management.private_data.pipeline_layout_single
+dEQP-VK.api.object_management.private_data.render_pass
+dEQP-VK.api.object_management.private_data.graphics_pipeline
+dEQP-VK.api.object_management.private_data.compute_pipeline
+dEQP-VK.api.object_management.private_data.descriptor_set_layout_empty
+dEQP-VK.api.object_management.private_data.descriptor_set_layout_single
+dEQP-VK.api.object_management.private_data.descriptor_pool
+dEQP-VK.api.object_management.private_data.descriptor_pool_free_descriptor_set
+dEQP-VK.api.object_management.private_data.descriptor_set
+dEQP-VK.api.object_management.private_data.framebuffer
+dEQP-VK.api.object_management.private_data.command_pool
+dEQP-VK.api.object_management.private_data.command_pool_transient
+dEQP-VK.api.object_management.private_data.command_buffer_primary
+dEQP-VK.api.object_management.private_data.command_buffer_secondary
 dEQP-VK.api.buffer.suballocation.transfer_src.transfer_dst.uniform_texel.storage_texel.uniform.storage.index.vertex.indirect.create.zero
 dEQP-VK.api.buffer.suballocation.transfer_src.transfer_dst.uniform_texel.storage_texel.uniform.storage.index.vertex.indirect.create.binding
 dEQP-VK.api.buffer.suballocation.transfer_src.transfer_dst.uniform_texel.storage_texel.uniform.storage.index.vertex.indirect.create.binding_residency
 dEQP-VK.api.buffer.suballocation.transfer_src.transfer_dst.uniform_texel.storage_texel.uniform.storage.index.vertex.indirect.create.zero
 dEQP-VK.api.buffer.suballocation.transfer_src.transfer_dst.uniform_texel.storage_texel.uniform.storage.index.vertex.indirect.create.binding
 dEQP-VK.api.buffer.suballocation.transfer_src.transfer_dst.uniform_texel.storage_texel.uniform.storage.index.vertex.indirect.create.binding_residency
@@ -492737,6 +492777,15 @@ dEQP-VK.wsi.android.swapchain.get_images.incomplete
 dEQP-VK.wsi.android.swapchain.get_images.count
 dEQP-VK.wsi.android.swapchain.acquire.too_many
 dEQP-VK.wsi.android.swapchain.acquire.too_many_timeout
 dEQP-VK.wsi.android.swapchain.get_images.count
 dEQP-VK.wsi.android.swapchain.acquire.too_many
 dEQP-VK.wsi.android.swapchain.acquire.too_many_timeout
+dEQP-VK.wsi.android.swapchain.private_data.min_image_count
+dEQP-VK.wsi.android.swapchain.private_data.image_format
+dEQP-VK.wsi.android.swapchain.private_data.image_array_layers
+dEQP-VK.wsi.android.swapchain.private_data.image_usage
+dEQP-VK.wsi.android.swapchain.private_data.image_sharing_mode
+dEQP-VK.wsi.android.swapchain.private_data.pre_transform
+dEQP-VK.wsi.android.swapchain.private_data.composite_alpha
+dEQP-VK.wsi.android.swapchain.private_data.present_mode
+dEQP-VK.wsi.android.swapchain.private_data.clipped
 dEQP-VK.wsi.android.incremental_present.scale_none.immediate.identity.opaque.reference
 dEQP-VK.wsi.android.incremental_present.scale_none.immediate.identity.opaque.incremental_present
 dEQP-VK.wsi.android.incremental_present.scale_none.immediate.identity.pre_multiplied.reference
 dEQP-VK.wsi.android.incremental_present.scale_none.immediate.identity.opaque.reference
 dEQP-VK.wsi.android.incremental_present.scale_none.immediate.identity.opaque.incremental_present
 dEQP-VK.wsi.android.incremental_present.scale_none.immediate.identity.pre_multiplied.reference
@@ -493520,6 +493569,15 @@ dEQP-VK.wsi.macos.swapchain.get_images.incomplete
 dEQP-VK.wsi.macos.swapchain.get_images.count
 dEQP-VK.wsi.macos.swapchain.acquire.too_many
 dEQP-VK.wsi.macos.swapchain.acquire.too_many_timeout
 dEQP-VK.wsi.macos.swapchain.get_images.count
 dEQP-VK.wsi.macos.swapchain.acquire.too_many
 dEQP-VK.wsi.macos.swapchain.acquire.too_many_timeout
+dEQP-VK.wsi.macos.swapchain.private_data.min_image_count
+dEQP-VK.wsi.macos.swapchain.private_data.image_format
+dEQP-VK.wsi.macos.swapchain.private_data.image_array_layers
+dEQP-VK.wsi.macos.swapchain.private_data.image_usage
+dEQP-VK.wsi.macos.swapchain.private_data.image_sharing_mode
+dEQP-VK.wsi.macos.swapchain.private_data.pre_transform
+dEQP-VK.wsi.macos.swapchain.private_data.composite_alpha
+dEQP-VK.wsi.macos.swapchain.private_data.present_mode
+dEQP-VK.wsi.macos.swapchain.private_data.clipped
 dEQP-VK.wsi.macos.incremental_present.scale_none.immediate.identity.opaque.reference
 dEQP-VK.wsi.macos.incremental_present.scale_none.immediate.identity.opaque.incremental_present
 dEQP-VK.wsi.macos.incremental_present.scale_none.immediate.identity.pre_multiplied.reference
 dEQP-VK.wsi.macos.incremental_present.scale_none.immediate.identity.opaque.reference
 dEQP-VK.wsi.macos.incremental_present.scale_none.immediate.identity.opaque.incremental_present
 dEQP-VK.wsi.macos.incremental_present.scale_none.immediate.identity.pre_multiplied.reference
diff --git a/external/vulkancts/framework/vulkan/vkObjTypeImpl.inl b/external/vulkancts/framework/vulkan/vkObjTypeImpl.inl
new file mode 100644 (file)
index 0000000..18435cc
--- /dev/null
@@ -0,0 +1,47 @@
+/* WARNING: This is auto-generated file. Do not modify, since changes will
+ * be lost! Modify the generating script instead.
+ */
+namespace vk
+{
+template<typename T> VkObjectType getObjectType        (void);
+template<> inline VkObjectType getObjectType<VkInstance>                                               (void) { return VK_OBJECT_TYPE_INSTANCE;                                                }
+template<> inline VkObjectType getObjectType<VkPhysicalDevice>                                 (void) { return VK_OBJECT_TYPE_PHYSICAL_DEVICE;                                 }
+template<> inline VkObjectType getObjectType<VkDevice>                                                 (void) { return VK_OBJECT_TYPE_DEVICE;                                                  }
+template<> inline VkObjectType getObjectType<VkQueue>                                                  (void) { return VK_OBJECT_TYPE_QUEUE;                                                   }
+template<> inline VkObjectType getObjectType<VkSemaphore>                                              (void) { return VK_OBJECT_TYPE_SEMAPHORE;                                               }
+template<> inline VkObjectType getObjectType<VkCommandBuffer>                                  (void) { return VK_OBJECT_TYPE_COMMAND_BUFFER;                                  }
+template<> inline VkObjectType getObjectType<VkFence>                                                  (void) { return VK_OBJECT_TYPE_FENCE;                                                   }
+template<> inline VkObjectType getObjectType<VkDeviceMemory>                                   (void) { return VK_OBJECT_TYPE_DEVICE_MEMORY;                                   }
+template<> inline VkObjectType getObjectType<VkBuffer>                                                 (void) { return VK_OBJECT_TYPE_BUFFER;                                                  }
+template<> inline VkObjectType getObjectType<VkImage>                                                  (void) { return VK_OBJECT_TYPE_IMAGE;                                                   }
+template<> inline VkObjectType getObjectType<VkEvent>                                                  (void) { return VK_OBJECT_TYPE_EVENT;                                                   }
+template<> inline VkObjectType getObjectType<VkQueryPool>                                              (void) { return VK_OBJECT_TYPE_QUERY_POOL;                                              }
+template<> inline VkObjectType getObjectType<VkBufferView>                                             (void) { return VK_OBJECT_TYPE_BUFFER_VIEW;                                             }
+template<> inline VkObjectType getObjectType<VkImageView>                                              (void) { return VK_OBJECT_TYPE_IMAGE_VIEW;                                              }
+template<> inline VkObjectType getObjectType<VkShaderModule>                                   (void) { return VK_OBJECT_TYPE_SHADER_MODULE;                                   }
+template<> inline VkObjectType getObjectType<VkPipelineCache>                                  (void) { return VK_OBJECT_TYPE_PIPELINE_CACHE;                                  }
+template<> inline VkObjectType getObjectType<VkPipelineLayout>                                 (void) { return VK_OBJECT_TYPE_PIPELINE_LAYOUT;                                 }
+template<> inline VkObjectType getObjectType<VkRenderPass>                                             (void) { return VK_OBJECT_TYPE_RENDER_PASS;                                             }
+template<> inline VkObjectType getObjectType<VkPipeline>                                               (void) { return VK_OBJECT_TYPE_PIPELINE;                                                }
+template<> inline VkObjectType getObjectType<VkDescriptorSetLayout>                    (void) { return VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT;                   }
+template<> inline VkObjectType getObjectType<VkSampler>                                                (void) { return VK_OBJECT_TYPE_SAMPLER;                                                 }
+template<> inline VkObjectType getObjectType<VkDescriptorPool>                                 (void) { return VK_OBJECT_TYPE_DESCRIPTOR_POOL;                                 }
+template<> inline VkObjectType getObjectType<VkDescriptorSet>                                  (void) { return VK_OBJECT_TYPE_DESCRIPTOR_SET;                                  }
+template<> inline VkObjectType getObjectType<VkFramebuffer>                                    (void) { return VK_OBJECT_TYPE_FRAMEBUFFER;                                             }
+template<> inline VkObjectType getObjectType<VkCommandPool>                                    (void) { return VK_OBJECT_TYPE_COMMAND_POOL;                                    }
+template<> inline VkObjectType getObjectType<VkSamplerYcbcrConversion>                 (void) { return VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION;                }
+template<> inline VkObjectType getObjectType<VkDescriptorUpdateTemplate>               (void) { return VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE;              }
+template<> inline VkObjectType getObjectType<VkSurfaceKHR>                                             (void) { return VK_OBJECT_TYPE_SURFACE_KHR;                                             }
+template<> inline VkObjectType getObjectType<VkSwapchainKHR>                                   (void) { return VK_OBJECT_TYPE_SWAPCHAIN_KHR;                                   }
+template<> inline VkObjectType getObjectType<VkDisplayKHR>                                             (void) { return VK_OBJECT_TYPE_DISPLAY_KHR;                                             }
+template<> inline VkObjectType getObjectType<VkDisplayModeKHR>                                 (void) { return VK_OBJECT_TYPE_DISPLAY_MODE_KHR;                                }
+template<> inline VkObjectType getObjectType<VkDebugReportCallbackEXT>                 (void) { return VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT;               }
+template<> inline VkObjectType getObjectType<VkDebugUtilsMessengerEXT>                 (void) { return VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT;               }
+template<> inline VkObjectType getObjectType<VkValidationCacheEXT>                             (void) { return VK_OBJECT_TYPE_VALIDATION_CACHE_EXT;                    }
+template<> inline VkObjectType getObjectType<VkAccelerationStructureKHR>               (void) { return VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR;              }
+template<> inline VkObjectType getObjectType<VkPerformanceConfigurationINTEL>  (void) { return VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL; }
+template<> inline VkObjectType getObjectType<VkIndirectCommandsLayoutNV>               (void) { return VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NV;             }
+template<> inline VkObjectType getObjectType<VkPrivateDataSlotEXT>                             (void) { return VK_OBJECT_TYPE_PRIVATE_DATA_SLOT_EXT;                   }
+template<> inline VkObjectType getObjectType<VkDeferredOperationKHR>                   (void) { return VK_OBJECT_TYPE_DEFERRED_OPERATION_KHR;                  }
+template<> inline VkObjectType getObjectType<VkAccelerationStructureNV>                (void) { return VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV;               }
+}
index 5e867f5..fdd6bb8 100644 (file)
 #include "vkPlatform.hpp"
 #include "vkStrUtil.hpp"
 #include "vkAllocationCallbackUtil.hpp"
 #include "vkPlatform.hpp"
 #include "vkStrUtil.hpp"
 #include "vkAllocationCallbackUtil.hpp"
+#include "vkObjTypeImpl.inl"
 #include "vkObjUtil.hpp"
 
 #include "vkObjUtil.hpp"
 
+#include "vktTestGroupUtil.hpp"
+
 #include "tcuVector.hpp"
 #include "tcuResultCollector.hpp"
 #include "tcuCommandLine.hpp"
 #include "tcuVector.hpp"
 #include "tcuResultCollector.hpp"
 #include "tcuCommandLine.hpp"
@@ -2333,6 +2336,276 @@ tcu::TestStatus createMultipleSharedResourcesTest (Context& context, typename Ob
        return tcu::TestStatus::pass("Ok");
 }
 
        return tcu::TestStatus::pass("Ok");
 }
 
+
+// Class to wrap singleton devices used by private_data tests
+class SingletonDevice
+{
+       Move<VkDevice> createPrivateDataDevice(const Context &context, int idx)
+       {
+               const int requestedSlots[NUM_DEVICES][2] =
+               {
+                       {0, 0},
+                       {1, 0},
+                       {1, 1},
+                       {4, 4},
+                       {1, 100},
+               };
+
+               const float     queuePriority                                   = 1.0;
+               const VkDeviceQueueCreateInfo   queues[]        =
+               {
+                       {
+                               VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO,
+                               DE_NULL,
+                               (VkDeviceQueueCreateFlags)0,
+                               context.getUniversalQueueFamilyIndex(),
+                               1u,                                                                     // queueCount
+                               &queuePriority,                                         // pQueuePriorities
+                       }
+               };
+
+               VkDevicePrivateDataCreateInfoEXT pdci0 =
+               {
+                       VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT,  // VkStructureType                       sType;
+                       DE_NULL,                                                                                                // const void*                           pNext;
+                       0u,                                                                                                             // uint32_t                              privateDataSlotRequestCount;
+               };
+               VkDevicePrivateDataCreateInfoEXT pdci1 =
+               {
+                       VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT,  // VkStructureType                       sType;
+                       DE_NULL,                                                                                                // const void*                           pNext;
+                       0u,                                                                                                             // uint32_t                              privateDataSlotRequestCount;
+               };
+               void *pNext = DE_NULL;
+
+               if (requestedSlots[idx][0])
+               {
+                       pNext = &pdci0;
+                       pdci0.privateDataSlotRequestCount = requestedSlots[idx][0];
+                       if (requestedSlots[idx][1])
+                       {
+                               pdci0.pNext = &pdci1;
+                               pdci1.privateDataSlotRequestCount = requestedSlots[idx][1];
+                       }
+               }
+
+               VkPhysicalDevicePrivateDataFeaturesEXT privateDataFeatures =
+               {
+                       VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT,    // VkStructureType    sType;
+                       pNext,                                                                                                                  // void*              pNext;
+                       VK_TRUE,                                                                                                                // VkBool32           privateData;
+               };
+               pNext = &privateDataFeatures;
+
+               const char *extName = "VK_EXT_private_data";
+
+               const VkDeviceCreateInfo                deviceInfo      =
+               {
+                       VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO,
+                       pNext,
+                       (VkDeviceCreateFlags)0,
+                       DE_LENGTH_OF_ARRAY(queues),
+                       queues,
+                       0u,                                                                             // enabledLayerNameCount
+                       DE_NULL,                                                                // ppEnabledLayerNames
+                       1u,                                                                             // enabledExtensionNameCount
+                       &extName,                                                               // ppEnabledExtensionNames
+                       DE_NULL,                                                                // pEnabledFeatures
+               };
+
+               Move<VkDevice> device = createCustomDevice(context.getTestContext().getCommandLine().isValidationEnabled(),
+                                                                                                  context.getPlatformInterface(), context.getInstance(), context.getInstanceInterface(), context.getPhysicalDevice(), &deviceInfo, DE_NULL);
+               return device;
+       }
+
+       SingletonDevice (const Context& context, int idx)
+               : m_logicalDevice       (createPrivateDataDevice(context, idx))
+       {
+       }
+
+
+public:
+
+       static const int NUM_DEVICES = 5;
+
+       static const Unique<vk::VkDevice>& getDevice(const Context& context, int idx)
+       {
+               if (!m_singletonDevice[idx])
+                       m_singletonDevice[idx] = SharedPtr<SingletonDevice>(new SingletonDevice(context, idx));
+
+               DE_ASSERT(m_singletonDevice[idx]);
+               return m_singletonDevice[idx]->m_logicalDevice;
+       }
+
+       static void destroy()
+       {
+               for (int idx = 0; idx < NUM_DEVICES; ++idx)
+                       m_singletonDevice[idx].clear();
+       }
+
+private:
+       const Unique<vk::VkDevice>                                      m_logicalDevice;
+       static SharedPtr<SingletonDevice>                       m_singletonDevice[NUM_DEVICES];
+};
+
+SharedPtr<SingletonDevice>             SingletonDevice::m_singletonDevice[NUM_DEVICES];
+
+template<typename T> static deUint64 HandleToInt(T t) { return t.getInternal(); }
+template<typename T> static deUint64 HandleToInt(T *t) { return (deUint64)(deUintptr)(t); }
+
+template<typename Object>
+tcu::TestStatus createPrivateDataTest (Context& context, typename Object::Parameters params)
+{
+       if (!context.getPrivateDataFeaturesEXT().privateData)
+               TCU_THROW(NotSupportedError, "privateData not supported");
+
+       for (int d = 0; d < SingletonDevice::NUM_DEVICES; ++d)
+       {
+               const Unique<vk::VkDevice>&                     device =                        SingletonDevice::getDevice(context, d);
+               const Environment                                       env                                     (context.getPlatformInterface(),
+                                                                                                                                context.getUsedApiVersion(),
+                                                                                                                                context.getInstanceInterface(),
+                                                                                                                                context.getInstance(),
+                                                                                                                                context.getDeviceInterface(),
+                                                                                                                                *device,
+                                                                                                                                context.getUniversalQueueFamilyIndex(),
+                                                                                                                                context.getBinaryCollection(),
+                                                                                                                                DE_NULL,
+                                                                                                                                4u,
+                                                                                                                                context.getTestContext().getCommandLine());
+
+               const typename Object::Resources        res     (env, params);
+
+               const VkPrivateDataSlotCreateInfoEXT createInfo =
+               {
+                       VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO_EXT,    // VkStructureType                    sType;
+                       DE_NULL,                                                                                                // const void*                        pNext;
+                       0u,                                                                                                             // VkPrivateDataSlotCreateFlagsEXT    flags;
+               };
+
+               const int numSlots = 100;
+
+               typedef Unique<VkPrivateDataSlotEXT>                            PrivateDataSlotUp;
+               typedef SharedPtr<PrivateDataSlotUp>                            PrivateDataSlotSp;
+               vector<PrivateDataSlotSp> slots;
+
+               // interleave allocating objects and slots
+               for (int i = 0; i < numSlots / 2; ++i)
+               {
+                       Move<VkPrivateDataSlotEXT> s = createPrivateDataSlotEXT(env.vkd, *device, &createInfo, DE_NULL);
+                       slots.push_back(PrivateDataSlotSp(new PrivateDataSlotUp(s)));
+               }
+
+               Unique<typename Object::Type>   obj0    (Object::create(env, res, params));
+               Unique<typename Object::Type>   obj1    (Object::create(env, res, params));
+
+               for (int i = numSlots / 2; i < numSlots; ++i)
+               {
+                       Move<VkPrivateDataSlotEXT> s = createPrivateDataSlotEXT(env.vkd, *device, &createInfo, DE_NULL);
+                       slots.push_back(PrivateDataSlotSp(new PrivateDataSlotUp(s)));
+               }
+
+               Unique<typename Object::Type>   obj2    (Object::create(env, res, params));
+               Unique<typename Object::Type>   obj3    (Object::create(env, res, params));
+
+               Unique<typename Object::Type> *objs[4] = { &obj0, &obj1, &obj2, &obj3 };
+
+               for (int r = 0; r < 3; ++r)
+               {
+                       deUint64 data;
+
+                       // Test private data for the objects
+                       for (int o = 0; o < 4; ++o)
+                       {
+                               auto &obj = *objs[o];
+                               for (int i = 0; i < numSlots; ++i)
+                               {
+                                       data = 1234;
+                                       env.vkd.getPrivateDataEXT(*device, getObjectType<typename Object::Type>(), HandleToInt(obj.get()), **slots[i], &data);
+                                       if (data != 0)
+                                               return tcu::TestStatus::fail("Expected initial value of zero");
+                               }
+                       }
+                       for (int o = 0; o < 4; ++o)
+                       {
+                               auto &obj = *objs[o];
+                               for (int i = 0; i < numSlots; ++i)
+                                       VK_CHECK(env.vkd.setPrivateDataEXT(*device, getObjectType<typename Object::Type>(), HandleToInt(obj.get()), **slots[i], i*i*i + o*o + 1));
+                       }
+                       for (int o = 0; o < 4; ++o)
+                       {
+                               auto &obj = *objs[o];
+                               for (int i = 0; i < numSlots; ++i)
+                               {
+                                       data = 1234;
+                                       env.vkd.getPrivateDataEXT(*device, getObjectType<typename Object::Type>(), HandleToInt(obj.get()), **slots[i], &data);
+                                       if (data != (deUint64)(i*i*i + o*o + 1))
+                                               return tcu::TestStatus::fail("Didn't read back set value");
+                               }
+                       }
+
+
+                       // Test private data for the private data objects
+                       for (int o = 0; o < numSlots; ++o)
+                       {
+                               auto &obj = **slots[o];
+                               for (int i = 0; i < numSlots; ++i)
+                               {
+                                       data = 1234;
+                                       env.vkd.getPrivateDataEXT(*device, VK_OBJECT_TYPE_PRIVATE_DATA_SLOT_EXT, HandleToInt<VkPrivateDataSlotEXT>(obj), **slots[i], &data);
+                                       if (data != 0)
+                                               return tcu::TestStatus::fail("Expected initial value of zero");
+                               }
+                       }
+                       for (int o = 0; o < numSlots; ++o)
+                       {
+                               auto &obj = **slots[o];
+                               for (int i = 0; i < numSlots; ++i)
+                                       VK_CHECK(env.vkd.setPrivateDataEXT(*device, VK_OBJECT_TYPE_PRIVATE_DATA_SLOT_EXT, HandleToInt<VkPrivateDataSlotEXT>(obj), **slots[i], i*i*i + o*o + 1));
+                       }
+                       for (int o = 0; o < numSlots; ++o)
+                       {
+                               auto &obj = **slots[o];
+                               for (int i = 0; i < numSlots; ++i)
+                               {
+                                       data = 1234;
+                                       env.vkd.getPrivateDataEXT(*device, VK_OBJECT_TYPE_PRIVATE_DATA_SLOT_EXT, HandleToInt<VkPrivateDataSlotEXT>(obj), **slots[i], &data);
+                                       if (data != (deUint64)(i*i*i + o*o + 1))
+                                               return tcu::TestStatus::fail("Didn't read back set value");
+                               }
+                       }
+
+                       // Test private data for the device
+                       for (int i = 0; i < numSlots; ++i)
+                       {
+                               data = 1234;
+                               env.vkd.getPrivateDataEXT(*device, VK_OBJECT_TYPE_DEVICE, (deUint64)(deUintptr)(*device), **slots[i], &data);
+                               if (data != 0)
+                                       return tcu::TestStatus::fail("Expected initial value of zero for device");
+                       }
+                       for (int i = 0; i < numSlots; ++i)
+                               VK_CHECK(env.vkd.setPrivateDataEXT(*device, VK_OBJECT_TYPE_DEVICE, (deUint64)(deUintptr)(*device), **slots[i], i*i*i + r*r + 1));
+                       for (int i = 0; i < numSlots; ++i)
+                       {
+                               data = 1234;
+                               env.vkd.getPrivateDataEXT(*device, VK_OBJECT_TYPE_DEVICE, (deUint64)(deUintptr)(*device), **slots[i], &data);
+                               if (data != (deUint64)(i*i*i + r*r + 1))
+                                       return tcu::TestStatus::fail("Didn't read back set value from device");
+                       }
+
+                       // Destroy and realloc slots for the next iteration
+                       slots.clear();
+                       for (int i = 0; i < numSlots; ++i)
+                       {
+                               Move<VkPrivateDataSlotEXT> s = createPrivateDataSlotEXT(env.vkd, *device, &createInfo, DE_NULL);
+                               slots.push_back(PrivateDataSlotSp(new PrivateDataSlotUp(s)));
+                       }
+               }
+       }
+
+       return tcu::TestStatus::pass("Ok");
+}
+
 template<typename Object>
 tcu::TestStatus createMaxConcurrentTest (Context& context, typename Object::Parameters params)
 {
 template<typename Object>
 tcu::TestStatus createMaxConcurrentTest (Context& context, typename Object::Parameters params)
 {
@@ -2811,23 +3084,21 @@ struct CaseDescriptions
 };
 
 template<typename Object>
 };
 
 template<typename Object>
-void addCases (const MovePtr<tcu::TestCaseGroup>& group, const CaseDescription<Object>& cases)
+void addCases (tcu::TestCaseGroup *group, const CaseDescription<Object>& cases)
 {
        for (const NamedParameters<Object>* cur = cases.paramsBegin; cur != cases.paramsEnd; ++cur)
 {
        for (const NamedParameters<Object>* cur = cases.paramsBegin; cur != cases.paramsEnd; ++cur)
-               addFunctionCase(group.get(), cur->name, "", cases.function, cur->parameters);
+               addFunctionCase(group, cur->name, "", cases.function, cur->parameters);
 }
 
 template<typename Object>
 }
 
 template<typename Object>
-void addCasesWithProgs (const MovePtr<tcu::TestCaseGroup>& group, const CaseDescription<Object>& cases)
+void addCasesWithProgs (tcu::TestCaseGroup *group, const CaseDescription<Object>& cases)
 {
        for (const NamedParameters<Object>* cur = cases.paramsBegin; cur != cases.paramsEnd; ++cur)
 {
        for (const NamedParameters<Object>* cur = cases.paramsBegin; cur != cases.paramsEnd; ++cur)
-               addFunctionCaseWithPrograms(group.get(), cur->name, "", Object::initPrograms, cases.function, cur->parameters);
+               addFunctionCaseWithPrograms(group, cur->name, "", Object::initPrograms, cases.function, cur->parameters);
 }
 
 }
 
-tcu::TestCaseGroup* createGroup (tcu::TestContext& testCtx, const char* name, const char* desc, const CaseDescriptions& cases)
+static void createTests (tcu::TestCaseGroup* group, CaseDescriptions cases)
 {
 {
-       MovePtr<tcu::TestCaseGroup>     group   (new tcu::TestCaseGroup(testCtx, name, desc));
-
        addCases                        (group, cases.instance);
        addCases                        (group, cases.device);
        addCases                        (group, cases.deviceGroup);
        addCases                        (group, cases.instance);
        addCases                        (group, cases.device);
        addCases                        (group, cases.deviceGroup);
@@ -2853,7 +3124,20 @@ tcu::TestCaseGroup* createGroup (tcu::TestContext& testCtx, const char* name, co
        addCases                        (group, cases.framebuffer);
        addCases                        (group, cases.commandPool);
        addCases                        (group, cases.commandBuffer);
        addCases                        (group, cases.framebuffer);
        addCases                        (group, cases.commandPool);
        addCases                        (group, cases.commandBuffer);
+}
 
 
+static void cleanupGroup (tcu::TestCaseGroup* group, CaseDescriptions cases)
+{
+       DE_UNREF(group);
+       DE_UNREF(cases);
+       // Destroy singleton object
+       SingletonDevice::destroy();
+}
+
+tcu::TestCaseGroup* createGroup (tcu::TestContext& testCtx, const char* name, const char* desc, const CaseDescriptions& cases)
+{
+       MovePtr<tcu::TestCaseGroup>     group   (new tcu::TestCaseGroup(testCtx, name, desc));
+       createTests(group.get(), cases);
        return group.release();
 }
 
        return group.release();
 }
 
@@ -3300,6 +3584,36 @@ tcu::TestCaseGroup* createObjectManagementTests (tcu::TestContext& testCtx)
        };
        objectMgmtTests->addChild(createGroup(testCtx, "alloc_callback_fail_multiple", "Allocation callback failure creating multiple objects with one call", s_allocCallbackFailMultipleObjectsGroup));
 
        };
        objectMgmtTests->addChild(createGroup(testCtx, "alloc_callback_fail_multiple", "Allocation callback failure creating multiple objects with one call", s_allocCallbackFailMultipleObjectsGroup));
 
+       const CaseDescriptions  s_privateDataResourcesGroup     =
+       {
+               EMPTY_CASE_DESC(Instance),              // Does not make sense
+               EMPTY_CASE_DESC(Device),                // Device is tested in each object test
+               EMPTY_CASE_DESC(DeviceGroup),   // Device is tested in each object test
+               CASE_DESC(createPrivateDataTest <DeviceMemory>,                         s_deviceMemCases),
+               CASE_DESC(createPrivateDataTest <Buffer>,                                       s_bufferCases),
+               CASE_DESC(createPrivateDataTest <BufferView>,                           s_bufferViewCases),
+               CASE_DESC(createPrivateDataTest <Image>,                                        s_imageCases),
+               CASE_DESC(createPrivateDataTest <ImageView>,                            s_imageViewCases),
+               CASE_DESC(createPrivateDataTest <Semaphore>,                            s_semaphoreCases),
+               CASE_DESC(createPrivateDataTest <Event>,                                        s_eventCases),
+               CASE_DESC(createPrivateDataTest <Fence>,                                        s_fenceCases),
+               CASE_DESC(createPrivateDataTest <QueryPool>,                            s_queryPoolCases),
+               CASE_DESC(createPrivateDataTest <ShaderModule>,                         s_shaderModuleCases),
+               CASE_DESC(createPrivateDataTest <PipelineCache>,                        s_pipelineCacheCases),
+               CASE_DESC(createPrivateDataTest <PipelineLayout>,                       s_pipelineLayoutCases),
+               CASE_DESC(createPrivateDataTest <RenderPass>,                           s_renderPassCases),
+               CASE_DESC(createPrivateDataTest <GraphicsPipeline>,                     s_graphicsPipelineCases),
+               CASE_DESC(createPrivateDataTest <ComputePipeline>,                      s_computePipelineCases),
+               CASE_DESC(createPrivateDataTest <DescriptorSetLayout>,          s_descriptorSetLayoutCases),
+               CASE_DESC(createPrivateDataTest <Sampler>,                                      s_samplerCases),
+               CASE_DESC(createPrivateDataTest <DescriptorPool>,                       s_descriptorPoolCases),
+               CASE_DESC(createPrivateDataTest <DescriptorSet>,                        s_descriptorSetCases),
+               CASE_DESC(createPrivateDataTest <Framebuffer>,                          s_framebufferCases),
+               CASE_DESC(createPrivateDataTest <CommandPool>,                          s_commandPoolCases),
+               CASE_DESC(createPrivateDataTest <CommandBuffer>,                        s_commandBufferCases),
+       };
+       objectMgmtTests->addChild(createTestGroup(testCtx, "private_data", "Multiple objects with private data", createTests, s_privateDataResourcesGroup, cleanupGroup));
+
        return objectMgmtTests.release();
 }
 
        return objectMgmtTests.release();
 }
 
index 11b87bd..a8e63c2 100644 (file)
@@ -41,6 +41,7 @@
 #include "vkWsiUtil.hpp"
 #include "vkAllocationCallbackUtil.hpp"
 #include "vkCmdUtil.hpp"
 #include "vkWsiUtil.hpp"
 #include "vkAllocationCallbackUtil.hpp"
 #include "vkCmdUtil.hpp"
+#include "vkObjTypeImpl.inl"
 #include "vkObjUtil.hpp"
 
 #include "tcuCommandLine.hpp"
 #include "vkObjUtil.hpp"
 
 #include "tcuCommandLine.hpp"
@@ -74,6 +75,7 @@ using tcu::UVec2;
 
 using de::MovePtr;
 using de::UniquePtr;
 
 using de::MovePtr;
 using de::UniquePtr;
+using de::SharedPtr;
 
 using std::string;
 using std::vector;
 
 using std::string;
 using std::vector;
@@ -154,24 +156,45 @@ Move<VkDevice> createDeviceWithWsi (const PlatformInterface&              vkp,
                queueInfos.push_back(info);
        }
 
                queueInfos.push_back(info);
        }
 
+       const void *                                    pNext                   = nullptr;
        const VkPhysicalDeviceFeatures  features                = getDeviceFeaturesForWsi();
        const VkPhysicalDeviceFeatures  features                = getDeviceFeaturesForWsi();
-       const char* const                               extensions[]    = { "VK_KHR_swapchain" };
+
+       VkDevicePrivateDataCreateInfoEXT pdci =
+       {
+               VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT,  // VkStructureType                       sType;
+               DE_NULL,                                                                                                // const void*                           pNext;
+               4u,                                                                                                             // uint32_t                              privateDataSlotRequestCount;
+       };
+       VkPhysicalDevicePrivateDataFeaturesEXT privateDataFeatures =
+       {
+               VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT,    // VkStructureType    sType;
+               &pdci,                                                                                                                  // void*              pNext;
+               VK_TRUE,                                                                                                                // VkBool32           privateData;
+       };
+
+       vector<const char*>                             extensions;
+       extensions.push_back("VK_KHR_swapchain");
+       if (isExtensionSupported(supportedExtensions, RequiredExtension("VK_EXT_private_data")))
+       {
+               extensions.push_back("VK_EXT_private_data");
+               pNext = &privateDataFeatures;
+       }
 
        const VkDeviceCreateInfo                deviceParams    =
        {
                VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO,
 
        const VkDeviceCreateInfo                deviceParams    =
        {
                VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO,
-               DE_NULL,
+               pNext,
                (VkDeviceCreateFlags)0,
                static_cast<deUint32>(queueInfos.size()),
                queueInfos.data(),
                0u,                                                                     // enabledLayerCount
                DE_NULL,                                                        // ppEnabledLayerNames
                (VkDeviceCreateFlags)0,
                static_cast<deUint32>(queueInfos.size()),
                queueInfos.data(),
                0u,                                                                     // enabledLayerCount
                DE_NULL,                                                        // ppEnabledLayerNames
-               DE_LENGTH_OF_ARRAY(extensions),         // enabledExtensionCount
-               DE_ARRAY_BEGIN(extensions),                     // ppEnabledExtensionNames
+               (deUint32)extensions.size(),            // enabledExtensionCount
+               &extensions[0],                                         // ppEnabledExtensionNames
                &features
        };
 
                &features
        };
 
-       for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(extensions); ++ndx)
+       for (int ndx = 0; ndx < (int)extensions.size(); ++ndx)
        {
                if (!isExtensionSupported(supportedExtensions, RequiredExtension(extensions[ndx])))
                        TCU_THROW(NotSupportedError, (string(extensions[ndx]) + " is not supported").c_str());
        {
                if (!isExtensionSupported(supportedExtensions, RequiredExtension(extensions[ndx])))
                        TCU_THROW(NotSupportedError, (string(extensions[ndx]) + " is not supported").c_str());
@@ -309,7 +332,7 @@ MovePtr<Display> createDisplay (const vk::Platform& platform,
        catch (const tcu::NotSupportedError& e)
        {
                if (isExtensionSupported(supportedExtensions, RequiredExtension(getExtensionName(wsiType))) &&
        catch (const tcu::NotSupportedError& e)
        {
                if (isExtensionSupported(supportedExtensions, RequiredExtension(getExtensionName(wsiType))) &&
-                   platform.hasDisplay(wsiType))
+                       platform.hasDisplay(wsiType))
                {
                        // If VK_KHR_{platform}_surface was supported, vk::Platform implementation
                        // must support creating native display & window for that WSI type.
                {
                        // If VK_KHR_{platform}_surface was supported, vk::Platform implementation
                        // must support creating native display & window for that WSI type.
@@ -741,6 +764,141 @@ tcu::TestStatus createSwapchainTest (Context& context, TestParameters params)
        return tcu::TestStatus::pass("No sub-case failed");
 }
 
        return tcu::TestStatus::pass("No sub-case failed");
 }
 
+template<typename T> static deUint64 HandleToInt(T t) { return t.getInternal(); }
+
+tcu::TestStatus createSwapchainPrivateDataTest (Context& context, TestParameters params)
+{
+       if (!context.getPrivateDataFeaturesEXT().privateData)
+               TCU_THROW(NotSupportedError, "privateData not supported");
+
+       tcu::TestLog&                                                   log                     = context.getTestContext().getLog();
+       const InstanceHelper                                    instHelper      (context, params.wsiType);
+       const NativeObjects                                             native          (context, instHelper.supportedExtensions, params.wsiType);
+       const Unique<VkSurfaceKHR>                              surface         (createSurface(instHelper.vki, instHelper.instance, params.wsiType, native.getDisplay(), native.getWindow()));
+       const MultiQueueDeviceHelper                    devHelper       (context, instHelper.vki, instHelper.instance, *surface);
+       const vector<VkSwapchainCreateInfoKHR>  cases           (generateSwapchainParameterCases(params.wsiType, params.dimension, instHelper.vki, devHelper.physicalDevice, *surface));
+
+       for (size_t caseNdx = 0; caseNdx < cases.size(); ++caseNdx)
+       {
+               std::ostringstream subcase;
+               subcase << "Sub-case " << (caseNdx+1) << " / " << cases.size() << ": ";
+
+               VkSwapchainCreateInfoKHR        curParams       = cases[caseNdx];
+
+               if (curParams.imageSharingMode == VK_SHARING_MODE_CONCURRENT)
+               {
+                       const deUint32 numFamilies = static_cast<deUint32>(devHelper.queueFamilyIndices.size());
+                       if (numFamilies < 2u)
+                               TCU_THROW(NotSupportedError, "Only " + de::toString(numFamilies) + " queue families available for VK_SHARING_MODE_CONCURRENT");
+                       curParams.queueFamilyIndexCount = numFamilies;
+               }
+               else
+               {
+                       // Take only the first queue.
+                       if (devHelper.queueFamilyIndices.empty())
+                               TCU_THROW(NotSupportedError, "No queue families compatible with the given surface");
+                       curParams.queueFamilyIndexCount = 1u;
+               }
+               curParams.pQueueFamilyIndices   = devHelper.queueFamilyIndices.data();
+               curParams.surface                               = *surface;
+
+               log << TestLog::Message << subcase.str() << curParams << TestLog::EndMessage;
+
+               // The Vulkan 1.1.87 spec contains the following VU for VkSwapchainCreateInfoKHR:
+               //
+               //     * imageFormat, imageUsage, imageExtent, and imageArrayLayers must be supported for VK_IMAGE_TYPE_2D
+               //     VK_IMAGE_TILING_OPTIMAL images as reported by vkGetPhysicalDeviceImageFormatProperties.
+               VkImageFormatProperties properties;
+               const VkResult propertiesResult = instHelper.vki.getPhysicalDeviceImageFormatProperties(devHelper.physicalDevice,
+                                                                                                                                                                                               curParams.imageFormat,
+                                                                                                                                                                                               VK_IMAGE_TYPE_2D,
+                                                                                                                                                                                               VK_IMAGE_TILING_OPTIMAL,
+                                                                                                                                                                                               curParams.imageUsage,
+                                                                                                                                                                                               0, // flags
+                                                                                                                                                                                               &properties);
+
+               log << TestLog::Message << subcase.str()
+                       << "vkGetPhysicalDeviceImageFormatProperties => "
+                       << getResultStr(propertiesResult) << TestLog::EndMessage;
+
+               switch (propertiesResult) {
+               case VK_SUCCESS:
+                       {
+                               const Unique<VkSwapchainKHR>    swapchain       (createSwapchainKHR(devHelper.vkd, *devHelper.device, &curParams));
+
+                               const int numSlots = 100;
+                               typedef Unique<VkPrivateDataSlotEXT>                            PrivateDataSlotUp;
+                               typedef SharedPtr<PrivateDataSlotUp>                            PrivateDataSlotSp;
+                               vector<PrivateDataSlotSp> slots;
+
+                               const VkPrivateDataSlotCreateInfoEXT createInfo =
+                               {
+                                       VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO_EXT,    // VkStructureType                    sType;
+                                       DE_NULL,                                                                                                // const void*                        pNext;
+                                       0u,                                                                                                             // VkPrivateDataSlotCreateFlagsEXT    flags;
+                               };
+
+                               for (int i = 0; i < numSlots; ++i)
+                               {
+                                       Move<VkPrivateDataSlotEXT> s = createPrivateDataSlotEXT(devHelper.vkd, *devHelper.device, &createInfo, DE_NULL);
+                                       slots.push_back(PrivateDataSlotSp(new PrivateDataSlotUp(s)));
+                               }
+
+                               // Based on code in vktApiObjectManagementTests.cpp
+                               for (int r = 0; r < 3; ++r)
+                               {
+                                       deUint64 data;
+
+                                       for (int i = 0; i < numSlots; ++i)
+                                       {
+                                               data = 1234;
+                                               devHelper.vkd.getPrivateDataEXT(*devHelper.device, getObjectType<VkSwapchainKHR>(), HandleToInt(swapchain.get()), **slots[i], &data);
+                                               // Don't test default value of zero on Android, due to spec erratum
+                                               if (params.wsiType != TYPE_ANDROID)
+                                               {
+                                                       if (data != 0)
+                                                               return tcu::TestStatus::fail("Expected initial value of zero");
+                                               }
+                                       }
+
+                                       for (int i = 0; i < numSlots; ++i)
+                                               VK_CHECK(devHelper.vkd.setPrivateDataEXT(*devHelper.device, getObjectType<VkSwapchainKHR>(), HandleToInt(swapchain.get()), **slots[i], i*i*i + 1));
+
+                                       for (int i = 0; i < numSlots; ++i)
+                                       {
+                                               data = 1234;
+                                               devHelper.vkd.getPrivateDataEXT(*devHelper.device, getObjectType<VkSwapchainKHR>(), HandleToInt(swapchain.get()), **slots[i], &data);
+                                               if (data != (deUint64)(i*i*i + 1))
+                                                       return tcu::TestStatus::fail("Didn't read back set value");
+                                       }
+
+                                       // Destroy and realloc slots for the next iteration
+                                       slots.clear();
+                                       for (int i = 0; i < numSlots; ++i)
+                                       {
+                                               Move<VkPrivateDataSlotEXT> s = createPrivateDataSlotEXT(devHelper.vkd, *devHelper.device, &createInfo, DE_NULL);
+                                               slots.push_back(PrivateDataSlotSp(new PrivateDataSlotUp(s)));
+                                       }
+                               }
+
+
+                       }
+                       break;
+               case VK_ERROR_FORMAT_NOT_SUPPORTED:
+                       log << TestLog::Message << subcase.str()
+                               << "Skip because vkGetPhysicalDeviceImageFormatProperties returned VK_ERROR_FORMAT_NOT_SUPPORTED" << TestLog::EndMessage;
+                       break;
+               default:
+                       log << TestLog::Message << subcase.str()
+                               << "Fail because vkGetPhysicalDeviceImageFormatProperties returned "
+                               << getResultStr(propertiesResult) << TestLog::EndMessage;
+                       return tcu::TestStatus::fail("Unexpected result from vkGetPhysicalDeviceImageFormatProperties");
+               }
+       }
+
+       return tcu::TestStatus::pass("No sub-case failed");
+}
+
 tcu::TestStatus createSwapchainSimulateOOMTest (Context& context, TestParameters params)
 {
        const size_t                            maxCases                        = 300u;
 tcu::TestStatus createSwapchainSimulateOOMTest (Context& context, TestParameters params)
 {
        const size_t                            maxCases                        = 300u;
@@ -974,6 +1132,18 @@ void populateSwapchainGroup (tcu::TestCaseGroup* testGroup, GroupParameters para
        addFunctionCase(testGroup, "image_swapchain_create_info", "Test VkImageSwapchainCreateInfoKHR", testImageSwapchainCreateInfo, params.wsiType);
 }
 
        addFunctionCase(testGroup, "image_swapchain_create_info", "Test VkImageSwapchainCreateInfoKHR", testImageSwapchainCreateInfo, params.wsiType);
 }
 
+void populateSwapchainPrivateDataGroup (tcu::TestCaseGroup* testGroup, GroupParameters params)
+{
+       for (int dimensionNdx = 0; dimensionNdx < TEST_DIMENSION_LAST; ++dimensionNdx)
+       {
+               const TestDimension             testDimension   = (TestDimension)dimensionNdx;
+               if (testDimension == TEST_DIMENSION_IMAGE_EXTENT)
+                       continue;
+
+               addFunctionCase(testGroup, getTestDimensionName(testDimension), "", params.function, TestParameters(params.wsiType, testDimension));
+       }
+}
+
 VkSwapchainCreateInfoKHR getBasicSwapchainParameters (Type                                             wsiType,
                                                                                                          const InstanceInterface&      vki,
                                                                                                          VkPhysicalDevice                      physicalDevice,
 VkSwapchainCreateInfoKHR getBasicSwapchainParameters (Type                                             wsiType,
                                                                                                          const InstanceInterface&      vki,
                                                                                                          VkPhysicalDevice                      physicalDevice,
@@ -2475,13 +2645,14 @@ void populateAcquireGroup (tcu::TestCaseGroup* testGroup, Type wsiType)
 
 void createSwapchainTests (tcu::TestCaseGroup* testGroup, vk::wsi::Type wsiType)
 {
 
 void createSwapchainTests (tcu::TestCaseGroup* testGroup, vk::wsi::Type wsiType)
 {
-       addTestGroup(testGroup, "create",                       "Create VkSwapchain with various parameters",                                   populateSwapchainGroup,         GroupParameters(wsiType, createSwapchainTest));
-       addTestGroup(testGroup, "simulate_oom",         "Simulate OOM using callbacks during swapchain construction",   populateSwapchainGroup,         GroupParameters(wsiType, createSwapchainSimulateOOMTest));
-       addTestGroup(testGroup, "render",                       "Rendering Tests",                                                                                              populateRenderGroup,            wsiType);
-       addTestGroup(testGroup, "modify",                       "Modify VkSwapchain",                                                                                   populateModifyGroup,            wsiType);
-       addTestGroup(testGroup, "destroy",                      "Destroy VkSwapchain",                                                                                  populateDestroyGroup,           wsiType);
-       addTestGroup(testGroup, "get_images",           "Get swapchain images",                                                                                 populateGetImagesGroup,         wsiType);
-       addTestGroup(testGroup, "acquire",                      "Ancquire next swapchain image",                                                                populateAcquireGroup,           wsiType);
+       addTestGroup(testGroup, "create",                       "Create VkSwapchain with various parameters",                                   populateSwapchainGroup,                                 GroupParameters(wsiType, createSwapchainTest));
+       addTestGroup(testGroup, "simulate_oom",         "Simulate OOM using callbacks during swapchain construction",   populateSwapchainGroup,                                 GroupParameters(wsiType, createSwapchainSimulateOOMTest));
+       addTestGroup(testGroup, "render",                       "Rendering Tests",                                                                                              populateRenderGroup,                                    wsiType);
+       addTestGroup(testGroup, "modify",                       "Modify VkSwapchain",                                                                                   populateModifyGroup,                                    wsiType);
+       addTestGroup(testGroup, "destroy",                      "Destroy VkSwapchain",                                                                                  populateDestroyGroup,                                   wsiType);
+       addTestGroup(testGroup, "get_images",           "Get swapchain images",                                                                                 populateGetImagesGroup,                                 wsiType);
+       addTestGroup(testGroup, "acquire",                      "Ancquire next swapchain image",                                                                populateAcquireGroup,                                   wsiType);
+       addTestGroup(testGroup, "private_data",         "Create VkSwapchain and use VK_EXT_private_data",                               populateSwapchainPrivateDataGroup,              GroupParameters(wsiType, createSwapchainPrivateDataTest));
 }
 
 } // wsi
 }
 
 } // wsi
index f9eeaa7..4aae355 100644 (file)
@@ -4123,6 +4123,46 @@ dEQP-VK.api.object_management.alloc_callback_fail_multiple.compute_pipeline
 dEQP-VK.api.object_management.alloc_callback_fail_multiple.descriptor_set
 dEQP-VK.api.object_management.alloc_callback_fail_multiple.command_buffer_primary
 dEQP-VK.api.object_management.alloc_callback_fail_multiple.command_buffer_secondary
 dEQP-VK.api.object_management.alloc_callback_fail_multiple.descriptor_set
 dEQP-VK.api.object_management.alloc_callback_fail_multiple.command_buffer_primary
 dEQP-VK.api.object_management.alloc_callback_fail_multiple.command_buffer_secondary
+dEQP-VK.api.object_management.private_data.device_memory_small
+dEQP-VK.api.object_management.private_data.buffer_uniform_small
+dEQP-VK.api.object_management.private_data.buffer_uniform_large
+dEQP-VK.api.object_management.private_data.buffer_storage_small
+dEQP-VK.api.object_management.private_data.buffer_storage_large
+dEQP-VK.api.object_management.private_data.buffer_view_uniform_r8g8b8a8_unorm
+dEQP-VK.api.object_management.private_data.buffer_view_storage_r8g8b8a8_unorm
+dEQP-VK.api.object_management.private_data.image_1d
+dEQP-VK.api.object_management.private_data.image_2d
+dEQP-VK.api.object_management.private_data.image_3d
+dEQP-VK.api.object_management.private_data.image_view_1d
+dEQP-VK.api.object_management.private_data.image_view_1d_arr
+dEQP-VK.api.object_management.private_data.image_view_2d
+dEQP-VK.api.object_management.private_data.image_view_2d_arr
+dEQP-VK.api.object_management.private_data.image_view_cube
+dEQP-VK.api.object_management.private_data.image_view_cube_arr
+dEQP-VK.api.object_management.private_data.image_view_3d
+dEQP-VK.api.object_management.private_data.semaphore
+dEQP-VK.api.object_management.private_data.event
+dEQP-VK.api.object_management.private_data.fence
+dEQP-VK.api.object_management.private_data.fence_signaled
+dEQP-VK.api.object_management.private_data.query_pool
+dEQP-VK.api.object_management.private_data.sampler
+dEQP-VK.api.object_management.private_data.shader_module
+dEQP-VK.api.object_management.private_data.pipeline_cache
+dEQP-VK.api.object_management.private_data.pipeline_layout_empty
+dEQP-VK.api.object_management.private_data.pipeline_layout_single
+dEQP-VK.api.object_management.private_data.render_pass
+dEQP-VK.api.object_management.private_data.graphics_pipeline
+dEQP-VK.api.object_management.private_data.compute_pipeline
+dEQP-VK.api.object_management.private_data.descriptor_set_layout_empty
+dEQP-VK.api.object_management.private_data.descriptor_set_layout_single
+dEQP-VK.api.object_management.private_data.descriptor_pool
+dEQP-VK.api.object_management.private_data.descriptor_pool_free_descriptor_set
+dEQP-VK.api.object_management.private_data.descriptor_set
+dEQP-VK.api.object_management.private_data.framebuffer
+dEQP-VK.api.object_management.private_data.command_pool
+dEQP-VK.api.object_management.private_data.command_pool_transient
+dEQP-VK.api.object_management.private_data.command_buffer_primary
+dEQP-VK.api.object_management.private_data.command_buffer_secondary
 dEQP-VK.api.buffer.suballocation.transfer_src.transfer_dst.uniform_texel.storage_texel.uniform.storage.index.vertex.indirect.create.zero
 dEQP-VK.api.buffer.suballocation.transfer_src.transfer_dst.uniform_texel.storage_texel.uniform.storage.index.vertex.indirect.create.binding
 dEQP-VK.api.buffer.suballocation.transfer_src.transfer_dst.uniform_texel.storage_texel.uniform.storage.index.vertex.indirect.create.binding_residency
 dEQP-VK.api.buffer.suballocation.transfer_src.transfer_dst.uniform_texel.storage_texel.uniform.storage.index.vertex.indirect.create.zero
 dEQP-VK.api.buffer.suballocation.transfer_src.transfer_dst.uniform_texel.storage_texel.uniform.storage.index.vertex.indirect.create.binding
 dEQP-VK.api.buffer.suballocation.transfer_src.transfer_dst.uniform_texel.storage_texel.uniform.storage.index.vertex.indirect.create.binding_residency
@@ -492646,6 +492686,15 @@ dEQP-VK.wsi.xlib.swapchain.get_images.incomplete
 dEQP-VK.wsi.xlib.swapchain.get_images.count
 dEQP-VK.wsi.xlib.swapchain.acquire.too_many
 dEQP-VK.wsi.xlib.swapchain.acquire.too_many_timeout
 dEQP-VK.wsi.xlib.swapchain.get_images.count
 dEQP-VK.wsi.xlib.swapchain.acquire.too_many
 dEQP-VK.wsi.xlib.swapchain.acquire.too_many_timeout
+dEQP-VK.wsi.xlib.swapchain.private_data.min_image_count
+dEQP-VK.wsi.xlib.swapchain.private_data.image_format
+dEQP-VK.wsi.xlib.swapchain.private_data.image_array_layers
+dEQP-VK.wsi.xlib.swapchain.private_data.image_usage
+dEQP-VK.wsi.xlib.swapchain.private_data.image_sharing_mode
+dEQP-VK.wsi.xlib.swapchain.private_data.pre_transform
+dEQP-VK.wsi.xlib.swapchain.private_data.composite_alpha
+dEQP-VK.wsi.xlib.swapchain.private_data.present_mode
+dEQP-VK.wsi.xlib.swapchain.private_data.clipped
 dEQP-VK.wsi.xlib.incremental_present.scale_none.immediate.identity.opaque.reference
 dEQP-VK.wsi.xlib.incremental_present.scale_none.immediate.identity.opaque.incremental_present
 dEQP-VK.wsi.xlib.incremental_present.scale_none.immediate.identity.pre_multiplied.reference
 dEQP-VK.wsi.xlib.incremental_present.scale_none.immediate.identity.opaque.reference
 dEQP-VK.wsi.xlib.incremental_present.scale_none.immediate.identity.opaque.incremental_present
 dEQP-VK.wsi.xlib.incremental_present.scale_none.immediate.identity.pre_multiplied.reference
@@ -493069,6 +493118,15 @@ dEQP-VK.wsi.xcb.swapchain.get_images.incomplete
 dEQP-VK.wsi.xcb.swapchain.get_images.count
 dEQP-VK.wsi.xcb.swapchain.acquire.too_many
 dEQP-VK.wsi.xcb.swapchain.acquire.too_many_timeout
 dEQP-VK.wsi.xcb.swapchain.get_images.count
 dEQP-VK.wsi.xcb.swapchain.acquire.too_many
 dEQP-VK.wsi.xcb.swapchain.acquire.too_many_timeout
+dEQP-VK.wsi.xcb.swapchain.private_data.min_image_count
+dEQP-VK.wsi.xcb.swapchain.private_data.image_format
+dEQP-VK.wsi.xcb.swapchain.private_data.image_array_layers
+dEQP-VK.wsi.xcb.swapchain.private_data.image_usage
+dEQP-VK.wsi.xcb.swapchain.private_data.image_sharing_mode
+dEQP-VK.wsi.xcb.swapchain.private_data.pre_transform
+dEQP-VK.wsi.xcb.swapchain.private_data.composite_alpha
+dEQP-VK.wsi.xcb.swapchain.private_data.present_mode
+dEQP-VK.wsi.xcb.swapchain.private_data.clipped
 dEQP-VK.wsi.xcb.incremental_present.scale_none.immediate.identity.opaque.reference
 dEQP-VK.wsi.xcb.incremental_present.scale_none.immediate.identity.opaque.incremental_present
 dEQP-VK.wsi.xcb.incremental_present.scale_none.immediate.identity.pre_multiplied.reference
 dEQP-VK.wsi.xcb.incremental_present.scale_none.immediate.identity.opaque.reference
 dEQP-VK.wsi.xcb.incremental_present.scale_none.immediate.identity.opaque.incremental_present
 dEQP-VK.wsi.xcb.incremental_present.scale_none.immediate.identity.pre_multiplied.reference
@@ -493491,6 +493549,15 @@ dEQP-VK.wsi.wayland.swapchain.get_images.incomplete
 dEQP-VK.wsi.wayland.swapchain.get_images.count
 dEQP-VK.wsi.wayland.swapchain.acquire.too_many
 dEQP-VK.wsi.wayland.swapchain.acquire.too_many_timeout
 dEQP-VK.wsi.wayland.swapchain.get_images.count
 dEQP-VK.wsi.wayland.swapchain.acquire.too_many
 dEQP-VK.wsi.wayland.swapchain.acquire.too_many_timeout
+dEQP-VK.wsi.wayland.swapchain.private_data.min_image_count
+dEQP-VK.wsi.wayland.swapchain.private_data.image_format
+dEQP-VK.wsi.wayland.swapchain.private_data.image_array_layers
+dEQP-VK.wsi.wayland.swapchain.private_data.image_usage
+dEQP-VK.wsi.wayland.swapchain.private_data.image_sharing_mode
+dEQP-VK.wsi.wayland.swapchain.private_data.pre_transform
+dEQP-VK.wsi.wayland.swapchain.private_data.composite_alpha
+dEQP-VK.wsi.wayland.swapchain.private_data.present_mode
+dEQP-VK.wsi.wayland.swapchain.private_data.clipped
 dEQP-VK.wsi.wayland.incremental_present.scale_none.immediate.identity.opaque.reference
 dEQP-VK.wsi.wayland.incremental_present.scale_none.immediate.identity.opaque.incremental_present
 dEQP-VK.wsi.wayland.incremental_present.scale_none.immediate.identity.pre_multiplied.reference
 dEQP-VK.wsi.wayland.incremental_present.scale_none.immediate.identity.opaque.reference
 dEQP-VK.wsi.wayland.incremental_present.scale_none.immediate.identity.opaque.incremental_present
 dEQP-VK.wsi.wayland.incremental_present.scale_none.immediate.identity.pre_multiplied.reference
@@ -493914,6 +493981,15 @@ dEQP-VK.wsi.android.swapchain.get_images.incomplete
 dEQP-VK.wsi.android.swapchain.get_images.count
 dEQP-VK.wsi.android.swapchain.acquire.too_many
 dEQP-VK.wsi.android.swapchain.acquire.too_many_timeout
 dEQP-VK.wsi.android.swapchain.get_images.count
 dEQP-VK.wsi.android.swapchain.acquire.too_many
 dEQP-VK.wsi.android.swapchain.acquire.too_many_timeout
+dEQP-VK.wsi.android.swapchain.private_data.min_image_count
+dEQP-VK.wsi.android.swapchain.private_data.image_format
+dEQP-VK.wsi.android.swapchain.private_data.image_array_layers
+dEQP-VK.wsi.android.swapchain.private_data.image_usage
+dEQP-VK.wsi.android.swapchain.private_data.image_sharing_mode
+dEQP-VK.wsi.android.swapchain.private_data.pre_transform
+dEQP-VK.wsi.android.swapchain.private_data.composite_alpha
+dEQP-VK.wsi.android.swapchain.private_data.present_mode
+dEQP-VK.wsi.android.swapchain.private_data.clipped
 dEQP-VK.wsi.android.incremental_present.scale_none.immediate.identity.opaque.reference
 dEQP-VK.wsi.android.incremental_present.scale_none.immediate.identity.opaque.incremental_present
 dEQP-VK.wsi.android.incremental_present.scale_none.immediate.identity.pre_multiplied.reference
 dEQP-VK.wsi.android.incremental_present.scale_none.immediate.identity.opaque.reference
 dEQP-VK.wsi.android.incremental_present.scale_none.immediate.identity.opaque.incremental_present
 dEQP-VK.wsi.android.incremental_present.scale_none.immediate.identity.pre_multiplied.reference
@@ -495057,6 +495133,15 @@ dEQP-VK.wsi.win32.swapchain.get_images.incomplete
 dEQP-VK.wsi.win32.swapchain.get_images.count
 dEQP-VK.wsi.win32.swapchain.acquire.too_many
 dEQP-VK.wsi.win32.swapchain.acquire.too_many_timeout
 dEQP-VK.wsi.win32.swapchain.get_images.count
 dEQP-VK.wsi.win32.swapchain.acquire.too_many
 dEQP-VK.wsi.win32.swapchain.acquire.too_many_timeout
+dEQP-VK.wsi.win32.swapchain.private_data.min_image_count
+dEQP-VK.wsi.win32.swapchain.private_data.image_format
+dEQP-VK.wsi.win32.swapchain.private_data.image_array_layers
+dEQP-VK.wsi.win32.swapchain.private_data.image_usage
+dEQP-VK.wsi.win32.swapchain.private_data.image_sharing_mode
+dEQP-VK.wsi.win32.swapchain.private_data.pre_transform
+dEQP-VK.wsi.win32.swapchain.private_data.composite_alpha
+dEQP-VK.wsi.win32.swapchain.private_data.present_mode
+dEQP-VK.wsi.win32.swapchain.private_data.clipped
 dEQP-VK.wsi.win32.incremental_present.scale_none.immediate.identity.opaque.reference
 dEQP-VK.wsi.win32.incremental_present.scale_none.immediate.identity.opaque.incremental_present
 dEQP-VK.wsi.win32.incremental_present.scale_none.immediate.identity.pre_multiplied.reference
 dEQP-VK.wsi.win32.incremental_present.scale_none.immediate.identity.opaque.reference
 dEQP-VK.wsi.win32.incremental_present.scale_none.immediate.identity.opaque.incremental_present
 dEQP-VK.wsi.win32.incremental_present.scale_none.immediate.identity.pre_multiplied.reference
@@ -495480,6 +495565,15 @@ dEQP-VK.wsi.macos.swapchain.get_images.incomplete
 dEQP-VK.wsi.macos.swapchain.get_images.count
 dEQP-VK.wsi.macos.swapchain.acquire.too_many
 dEQP-VK.wsi.macos.swapchain.acquire.too_many_timeout
 dEQP-VK.wsi.macos.swapchain.get_images.count
 dEQP-VK.wsi.macos.swapchain.acquire.too_many
 dEQP-VK.wsi.macos.swapchain.acquire.too_many_timeout
+dEQP-VK.wsi.macos.swapchain.private_data.min_image_count
+dEQP-VK.wsi.macos.swapchain.private_data.image_format
+dEQP-VK.wsi.macos.swapchain.private_data.image_array_layers
+dEQP-VK.wsi.macos.swapchain.private_data.image_usage
+dEQP-VK.wsi.macos.swapchain.private_data.image_sharing_mode
+dEQP-VK.wsi.macos.swapchain.private_data.pre_transform
+dEQP-VK.wsi.macos.swapchain.private_data.composite_alpha
+dEQP-VK.wsi.macos.swapchain.private_data.present_mode
+dEQP-VK.wsi.macos.swapchain.private_data.clipped
 dEQP-VK.wsi.macos.incremental_present.scale_none.immediate.identity.opaque.reference
 dEQP-VK.wsi.macos.incremental_present.scale_none.immediate.identity.opaque.incremental_present
 dEQP-VK.wsi.macos.incremental_present.scale_none.immediate.identity.pre_multiplied.reference
 dEQP-VK.wsi.macos.incremental_present.scale_none.immediate.identity.opaque.reference
 dEQP-VK.wsi.macos.incremental_present.scale_none.immediate.identity.opaque.incremental_present
 dEQP-VK.wsi.macos.incremental_present.scale_none.immediate.identity.pre_multiplied.reference
old mode 100644 (file)
new mode 100755 (executable)
index dfda6e9..4feb9ad
@@ -1164,6 +1164,22 @@ def writeStrUtilImpl (api, filename):
                                yield "}"
        writeInlFile(filename, INL_HEADER, makeStrUtilImpl())
 
                                yield "}"
        writeInlFile(filename, INL_HEADER, makeStrUtilImpl())
 
+
+def writeObjTypeImpl (api, filename):
+       def makeObjTypeImpl ():
+
+               yield "namespace vk"
+               yield "{"
+
+               yield "template<typename T> VkObjectType getObjectType  (void);"
+
+               for line in indentLines(["template<> inline VkObjectType\tgetObjectType<%s>\t(void) { return %s;\t}" % (handle.name, prefixName("VK_OBJECT_TYPE_", handle.name)) for handle in api.handles if not handle.isAlias]):
+                       yield line
+
+               yield "}"
+
+       writeInlFile(filename, INL_HEADER, makeObjTypeImpl())
+
 class ConstructorFunction:
        def __init__ (self, type, name, objectType, ifaceArgs, arguments):
                self.type               = type
 class ConstructorFunction:
        def __init__ (self, type, name, objectType, ifaceArgs, arguments):
                self.type               = type
@@ -2246,10 +2262,9 @@ if __name__ == "__main__":
        writeSupportedExtenions                                 (api, os.path.join(VULKAN_DIR, "vkSupportedExtensions.inl"))
        writeCoreFunctionalities                                (api, os.path.join(VULKAN_DIR, "vkCoreFunctionalities.inl"))
        writeExtensionFunctions                                 (api, os.path.join(VULKAN_DIR, "vkExtensionFunctions.inl"))
        writeSupportedExtenions                                 (api, os.path.join(VULKAN_DIR, "vkSupportedExtensions.inl"))
        writeCoreFunctionalities                                (api, os.path.join(VULKAN_DIR, "vkCoreFunctionalities.inl"))
        writeExtensionFunctions                                 (api, os.path.join(VULKAN_DIR, "vkExtensionFunctions.inl"))
-
        writeDeviceFeatures2                                    (api, os.path.join(VULKAN_DIR, "vkDeviceFeatures2.inl"))
        writeDeviceFeatures2                                    (api, os.path.join(VULKAN_DIR, "vkDeviceFeatures2.inl"))
-
        writeMandatoryFeatures                                  (     os.path.join(VULKAN_DIR, "vkMandatoryFeatures.inl"))
        writeExtensionList                                              (     os.path.join(VULKAN_DIR, "vkInstanceExtensions.inl"),                             'INSTANCE')
        writeExtensionList                                              (     os.path.join(VULKAN_DIR, "vkDeviceExtensions.inl"),                               'DEVICE')
        writeMandatoryFeatures                                  (     os.path.join(VULKAN_DIR, "vkMandatoryFeatures.inl"))
        writeExtensionList                                              (     os.path.join(VULKAN_DIR, "vkInstanceExtensions.inl"),                             'INSTANCE')
        writeExtensionList                                              (     os.path.join(VULKAN_DIR, "vkDeviceExtensions.inl"),                               'DEVICE')
-       writeDriverIds                                                  (     os.path.join(VULKAN_DIR, "vkKnownDriverIds.inl"))
\ No newline at end of file
+       writeDriverIds                                                  (     os.path.join(VULKAN_DIR, "vkKnownDriverIds.inl"))
+       writeObjTypeImpl                                                (api, os.path.join(VULKAN_DIR, "vkObjTypeImpl.inl"))