1e5c31af7Sopenharmony_ci// asciidoc -b html5 -d book -f apitests.conf apitests.adoc 2e5c31af7Sopenharmony_ci 3e5c31af7Sopenharmony_ci:toc: 4e5c31af7Sopenharmony_ci:numbered: 5e5c31af7Sopenharmony_ci:docinfo: 6e5c31af7Sopenharmony_ci:revnumber: 4 7e5c31af7Sopenharmony_ci 8e5c31af7Sopenharmony_ciVulkan API Test Plan 9e5c31af7Sopenharmony_ci==================== 10e5c31af7Sopenharmony_ci 11e5c31af7Sopenharmony_ciThis document currently outlines Vulkan API testing plan. The document splits API into features, and for each the important testing objectives are described. The technical implementation is not currently planned or documented here, except in select cases. 12e5c31af7Sopenharmony_ci 13e5c31af7Sopenharmony_ciIn the future this document will likely evolve into a description of various tests and test coverage. 14e5c31af7Sopenharmony_ci 15e5c31af7Sopenharmony_ciTest framework 16e5c31af7Sopenharmony_ci-------------- 17e5c31af7Sopenharmony_ci 18e5c31af7Sopenharmony_ciTest framework will provide tests access to Vulkan platform interface. In addition a library of generic utilties will be provided. 19e5c31af7Sopenharmony_ci 20e5c31af7Sopenharmony_ciTest case base class 21e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~ 22e5c31af7Sopenharmony_ci 23e5c31af7Sopenharmony_ciVulkan test cases will use a slightly different interface from traditional +tcu::TestCase+ to facilitate following: 24e5c31af7Sopenharmony_ci 25e5c31af7Sopenharmony_ci * Ability to generate shaders in high-level language, and pre-compile them without running the tests 26e5c31af7Sopenharmony_ci * Cleaner separation between test case parameters and execution instance 27e5c31af7Sopenharmony_ci 28e5c31af7Sopenharmony_ci[source,cpp] 29e5c31af7Sopenharmony_ci---- 30e5c31af7Sopenharmony_ciclass TestCase : public tcu::TestCase 31e5c31af7Sopenharmony_ci{ 32e5c31af7Sopenharmony_cipublic: 33e5c31af7Sopenharmony_ci TestCase (tcu::TestContext& testCtx, const std::string& name); 34e5c31af7Sopenharmony_ci TestCase (tcu::TestContext& testCtx, tcu::TestNodeType type, const std::string& name); 35e5c31af7Sopenharmony_ci virtual ~TestCase (void) {} 36e5c31af7Sopenharmony_ci 37e5c31af7Sopenharmony_ci virtual void initPrograms (vk::ProgramCollection<glu::ProgramSources>& programCollection) const; 38e5c31af7Sopenharmony_ci virtual TestInstance* createInstance (Context& context) const = 0; 39e5c31af7Sopenharmony_ci 40e5c31af7Sopenharmony_ci IterateResult iterate (void) { DE_ASSERT(false); return STOP; } // Deprecated in this module 41e5c31af7Sopenharmony_ci}; 42e5c31af7Sopenharmony_ci 43e5c31af7Sopenharmony_ciclass TestInstance 44e5c31af7Sopenharmony_ci{ 45e5c31af7Sopenharmony_cipublic: 46e5c31af7Sopenharmony_ci TestInstance (Context& context) : m_context(context) {} 47e5c31af7Sopenharmony_ci virtual ~TestInstance (void) {} 48e5c31af7Sopenharmony_ci 49e5c31af7Sopenharmony_ci virtual tcu::TestStatus iterate (void) = 0; 50e5c31af7Sopenharmony_ci 51e5c31af7Sopenharmony_ciprotected: 52e5c31af7Sopenharmony_ci Context& m_context; 53e5c31af7Sopenharmony_ci}; 54e5c31af7Sopenharmony_ci---- 55e5c31af7Sopenharmony_ci 56e5c31af7Sopenharmony_ciIn addition for simple tests a utility to wrap a function as a test case is provided: 57e5c31af7Sopenharmony_ci 58e5c31af7Sopenharmony_ci[source,cpp] 59e5c31af7Sopenharmony_ci---- 60e5c31af7Sopenharmony_citcu::TestStatus createSamplerTest (Context& context) 61e5c31af7Sopenharmony_ci{ 62e5c31af7Sopenharmony_ci TestLog& log = context.getTestContext().getLog(); 63e5c31af7Sopenharmony_ci const DefaultDevice device (context.getPlatformInterface(), context.getTestContext().getCommandLine()); 64e5c31af7Sopenharmony_ci const VkDevice vkDevice = device.getDevice(); 65e5c31af7Sopenharmony_ci const DeviceInterface& vk = device.getInterface(); 66e5c31af7Sopenharmony_ci 67e5c31af7Sopenharmony_ci { 68e5c31af7Sopenharmony_ci const struct VkSamplerCreateInfo samplerInfo = 69e5c31af7Sopenharmony_ci { 70e5c31af7Sopenharmony_ci VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO, // VkStructureType sType; 71e5c31af7Sopenharmony_ci DE_NULL, // const void* pNext; 72e5c31af7Sopenharmony_ci VK_TEX_FILTER_NEAREST, // VkTexFilter magFilter; 73e5c31af7Sopenharmony_ci VK_TEX_FILTER_NEAREST, // VkTexFilter minFilter; 74e5c31af7Sopenharmony_ci VK_TEX_MIPMAP_MODE_BASE, // VkTexMipmapMode mipMode; 75e5c31af7Sopenharmony_ci VK_TEX_ADDRESS_CLAMP, // VkTexAddress addressU; 76e5c31af7Sopenharmony_ci VK_TEX_ADDRESS_CLAMP, // VkTexAddress addressV; 77e5c31af7Sopenharmony_ci VK_TEX_ADDRESS_CLAMP, // VkTexAddress addressW; 78e5c31af7Sopenharmony_ci 0.0f, // float mipLodBias; 79e5c31af7Sopenharmony_ci 0u, // deUint32 maxAnisotropy; 80e5c31af7Sopenharmony_ci VK_COMPARE_OP_ALWAYS, // VkCompareOp compareOp; 81e5c31af7Sopenharmony_ci 0.0f, // float minLod; 82e5c31af7Sopenharmony_ci 0.0f, // float maxLod; 83e5c31af7Sopenharmony_ci VK_BORDER_COLOR_TRANSPARENT_BLACK, // VkBorderColor borderColor; 84e5c31af7Sopenharmony_ci }; 85e5c31af7Sopenharmony_ci 86e5c31af7Sopenharmony_ci Move<VkSamplerT> tmpSampler = createSampler(vk, vkDevice, &samplerInfo); 87e5c31af7Sopenharmony_ci } 88e5c31af7Sopenharmony_ci 89e5c31af7Sopenharmony_ci return tcu::TestStatus::pass("Creating sampler succeeded"); 90e5c31af7Sopenharmony_ci} 91e5c31af7Sopenharmony_ci 92e5c31af7Sopenharmony_citcu::TestCaseGroup* createTests (tcu::TestContext& testCtx) 93e5c31af7Sopenharmony_ci{ 94e5c31af7Sopenharmony_ci de::MovePtr<tcu::TestCaseGroup> apiTests (new tcu::TestCaseGroup(testCtx, "api")); 95e5c31af7Sopenharmony_ci 96e5c31af7Sopenharmony_ci addFunctionCase(apiTests.get(), "create_sampler", "", createSamplerTest); 97e5c31af7Sopenharmony_ci 98e5c31af7Sopenharmony_ci return apiTests.release(); 99e5c31af7Sopenharmony_ci} 100e5c31af7Sopenharmony_ci---- 101e5c31af7Sopenharmony_ci 102e5c31af7Sopenharmony_ci+vkt::Context+, which is passed to +vkt::TestInstance+ will provide access to Vulkan platform interface, and a default device instance. Most test cases should use default device instance: 103e5c31af7Sopenharmony_ci 104e5c31af7Sopenharmony_ci * Creating device can take up to tens of milliseconds 105e5c31af7Sopenharmony_ci * --deqp-vk-device-id=N command line option can be used to change device 106e5c31af7Sopenharmony_ci * Framework can force validation layers (--deqp-vk-layers=validation,...) 107e5c31af7Sopenharmony_ci 108e5c31af7Sopenharmony_ciOther considerations: 109e5c31af7Sopenharmony_ci 110e5c31af7Sopenharmony_ci * Rather than using default header, deqp uses custom header & interface wrappers 111e5c31af7Sopenharmony_ci ** See +vk::PlatformInterface+ and +vk::DeviceInterface+ 112e5c31af7Sopenharmony_ci ** Enables optional run-time dependency to Vulkan driver (required for Android, useful in general) 113e5c31af7Sopenharmony_ci ** Various logging & other analysis facilities can be layered on top of that interface 114e5c31af7Sopenharmony_ci * Expose validation state to tests to be able to test validation 115e5c31af7Sopenharmony_ci * Extensions are opt-in, some tests will require certain extensions to work 116e5c31af7Sopenharmony_ci ** --deqp-vk-extensions? enable all by default? 117e5c31af7Sopenharmony_ci ** Probably good to be able to override extensions as well (verify that tests report correct results without extensions) 118e5c31af7Sopenharmony_ci 119e5c31af7Sopenharmony_ciCommon utilities 120e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~~~ 121e5c31af7Sopenharmony_ci 122e5c31af7Sopenharmony_ciTest case independent Vulkan utilities will be provided in +vk+ namespace, and can be found under +framework/vulkan+. These include: 123e5c31af7Sopenharmony_ci 124e5c31af7Sopenharmony_ci * +Unique<T>+ and +Move<T>+ wrappers for Vulkan API objects 125e5c31af7Sopenharmony_ci * Creating all types of work with configurable parameters: 126e5c31af7Sopenharmony_ci ** Workload "size" (not really comparable between types) 127e5c31af7Sopenharmony_ci ** Consume & produce memory contents 128e5c31af7Sopenharmony_ci *** Simple checksumming / other verification against reference data typically fine 129e5c31af7Sopenharmony_ci 130e5c31af7Sopenharmony_ci.TODO 131e5c31af7Sopenharmony_ci * Document important utilities (vkRef.hpp for example). 132e5c31af7Sopenharmony_ci * Document Vulkan platform port. 133e5c31af7Sopenharmony_ci 134e5c31af7Sopenharmony_ciObject management 135e5c31af7Sopenharmony_ci----------------- 136e5c31af7Sopenharmony_ci 137e5c31af7Sopenharmony_ciObject management tests verify that the driver is able to create and destroy objects of all types. The tests don't attempt to use the objects (unless necessary for testing object construction) as that is covered by feature-specific tests. For all object types the object management tests cover: 138e5c31af7Sopenharmony_ci 139e5c31af7Sopenharmony_ci * Creating objects with a relevant set of parameters 140e5c31af7Sopenharmony_ci ** Not exhaustive, guided by what might actually make driver to take different path 141e5c31af7Sopenharmony_ci * Allocating multiple objects of same type 142e5c31af7Sopenharmony_ci ** Reasonable limit depends on object type 143e5c31af7Sopenharmony_ci * Creating objects from multiple threads concurrently (where possible) 144e5c31af7Sopenharmony_ci * Freeing objects from multiple threads 145e5c31af7Sopenharmony_ci 146e5c31af7Sopenharmony_ciNOTE: tests for various +vkCreate*()+ functions are documented in feature-specific sections. 147e5c31af7Sopenharmony_ci 148e5c31af7Sopenharmony_ciMultithreaded scaling 149e5c31af7Sopenharmony_ci--------------------- 150e5c31af7Sopenharmony_ci 151e5c31af7Sopenharmony_ciVulkan API is free-threaded and suggests that many operations (such as constructing command buffers) will scale with number of app threads. Tests are needed for proving that such scalability actually exists, and there are no locks in important functionality preventing that. 152e5c31af7Sopenharmony_ci 153e5c31af7Sopenharmony_ciNOTE: Khronos CTS has not traditionally included any performance testing, and the tests may not be part of conformance criteria. The tests may however be useful for IHVs for driver optimization, and could be enforced by platform-specific conformance tests, such as Android CTS. 154e5c31af7Sopenharmony_ci 155e5c31af7Sopenharmony_ciDestructor functions 156e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~ 157e5c31af7Sopenharmony_ci 158e5c31af7Sopenharmony_ciAPI Queries 159e5c31af7Sopenharmony_ci----------- 160e5c31af7Sopenharmony_ci 161e5c31af7Sopenharmony_ciObjective of API query tests is to validate that various +vkGet*+ functions return correct values. Generic checks that apply to all query types are: 162e5c31af7Sopenharmony_ci 163e5c31af7Sopenharmony_ci * Returned value size is equal or multiple of relevant struct size 164e5c31af7Sopenharmony_ci * Query doesn't write outside the provided pointer 165e5c31af7Sopenharmony_ci * Query values (where expected) don't change between subsequent queries 166e5c31af7Sopenharmony_ci * Concurrent queries from multiple threads work 167e5c31af7Sopenharmony_ci 168e5c31af7Sopenharmony_ciPlatform queries 169e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~~~ 170e5c31af7Sopenharmony_ci 171e5c31af7Sopenharmony_ciPlatform query tests will validate that all queries work as expected and return sensible values. 172e5c31af7Sopenharmony_ci 173e5c31af7Sopenharmony_ci * Sensible device properties 174e5c31af7Sopenharmony_ci ** May have some Android-specific requirements 175e5c31af7Sopenharmony_ci *** TBD queue 0 must be universal queue (all command types supported) 176e5c31af7Sopenharmony_ci * All required functions present 177e5c31af7Sopenharmony_ci ** Both platform (physicalDevice = 0) and device-specific 178e5c31af7Sopenharmony_ci ** Culled based on enabled extension list? 179e5c31af7Sopenharmony_ci 180e5c31af7Sopenharmony_ciDevice queries 181e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~ 182e5c31af7Sopenharmony_ci 183e5c31af7Sopenharmony_ciObject queries 184e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~ 185e5c31af7Sopenharmony_ci 186e5c31af7Sopenharmony_ci * Memory requirements: verify that for buffers the returned size is at least the size of the buffer 187e5c31af7Sopenharmony_ci 188e5c31af7Sopenharmony_ciFormat & image capabilities 189e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~~~~ 190e5c31af7Sopenharmony_ci 191e5c31af7Sopenharmony_ciMemory management 192e5c31af7Sopenharmony_ci----------------- 193e5c31af7Sopenharmony_ci 194e5c31af7Sopenharmony_ciMemory management tests cover memory allocation, sub-allocation, access, and CPU and GPU cache control. Testing some areas such as cache control will require stress-testing memory accesses from CPU and various pipeline stages. 195e5c31af7Sopenharmony_ci 196e5c31af7Sopenharmony_ciMemory allocation 197e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~~~~ 198e5c31af7Sopenharmony_ci 199e5c31af7Sopenharmony_ci * Test combination of: 200e5c31af7Sopenharmony_ci ** Various allocation sizes 201e5c31af7Sopenharmony_ci ** All heaps 202e5c31af7Sopenharmony_ci * Allocations that exceed total available memory size (expected to fail) 203e5c31af7Sopenharmony_ci * Concurrent allocation and free from multiple threads 204e5c31af7Sopenharmony_ci * Memory leak tests (may not work on platforms that overcommit) 205e5c31af7Sopenharmony_ci ** Allocate memory until fails, free all and repeat 206e5c31af7Sopenharmony_ci ** Total allocated memory size should remain stable over iterations 207e5c31af7Sopenharmony_ci ** Allocate and free in random order 208e5c31af7Sopenharmony_ci 209e5c31af7Sopenharmony_ci.Spec issues 210e5c31af7Sopenharmony_ci 211e5c31af7Sopenharmony_ciWhat are the alignment guarantees for the returned memory allocation? Will it satisfy alignment requirements for all object types? If not, app needs to know the alignment, or alignment parameter needs to be added to +VkMemoryAllocInfo+. 212e5c31af7Sopenharmony_ci 213e5c31af7Sopenharmony_ciMinimum allocation size? If 1, presumably implementation has to round it up to next page size at least? Is there a query for that? What happens when accessing the added padding? 214e5c31af7Sopenharmony_ci 215e5c31af7Sopenharmony_ciMapping memory and CPU access 216e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 217e5c31af7Sopenharmony_ci 218e5c31af7Sopenharmony_ci * Verify that mapping of all host-visible allocations succeed and accessing memory works 219e5c31af7Sopenharmony_ci * Verify mapping of sub-ranges 220e5c31af7Sopenharmony_ci * Access still works after un-mapping and re-mapping memory 221e5c31af7Sopenharmony_ci * Attaching or detaching memory allocation from buffer/image doesn't affect mapped memory access or contents 222e5c31af7Sopenharmony_ci ** Images: test with various formats, mip-levels etc. 223e5c31af7Sopenharmony_ci 224e5c31af7Sopenharmony_ci.Spec issues 225e5c31af7Sopenharmony_ci * Man pages say vkMapMemory is thread-safe, but to what extent? 226e5c31af7Sopenharmony_ci ** Mapping different VkDeviceMemory allocs concurrently? 227e5c31af7Sopenharmony_ci ** Mapping different sub-ranges of same VkDeviceMemory? 228e5c31af7Sopenharmony_ci ** Mapping overlapping sub-ranges of same VkDeviceMemory? 229e5c31af7Sopenharmony_ci * Okay to re-map same or overlapping range? What pointers should be returned in that case? 230e5c31af7Sopenharmony_ci * Can re-mapping same block return different virtual address? 231e5c31af7Sopenharmony_ci * Alignment of returned CPU pointer? 232e5c31af7Sopenharmony_ci ** Access using SIMD instructions can benefit from alignment 233e5c31af7Sopenharmony_ci 234e5c31af7Sopenharmony_ciCPU cache control 235e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~~~~ 236e5c31af7Sopenharmony_ci 237e5c31af7Sopenharmony_ci * TODO Semantics discussed at https://cvs.khronos.org/bugzilla/show_bug.cgi?id=13690 238e5c31af7Sopenharmony_ci ** Invalidate relevant for HOST_NON_COHERENT_BIT, flushes CPU read caches 239e5c31af7Sopenharmony_ci ** Flush flushes CPU write caches? 240e5c31af7Sopenharmony_ci * Test behavior with all possible mem alloc types & various sizes 241e5c31af7Sopenharmony_ci * Corner-cases: 242e5c31af7Sopenharmony_ci ** Empty list 243e5c31af7Sopenharmony_ci ** Empty ranges 244e5c31af7Sopenharmony_ci ** Same range specified multiple times 245e5c31af7Sopenharmony_ci ** Partial overlap between ranges 246e5c31af7Sopenharmony_ci 247e5c31af7Sopenharmony_ci.Spec issues 248e5c31af7Sopenharmony_ci * Thread-safety? Okay to flush different ranges concurrently? 249e5c31af7Sopenharmony_ci 250e5c31af7Sopenharmony_ciGPU cache control 251e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~~~~ 252e5c31af7Sopenharmony_ci 253e5c31af7Sopenharmony_ciValidate that GPU caches are invalidated where instructed. This includes visibility of memory writes made by both CPU and GPU to both CPU and GPU pipeline stages. 254e5c31af7Sopenharmony_ci 255e5c31af7Sopenharmony_ci * Image layout transitions may need special care 256e5c31af7Sopenharmony_ci 257e5c31af7Sopenharmony_ciBinding memory to objects 258e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~~ 259e5c31af7Sopenharmony_ci 260e5c31af7Sopenharmony_ci * Buffers and images only 261e5c31af7Sopenharmony_ci * Straightforward mapping where allocation size matches object size and memOffset = 0 262e5c31af7Sopenharmony_ci * Sub-allocation of larger allocations 263e5c31af7Sopenharmony_ci * Re-binding object to different memory allocation 264e5c31af7Sopenharmony_ci * Binding multiple objects to same or partially overlapping memory ranges 265e5c31af7Sopenharmony_ci ** Aliasing writable resources? Access granularity? 266e5c31af7Sopenharmony_ci * Binding various (supported) types of memory allocations 267e5c31af7Sopenharmony_ci 268e5c31af7Sopenharmony_ci.Spec issues 269e5c31af7Sopenharmony_ci * When binding multiple objects to same memory, will data in memory be visible for all objects? 270e5c31af7Sopenharmony_ci ** Reinterpretation rules? 271e5c31af7Sopenharmony_ci * Memory contents after re-binding memory to a different object? 272e5c31af7Sopenharmony_ci 273e5c31af7Sopenharmony_ciSparse resources 274e5c31af7Sopenharmony_ci---------------- 275e5c31af7Sopenharmony_ci 276e5c31af7Sopenharmony_ciSparse memory resources are treated as separate feature from basic memory management. Details TBD still. 277e5c31af7Sopenharmony_ci 278e5c31af7Sopenharmony_ciBinding model 279e5c31af7Sopenharmony_ci------------- 280e5c31af7Sopenharmony_ci 281e5c31af7Sopenharmony_ciThe objective of the binding model tests is to verify: 282e5c31af7Sopenharmony_ci 283e5c31af7Sopenharmony_ci * All valid descriptor sets can be created 284e5c31af7Sopenharmony_ci * Accessing resources from shaders using various layouts 285e5c31af7Sopenharmony_ci * Descriptor updates 286e5c31af7Sopenharmony_ci * Descriptor set chaining 287e5c31af7Sopenharmony_ci * Descriptor set limits 288e5c31af7Sopenharmony_ci 289e5c31af7Sopenharmony_ciAs a necessary side effect, the tests will provide coverage for allocating and accessing all types of resources from all shader stages. 290e5c31af7Sopenharmony_ci 291e5c31af7Sopenharmony_ciDescriptor set functions 292e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~ 293e5c31af7Sopenharmony_ci 294e5c31af7Sopenharmony_ciPipeline layout functions 295e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~~ 296e5c31af7Sopenharmony_ci 297e5c31af7Sopenharmony_ciPipeline layouts will be covered mostly by tests that use various layouts, but in addition some corner-case tests are needed: 298e5c31af7Sopenharmony_ci 299e5c31af7Sopenharmony_ci * Creating empty layouts for shaders that don't use any resources 300e5c31af7Sopenharmony_ci ** For example: vertex data generated with +gl_VertexID+ only 301e5c31af7Sopenharmony_ci 302e5c31af7Sopenharmony_ciMultipass 303e5c31af7Sopenharmony_ci--------- 304e5c31af7Sopenharmony_ci 305e5c31af7Sopenharmony_ciMultipass tests will verify: 306e5c31af7Sopenharmony_ci 307e5c31af7Sopenharmony_ci * Various possible multipass data flow configurations 308e5c31af7Sopenharmony_ci ** Target formats, number of targets, load, store, resolve, dependencies, ... 309e5c31af7Sopenharmony_ci ** Exhaustive tests for selected dimensions 310e5c31af7Sopenharmony_ci ** Randomized tests 311e5c31af7Sopenharmony_ci * Interaction with other features 312e5c31af7Sopenharmony_ci ** Blending 313e5c31af7Sopenharmony_ci ** Tessellation, geometry shaders (esp. massive geometry expansion) 314e5c31af7Sopenharmony_ci ** Barriers that may cause tiler flushes 315e5c31af7Sopenharmony_ci ** Queries 316e5c31af7Sopenharmony_ci * Large passes that may require tiler flushes 317e5c31af7Sopenharmony_ci 318e5c31af7Sopenharmony_ciDevice initialization 319e5c31af7Sopenharmony_ci--------------------- 320e5c31af7Sopenharmony_ci 321e5c31af7Sopenharmony_ciDevice initialization tests verify that all reported devices can be created, with various possible configurations. 322e5c31af7Sopenharmony_ci 323e5c31af7Sopenharmony_ci - +VkApplicationInfo+ parameters 324e5c31af7Sopenharmony_ci * Arbitrary +pAppName+ / +pEngineName+ (spaces, utf-8, ...) 325e5c31af7Sopenharmony_ci * +pAppName+ / +pEngineName+ = NULL? 326e5c31af7Sopenharmony_ci * +appVersion+ / +engineVersion+ for 0, ~0, couple of values 327e5c31af7Sopenharmony_ci * Valid +apiVersion+ 328e5c31af7Sopenharmony_ci * Invalid +apiVersion+ (expected to fail?) 329e5c31af7Sopenharmony_ci - +VkAllocCallbacks+ 330e5c31af7Sopenharmony_ci * Want to be able to run all tests with and without callbacks? 331e5c31af7Sopenharmony_ci ** See discussion about default device in framework section 332e5c31af7Sopenharmony_ci * Custom allocators that provide guardbands and check them at free 333e5c31af7Sopenharmony_ci * Override malloc / free and verify that driver doesn't call if callbacks provided 334e5c31af7Sopenharmony_ci ** As part of object mgmt tests 335e5c31af7Sopenharmony_ci * Must be inherited to all devices created from instance 336e5c31af7Sopenharmony_ci - +VkInstanceCreateInfo+ 337e5c31af7Sopenharmony_ci * Empty extension list 338e5c31af7Sopenharmony_ci * Unsupported extensions (expect VK_UNSUPPORTED) 339e5c31af7Sopenharmony_ci * Various combinations of supported extensions 340e5c31af7Sopenharmony_ci ** Any dependencies between extensions (enabling Y requires enabling X)? 341e5c31af7Sopenharmony_ci 342e5c31af7Sopenharmony_ci.Spec issues 343e5c31af7Sopenharmony_ci * Only VkPhysicalDevice is passed to vkCreateDevice, ICD-specific magic needed for passing callbacks down to VkDevice instance 344e5c31af7Sopenharmony_ci 345e5c31af7Sopenharmony_ci * Creating multiple devices from single physical device 346e5c31af7Sopenharmony_ci * Different queue configurations 347e5c31af7Sopenharmony_ci ** Combinations of supported node indexes 348e5c31af7Sopenharmony_ci ** Use of all queues simultaneously for various operations 349e5c31af7Sopenharmony_ci ** Various queue counts 350e5c31af7Sopenharmony_ci * Various extension combinations 351e5c31af7Sopenharmony_ci * Flags 352e5c31af7Sopenharmony_ci ** Enabling validation (see spec issues) 353e5c31af7Sopenharmony_ci ** VK_DEVICE_CREATE_MULTI_DEVICE_IQ_MATCH_BIT not relevant for Android 354e5c31af7Sopenharmony_ci 355e5c31af7Sopenharmony_ci.Spec issues 356e5c31af7Sopenharmony_ci * Can same queue node index used multiple times in +pRequestedQueues+ list? 357e5c31af7Sopenharmony_ci * VK_DEVICE_CREATE_VALIDATION_BIT vs. layers 358e5c31af7Sopenharmony_ci 359e5c31af7Sopenharmony_ciQueue functions 360e5c31af7Sopenharmony_ci--------------- 361e5c31af7Sopenharmony_ci 362e5c31af7Sopenharmony_ciQueue functions (one currently) will have a lot of indicental coverage from other tests, so only targeted corner-case tests are needed: 363e5c31af7Sopenharmony_ci 364e5c31af7Sopenharmony_ci * +cmdBufferCount+ = 0 365e5c31af7Sopenharmony_ci * Submitting empty VkCmdBuffer 366e5c31af7Sopenharmony_ci 367e5c31af7Sopenharmony_ci.Spec issues 368e5c31af7Sopenharmony_ci * Can +fence+ be +NULL+ if app doesn't need it? 369e5c31af7Sopenharmony_ci 370e5c31af7Sopenharmony_ciSynchronization 371e5c31af7Sopenharmony_ci--------------- 372e5c31af7Sopenharmony_ci 373e5c31af7Sopenharmony_ciSynchronization tests will verify that all execution ordering primitives provided by the API will function as expected. Testing scheduling and synchronization robustness will require generating non-trivial workloads and possibly randomization to reveal potential issues. 374e5c31af7Sopenharmony_ci 375e5c31af7Sopenharmony_ci * Verify that all sync objects signaled after *WaitIdle() returns 376e5c31af7Sopenharmony_ci ** Fences (vkGetFenceStatus) 377e5c31af7Sopenharmony_ci ** Events (vkEventGetStatus) 378e5c31af7Sopenharmony_ci ** No way to query semaphore status? 379e5c31af7Sopenharmony_ci * Threads blocking at vkWaitForFences() must be resumed 380e5c31af7Sopenharmony_ci * Various amounts of work queued (from nothing to large command buffers) 381e5c31af7Sopenharmony_ci * vkDeviceWaitIdle() concurrently with commands that submit more work 382e5c31af7Sopenharmony_ci * all types of work 383e5c31af7Sopenharmony_ci 384e5c31af7Sopenharmony_ciFences 385e5c31af7Sopenharmony_ci~~~~~~ 386e5c31af7Sopenharmony_ci 387e5c31af7Sopenharmony_ci * Basic waiting on fences 388e5c31af7Sopenharmony_ci ** All types of commands 389e5c31af7Sopenharmony_ci ** Waiting on a different thread than the thread that submitted the work 390e5c31af7Sopenharmony_ci * Reusing fences (vkResetFences) 391e5c31af7Sopenharmony_ci * Waiting on a fence / querying status of a fence before it has been submitted to be signaled 392e5c31af7Sopenharmony_ci * Waiting on a fence / querying status of a fence has just been created with CREATE_SIGNALED_BIT 393e5c31af7Sopenharmony_ci ** Reuse in different queue 394e5c31af7Sopenharmony_ci ** Different queues 395e5c31af7Sopenharmony_ci 396e5c31af7Sopenharmony_ci.Spec issues 397e5c31af7Sopenharmony_ci * Using same fence in multiple vkQueueSubmit calls without waiting/resetting in between 398e5c31af7Sopenharmony_ci ** Completion of first cmdbuf will reset fence and others won't do anything? 399e5c31af7Sopenharmony_ci * Waiting on same fence from multiple threads? 400e5c31af7Sopenharmony_ci 401e5c31af7Sopenharmony_ciSemaphores 402e5c31af7Sopenharmony_ci~~~~~~~~~~ 403e5c31af7Sopenharmony_ci 404e5c31af7Sopenharmony_ci * All types of commands waiting & signaling semaphore 405e5c31af7Sopenharmony_ci * Cross-queue semaphores 406e5c31af7Sopenharmony_ci * Queuing wait on initially signaled semaphore 407e5c31af7Sopenharmony_ci * Queuing wait immediately after queuing signaling 408e5c31af7Sopenharmony_ci * vkQueueWaitIdle & vkDeviceWaitIdle waiting on semaphore 409e5c31af7Sopenharmony_ci * Multiple queues waiting on same semaphore 410e5c31af7Sopenharmony_ci 411e5c31af7Sopenharmony_ciNOTE: Semaphores might change; counting is causing problems for some IHVs. 412e5c31af7Sopenharmony_ci 413e5c31af7Sopenharmony_ciEvents 414e5c31af7Sopenharmony_ci~~~~~~ 415e5c31af7Sopenharmony_ci 416e5c31af7Sopenharmony_ci * All types of work waiting on all types of events 417e5c31af7Sopenharmony_ci ** Including signaling from CPU side (vkSetEvent) 418e5c31af7Sopenharmony_ci ** Memory barrier 419e5c31af7Sopenharmony_ci * Polling event status (vkGetEventStatus) 420e5c31af7Sopenharmony_ci * Memory barriers (see also GPU cache control) 421e5c31af7Sopenharmony_ci * Corner-cases: 422e5c31af7Sopenharmony_ci ** Re-setting event before it has been signaled 423e5c31af7Sopenharmony_ci ** Polling status of event concurrently with signaling it or re-setting it from another thread 424e5c31af7Sopenharmony_ci ** Multiple commands (maybe multiple queues as well) setting same event 425e5c31af7Sopenharmony_ci *** Presumably first set will take effect, rest have no effect before event is re-set 426e5c31af7Sopenharmony_ci 427e5c31af7Sopenharmony_ciPipeline queries 428e5c31af7Sopenharmony_ci---------------- 429e5c31af7Sopenharmony_ci 430e5c31af7Sopenharmony_ciPipeline query test details TBD. These are of lower priority initially. 431e5c31af7Sopenharmony_ci 432e5c31af7Sopenharmony_ciNOTE: Currently contains only exact occlusion query as mandatory. Might be problematic for some, and may change? 433e5c31af7Sopenharmony_ci 434e5c31af7Sopenharmony_ciBuffers 435e5c31af7Sopenharmony_ci------- 436e5c31af7Sopenharmony_ci 437e5c31af7Sopenharmony_ciBuffers will have a lot of coverage from memory management and access tests. Targeted buffer tests need to verify that various corner-cases and more exotic configurations work as expected. 438e5c31af7Sopenharmony_ci 439e5c31af7Sopenharmony_ci * All combinations of create and usage flags work 440e5c31af7Sopenharmony_ci ** There are total 511 combinations of usage flags and 7 combinations of create flags 441e5c31af7Sopenharmony_ci * Buffers of various sizes can be created and they report sensible memory requirements 442e5c31af7Sopenharmony_ci ** Test with different sizes: 443e5c31af7Sopenharmony_ci *** 0 Byte 444e5c31af7Sopenharmony_ci *** 1181 Byte 445e5c31af7Sopenharmony_ci *** 15991 Byte 446e5c31af7Sopenharmony_ci *** 16 kByte 447e5c31af7Sopenharmony_ci *** Device limit (maxTexelBufferSize) 448e5c31af7Sopenharmony_ci * Sparse buffers: very large (limit TBD) buffers can be created 449e5c31af7Sopenharmony_ci 450e5c31af7Sopenharmony_ciBuffer views 451e5c31af7Sopenharmony_ci~~~~~~~~~~~~ 452e5c31af7Sopenharmony_ci 453e5c31af7Sopenharmony_ci * Buffer views of all (valid) types and formats can be created from all (compatible) buffers 454e5c31af7Sopenharmony_ci ** There are 2 buffer types and 173 different formats. 455e5c31af7Sopenharmony_ci * Various view sizes 456e5c31af7Sopenharmony_ci ** Complete buffer 457e5c31af7Sopenharmony_ci ** Partial buffer 458e5c31af7Sopenharmony_ci * View can be created before and after attaching memory to buffer 459e5c31af7Sopenharmony_ci ** 2 tests for each bufferView 460e5c31af7Sopenharmony_ci * Changing memory binding makes memory contents visible in already created views 461e5c31af7Sopenharmony_ci ** Concurrently changing memory binding and creating views 462e5c31af7Sopenharmony_ci 463e5c31af7Sopenharmony_ci.Spec issues 464e5c31af7Sopenharmony_ci * Alignment or size requirements for buffer views? 465e5c31af7Sopenharmony_ci 466e5c31af7Sopenharmony_ciImages 467e5c31af7Sopenharmony_ci------ 468e5c31af7Sopenharmony_ci 469e5c31af7Sopenharmony_ciLike buffers, images will have significant coverage from other test groups that focus on various ways to access image data. Additional coverage not provided by those tests will be included in this feature group. 470e5c31af7Sopenharmony_ci 471e5c31af7Sopenharmony_ciImage functions 472e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~~ 473e5c31af7Sopenharmony_ci 474e5c31af7Sopenharmony_ci.Spec issues 475e5c31af7Sopenharmony_ci * +VK_IMAGE_USAGE_GENERAL+? 476e5c31af7Sopenharmony_ci 477e5c31af7Sopenharmony_ci * All valid and supported combinations of image parameters 478e5c31af7Sopenharmony_ci ** Sampling verification with nearest only (other modes will be covered separately) 479e5c31af7Sopenharmony_ci * Various image sizes 480e5c31af7Sopenharmony_ci * Linear-layout images & writing data from CPU 481e5c31af7Sopenharmony_ci * Copying data between identical opaque-layout images on CPU? 482e5c31af7Sopenharmony_ci 483e5c31af7Sopenharmony_ciImage view functions 484e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~ 485e5c31af7Sopenharmony_ci 486e5c31af7Sopenharmony_ci.Spec issues 487e5c31af7Sopenharmony_ci * What are format compatibility rules? 488e5c31af7Sopenharmony_ci * Can color/depth/stencil attachments to write to image which has different format? 489e5c31af7Sopenharmony_ci ** Can I create DS view of RGBA texture and write to only one component by creating VkDepthStencilView for example? 490e5c31af7Sopenharmony_ci * Image view granularity 491e5c31af7Sopenharmony_ci ** All sub-rects allowed? In all use cases (RTs for example)? 492e5c31af7Sopenharmony_ci * Memory access granularity 493e5c31af7Sopenharmony_ci ** Writing concurrently to different areas of same memory backed by same/different image or view 494e5c31af7Sopenharmony_ci 495e5c31af7Sopenharmony_ci * Image views of all (valid) types and formats can be created from all (compatible) images 496e5c31af7Sopenharmony_ci * Channel swizzles 497e5c31af7Sopenharmony_ci * Depth- and stencil-mode 498e5c31af7Sopenharmony_ci * Different formats 499e5c31af7Sopenharmony_ci * Various view sizes 500e5c31af7Sopenharmony_ci ** Complete image 501e5c31af7Sopenharmony_ci ** Partial image (mip- or array slice) 502e5c31af7Sopenharmony_ci * View can be created before and after attaching memory to image 503e5c31af7Sopenharmony_ci * Changing memory binding makes memory contents visible in already created views 504e5c31af7Sopenharmony_ci ** Concurrently changing memory binding and creating views 505e5c31af7Sopenharmony_ci 506e5c31af7Sopenharmony_ciRender target views 507e5c31af7Sopenharmony_ci^^^^^^^^^^^^^^^^^^^ 508e5c31af7Sopenharmony_ci 509e5c31af7Sopenharmony_ci * Writing to color/depth/stencil attachments in various view configurations 510e5c31af7Sopenharmony_ci ** Multipass tests will contain some coverage for this 511e5c31af7Sopenharmony_ci ** Image layout 512e5c31af7Sopenharmony_ci ** View size 513e5c31af7Sopenharmony_ci ** Image mip- or array sub-range 514e5c31af7Sopenharmony_ci * +msaaResolveImage+ 515e5c31af7Sopenharmony_ci ** TODO What is exactly this? 516e5c31af7Sopenharmony_ci 517e5c31af7Sopenharmony_ciShaders 518e5c31af7Sopenharmony_ci------- 519e5c31af7Sopenharmony_ci 520e5c31af7Sopenharmony_ciShader API test will verify that shader loading functions behave as expected. Verifying that various SPIR-V constructs are accepted and executed correctly however is not an objective; that will be covered more extensively by a separate SPIR-V test set. 521e5c31af7Sopenharmony_ci 522e5c31af7Sopenharmony_ciPipelines 523e5c31af7Sopenharmony_ci--------- 524e5c31af7Sopenharmony_ci 525e5c31af7Sopenharmony_ciConstruction 526e5c31af7Sopenharmony_ci~~~~~~~~~~~~ 527e5c31af7Sopenharmony_ci 528e5c31af7Sopenharmony_ciPipeline tests will create various pipelines and verify that rendering results appear to match (resulting HW pipeline is correct). Fixed-function unit corner-cases nor accuracy is verified. It is not possible to exhaustively test all pipeline configurations so tests have to test some areas in isolation and extend coverage with randomized tests. 529e5c31af7Sopenharmony_ci 530e5c31af7Sopenharmony_ciPipeline caches 531e5c31af7Sopenharmony_ci^^^^^^^^^^^^^^^ 532e5c31af7Sopenharmony_ci 533e5c31af7Sopenharmony_ciExtend pipeline tests to cases to use pipeline caches, test that pipelines created from pre-populated cache still produce identical results to pipelines created with empty cache. 534e5c31af7Sopenharmony_ci 535e5c31af7Sopenharmony_ciVerify that maximum cache size is not exceeded. 536e5c31af7Sopenharmony_ci 537e5c31af7Sopenharmony_ciPipeline state 538e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~ 539e5c31af7Sopenharmony_ci 540e5c31af7Sopenharmony_ciPipeline tests, as they need to verify rendering results, will provide a lot of coverage for pipeline state manipulation. In addition some corner-case tests are needed: 541e5c31af7Sopenharmony_ci 542e5c31af7Sopenharmony_ci * Re-setting pipeline state bits before use 543e5c31af7Sopenharmony_ci * Carrying / manipulating only part of state over draw calls 544e5c31af7Sopenharmony_ci * Submitting command buffers that have only pipeline state manipulation calls (should be no-op) 545e5c31af7Sopenharmony_ci 546e5c31af7Sopenharmony_ci.Spec issues 547e5c31af7Sopenharmony_ci * Does vkCmdBindPipeline invalidate other state bits? 548e5c31af7Sopenharmony_ci 549e5c31af7Sopenharmony_ciSamplers 550e5c31af7Sopenharmony_ci-------- 551e5c31af7Sopenharmony_ci 552e5c31af7Sopenharmony_ciSampler tests verify that sampler parameters are mapped to correct HW state. That will be verified by sampling various textures in certain configurations (as listed below). More exhaustive texture filtering verification will be done separately. 553e5c31af7Sopenharmony_ci 554e5c31af7Sopenharmony_ci * All valid sampler state configurations 555e5c31af7Sopenharmony_ci * Selected texture formats (RGBA8, FP16, integer textures) 556e5c31af7Sopenharmony_ci * All texture types 557e5c31af7Sopenharmony_ci * Mip-mapping with explicit and implicit LOD 558e5c31af7Sopenharmony_ci 559e5c31af7Sopenharmony_ciDynamic state objects 560e5c31af7Sopenharmony_ci--------------------- 561e5c31af7Sopenharmony_ci 562e5c31af7Sopenharmony_ciPipeline tests will include coverage for most dynamic state object usage as some pipeline configurations need corresponding dynamic state objects. In addition there are couple of corner-cases worth exploring separately: 563e5c31af7Sopenharmony_ci 564e5c31af7Sopenharmony_ci * Re-setting dynamic state bindings one or more times before first use 565e5c31af7Sopenharmony_ci * Dynamic state object binding persistence over pipeline changes 566e5c31af7Sopenharmony_ci * Large amounts of unique dynamic state objects in a command buffer, pass, or multipass 567e5c31af7Sopenharmony_ci 568e5c31af7Sopenharmony_ciCommand buffers 569e5c31af7Sopenharmony_ci--------------- 570e5c31af7Sopenharmony_ci 571e5c31af7Sopenharmony_ciTests for various rendering features will provide significant coverage for command buffer recording. Additional coverage will be needed for: 572e5c31af7Sopenharmony_ci 573e5c31af7Sopenharmony_ci * Re-setting command buffers 574e5c31af7Sopenharmony_ci * Very small (empty) and large command buffers 575e5c31af7Sopenharmony_ci * Various optimize flags combined with various command buffer sizes and contents 576e5c31af7Sopenharmony_ci ** Forcing optimize flags in other tests might be useful for finding cases that may break 577e5c31af7Sopenharmony_ci 578e5c31af7Sopenharmony_ciCommand Pools (5.1 in VK 1.0 Spec) 579e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 580e5c31af7Sopenharmony_ci 581e5c31af7Sopenharmony_ci[cols="1,4,8,8", options="header"] 582e5c31af7Sopenharmony_ci|=== 583e5c31af7Sopenharmony_ci|No. | Tested area | Test Description | Relevant specification text 584e5c31af7Sopenharmony_ci|1 | Creation | Call vkCreateCommandPool with all parameters that can be NULL having that value | If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure 585e5c31af7Sopenharmony_ci|2 | | ... with pAllocator != NULL | 586e5c31af7Sopenharmony_ci|3 | | ... with VK_COMMAND_POOL_CREATE_TRANSIENT_BIT set in pCreateInfo's flags | flags is a combination of bitfield flags indicating usage behavior for the pool and command buffers allocated from it. 587e5c31af7Sopenharmony_ci|4 | | ... with VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT set in pCreateInfo's flags | 588e5c31af7Sopenharmony_ci|5 | Resetting | Call vkResetCommandPool with VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT set | 589e5c31af7Sopenharmony_ci|6 | | ... without any bits set | 590e5c31af7Sopenharmony_ci|=== 591e5c31af7Sopenharmony_ci 592e5c31af7Sopenharmony_ciCommand Buffer Lifetime (5.2 in VK 1.0 Spec) 593e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 594e5c31af7Sopenharmony_ci 595e5c31af7Sopenharmony_ci[cols="1,4,8,8", options="header"] 596e5c31af7Sopenharmony_ci|=== 597e5c31af7Sopenharmony_ci|No. | Tested area | Test Description | Relevant specification text 598e5c31af7Sopenharmony_ci|1 | Allocation | Allocate a single primary buffer | 599e5c31af7Sopenharmony_ci|2 | | Allocate a large number of primary buffers | 600e5c31af7Sopenharmony_ci|3 | | Allocate no primary buffers (bufferCount == 0) | 601e5c31af7Sopenharmony_ci|4 | | Allocate a single secondary buffer | 602e5c31af7Sopenharmony_ci|5 | | Allocate a large number of secondary buffers | 603e5c31af7Sopenharmony_ci|6 | | Allocate no secondary buffers (bufferCount == 0) | 604e5c31af7Sopenharmony_ci|7 | Execution | Execute a small primary buffer | 605e5c31af7Sopenharmony_ci|8 | | Execute a large primary buffer | 606e5c31af7Sopenharmony_ci|9 | Resetting - implicit | Reset a command buffer by calling vkBeginCommandBuffer on a buffer that has already been recorded | 607e5c31af7Sopenharmony_ci|=== 608e5c31af7Sopenharmony_ci 609e5c31af7Sopenharmony_ciCommand Buffer Recording (5.3 in VK 1.0 Spec) 610e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 611e5c31af7Sopenharmony_ci 612e5c31af7Sopenharmony_ci[cols="1,4,8,8", options="header"] 613e5c31af7Sopenharmony_ci|=== 614e5c31af7Sopenharmony_ci|No. | Tested area | Test Description | Relevant specification text 615e5c31af7Sopenharmony_ci|1 | Recording to buffers | Record a single command in a primary buffer | 616e5c31af7Sopenharmony_ci|2 | | Record a large number of commands in a primary buffer | 617e5c31af7Sopenharmony_ci|3 | | Record a single command in a secondary buffer | 618e5c31af7Sopenharmony_ci|4 | | Record a large number of commands in a secondary buffer | 619e5c31af7Sopenharmony_ci|5 | | Record a primary command buffer without VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT. Submit it twice in a row. | 620e5c31af7Sopenharmony_ci|6 | | Record a secondary command buffer without VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT. Submit it twice in a row. | 621e5c31af7Sopenharmony_ci|7 | Recording for one time usage | Record a primary command buffer with VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT. Submit it, reset, record, and submit again. | 622e5c31af7Sopenharmony_ci|8 | | Record a secondary command buffer with VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT. Submit it, reset, record, and submit again. | 623e5c31af7Sopenharmony_ci|9 | Render pass in seconday command buffer | if VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT flag is not set, the values of renderPass, framebuffer, and subpass members of the VkCommandBufferBeginInfo should be ignored | If flags has VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT set, the entire secondary command buffer is considered inside a render pass. In this case, the renderPass, framebuffer, and subpass members of the VkCommandBufferBeginInfo structure must be set as described below. Otherwise the renderPass, framebuffer, and subpass members of the VkCommandBufferBeginInfo structure are ignored, and the secondary command buffer may not contain commands that are only allowed inside a render pass. 624e5c31af7Sopenharmony_ci|10 | Simultaneous use – primary buffers | Set flag VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT and submit two times simultanously | If flags does not have VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT set, the command buffer must not be pending execution more than once at any given time. A primary command buffer is considered to be pending execution from the time it is submitted via vkQueueSubmit until that submission completes. 625e5c31af7Sopenharmony_ci|11 | Simultaneous use – secondary buffers | Set VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT on secondary buffer, and use the secondary buffer twice in primary buffer | If VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT is not set on a secondary command buffer, that command buffer cannot be used more than once in a given primary command buffer. 626e5c31af7Sopenharmony_ci|12 | Recording with an active occlusion query | Recond a secondary command buffer with occlusionQueryEnable == VK_TRUE and queryFlags == VK_QUERY_CONTROL_PRECISE_BIT and execute it in a primary buffer with an active precise occlusion query | 627e5c31af7Sopenharmony_ci|13 | | ... imprecise occlusion query | 628e5c31af7Sopenharmony_ci|14 | | ... queryFlags == 0x00000000, imprecise occlusion query | 629e5c31af7Sopenharmony_ci|=== 630e5c31af7Sopenharmony_ci 631e5c31af7Sopenharmony_ciCommand Buffer Submission (5.4 in VK 1.0 Spec) 632e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 633e5c31af7Sopenharmony_ci 634e5c31af7Sopenharmony_ci[cols="1,4,8,8", options="header"] 635e5c31af7Sopenharmony_ci|=== 636e5c31af7Sopenharmony_ci|No. | Tested area | Test Description | Relevant specification text 637e5c31af7Sopenharmony_ci|1 | Submission correctness | Call vkQueueSubmit with submitCount equal to the actual count of submits | pSubmits must be an array of submitCount valid VkSubmitInfo structures. If submitCount is 0 though, pSubmits is ignored 638e5c31af7Sopenharmony_ci|2 | | ... submitCount == 0 | 639e5c31af7Sopenharmony_ci|3 | Submission with semaphores | Call vkQueueSubmit that waits for a single semaphore | 640e5c31af7Sopenharmony_ci|4 | | ... for multiple semaphores | 641e5c31af7Sopenharmony_ci|5 | | ... notifies a single semaphore | 642e5c31af7Sopenharmony_ci|6 | | ... notifies multiple semaphores | 643e5c31af7Sopenharmony_ci|7 | Submission without a fence | Call vkQueueSubmit with VK_NULL_HANDLE passed as fence. | If fence is not VK_NULL_HANDLE, fence must be a valid VkFence handle 644e5c31af7Sopenharmony_ci|=== 645e5c31af7Sopenharmony_ci 646e5c31af7Sopenharmony_ciSecondary Command Buffer Execution (5.6 in VK 1.0 Spec) 647e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 648e5c31af7Sopenharmony_ci 649e5c31af7Sopenharmony_ci[cols="1,4,8,8", options="header"] 650e5c31af7Sopenharmony_ci|=== 651e5c31af7Sopenharmony_ci|No. | Tested area | Test Description | Relevant specification text 652e5c31af7Sopenharmony_ci|1 | Secondary buffers execution | Check if secondary command buffers are executed | Secondary command buffers may be called from primary command buffers, and are not directly submitted to queues. 653e5c31af7Sopenharmony_ci|2 | Simultaneous use | Call vkCmdExecuteCommands with pCommandBuffers such that its element is already pending execution in commandBuffer and was created with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flag | Any given element of pCommandBuffers must not be already pending execution in commandBuffer, or appear twice in pCommandBuffers, unless it was created with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flag 654e5c31af7Sopenharmony_ci|3 | | Call vkCmdExecuteCommands with pCommandBuffers such that its element appears twice in pCommandBuffers and was created with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flag | 655e5c31af7Sopenharmony_ci|4 | Call from within a VkRenderPass | Call vkCmdExecuteCommands within a VkRenderPass with all elements of pCommandBuffers recorded with the VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT | If vkCmdExecuteCommands is being called within a VkRenderPass, any given element of pCommandBuffers must have been recorded with the VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT 656e5c31af7Sopenharmony_ci|=== 657e5c31af7Sopenharmony_ci 658e5c31af7Sopenharmony_ciCommands Allowed Inside Command Buffers 659e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 660e5c31af7Sopenharmony_ci 661e5c31af7Sopenharmony_ci[cols="1,4,8,8", options="header"] 662e5c31af7Sopenharmony_ci|=== 663e5c31af7Sopenharmony_ci|No. | Tested area | Test Description | Relevant specification text 664e5c31af7Sopenharmony_ci|1 | Order of execution | Check if vkCmdBindPipeline commands are executed in-order | 665e5c31af7Sopenharmony_ci|2 | | Check if vkCmdBindDescriptorSets commands are executed in-order | 666e5c31af7Sopenharmony_ci|3 | | Check if vkCmdBindIndexBuffer commands are executed in-order | 667e5c31af7Sopenharmony_ci|4 | | Check if vkCmdBindVertexBuffers commands are executed in-order | 668e5c31af7Sopenharmony_ci|5 | | Check if vkCmdResetQueryPool, vkCmdBeginQuery, vkCmdEndQuery, vkCmdCopyQueryPoolResults commands are executed in-order relative to each other | 669e5c31af7Sopenharmony_ci|=== 670e5c31af7Sopenharmony_ci 671e5c31af7Sopenharmony_ciDraw commands 672e5c31af7Sopenharmony_ci------------- 673e5c31af7Sopenharmony_ci 674e5c31af7Sopenharmony_ciDraw command tests verify that all draw parameters are respected (including vertex input state) and various draw call sizes work correctly. The tests won't however validate that all side effects of shader invocations happen as intended (covered by feature-specific tests) nor that primitive rasterization is fully correct (will be covered by separate targeted tests). 675e5c31af7Sopenharmony_ci 676e5c31af7Sopenharmony_ciCompute 677e5c31af7Sopenharmony_ci------- 678e5c31af7Sopenharmony_ci 679e5c31af7Sopenharmony_ciLike draw tests, compute dispatch tests will validate that call parameters have desired effects. In addition compute tests need to verify that various dispatch parameters (number of work groups, invocation IDs) are passed correctly to the shader invocations. 680e5c31af7Sopenharmony_ci 681e5c31af7Sopenharmony_ciNOTE: Assuming that compute-specific shader features, such as shared memory access, is covered by SPIR-V tests. 682e5c31af7Sopenharmony_ci 683e5c31af7Sopenharmony_ciCopies and blits 684e5c31af7Sopenharmony_ci---------------- 685e5c31af7Sopenharmony_ci 686e5c31af7Sopenharmony_ciBuffer copies 687e5c31af7Sopenharmony_ci~~~~~~~~~~~~~ 688e5c31af7Sopenharmony_ci 689e5c31af7Sopenharmony_ciBuffer copy tests need to validate that copies and updates happen as expected for both simple and more complex cases: 690e5c31af7Sopenharmony_ci 691e5c31af7Sopenharmony_ci * Whole-buffer, partial copies 692e5c31af7Sopenharmony_ci * Small (1 byte) to very large copies and updates 693e5c31af7Sopenharmony_ci * Copies between objects backed by same memory 694e5c31af7Sopenharmony_ci 695e5c31af7Sopenharmony_ciNOTE: GPU cache control tests need to verify copy source and destination visibility as well. 696e5c31af7Sopenharmony_ci 697e5c31af7Sopenharmony_ciImage copies 698e5c31af7Sopenharmony_ci~~~~~~~~~~~~ 699e5c31af7Sopenharmony_ci 700e5c31af7Sopenharmony_ciImage copy and blitting tests need to validate that copies and updates happen as expected for both simple and more complex cases: 701e5c31af7Sopenharmony_ci 702e5c31af7Sopenharmony_ci* Image copies should cover 703e5c31af7Sopenharmony_ci** Whole and partial copies 704e5c31af7Sopenharmony_ci** Source and destination are backed by the same Image 705e5c31af7Sopenharmony_ci** Compressed and uncompressed copies 706e5c31af7Sopenharmony_ci** Multiple copy regions in one command 707e5c31af7Sopenharmony_ci** Copies between different but compatible formats 708e5c31af7Sopenharmony_ci* Blitting should cover 709e5c31af7Sopenharmony_ci** Whole and partial copies 710e5c31af7Sopenharmony_ci** With and without scaling 711e5c31af7Sopenharmony_ci** Copies between different but compatible formats (format conversions) 712e5c31af7Sopenharmony_ci 713e5c31af7Sopenharmony_ciCopies between buffers and images 714e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 715e5c31af7Sopenharmony_ci 716e5c31af7Sopenharmony_ciThe copies between buffers and images are used for checking the rendering result across the vulkancts so it 717e5c31af7Sopenharmony_ciis well tested. This tests should cover corner cases. 718e5c31af7Sopenharmony_ci 719e5c31af7Sopenharmony_ci* Various sizes 720e5c31af7Sopenharmony_ci** Whole and partial copies 721e5c31af7Sopenharmony_ci* Multiple copies in one command 722e5c31af7Sopenharmony_ci 723e5c31af7Sopenharmony_ciClearing images 724e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~~ 725e5c31af7Sopenharmony_ci 726e5c31af7Sopenharmony_ciClearing tests need to validate that clearing happen as expected for both simple and more complex cases: 727e5c31af7Sopenharmony_ci 728e5c31af7Sopenharmony_ci* Clear the attachments. 729e5c31af7Sopenharmony_ci** Whole and partial clear. 730e5c31af7Sopenharmony_ci 731e5c31af7Sopenharmony_ciMultisample resolve 732e5c31af7Sopenharmony_ci~~~~~~~~~~~~~~~~~~~ 733e5c31af7Sopenharmony_ci 734e5c31af7Sopenharmony_ciMultisample tests need to validate that image resolving happen as expected for both simple and more complex cases. 735e5c31af7Sopenharmony_ci 736e5c31af7Sopenharmony_ci* Various multisample counts. 737e5c31af7Sopenharmony_ci** All possible sample counts: 2, 4, 8, 16, 32 and 64. 738e5c31af7Sopenharmony_ci* Whole and partial image. 739e5c31af7Sopenharmony_ci** Regions with different offsets and extents. 740e5c31af7Sopenharmony_ci** Use multiple regions. 741e5c31af7Sopenharmony_ci 742e5c31af7Sopenharmony_ciPush constants 743e5c31af7Sopenharmony_ci-------------- 744e5c31af7Sopenharmony_ci 745e5c31af7Sopenharmony_ci * Range size, including verify various size of a single range from minimum to maximum 746e5c31af7Sopenharmony_ci * Range count, including verify all the valid shader stages 747e5c31af7Sopenharmony_ci * Data update, including verify a sub-range update, multiple times of updates 748e5c31af7Sopenharmony_ci 749e5c31af7Sopenharmony_ci ? Invalid usages specified in spec NOT tested 750e5c31af7Sopenharmony_ci 751e5c31af7Sopenharmony_ciGPU timestamps 752e5c31af7Sopenharmony_ci-------------- 753e5c31af7Sopenharmony_ci 754e5c31af7Sopenharmony_ci * All timestamp stages 755e5c31af7Sopenharmony_ci * record multiple timestamps in single command buffer 756e5c31af7Sopenharmony_ci * timestamps in/out of render pass 757e5c31af7Sopenharmony_ci * Command buffers that only record timestamps 758e5c31af7Sopenharmony_ci 759e5c31af7Sopenharmony_ci.Spec issues 760e5c31af7Sopenharmony_ci 761e5c31af7Sopenharmony_ciValidation layer tests 762e5c31af7Sopenharmony_ci---------------------- 763e5c31af7Sopenharmony_ci 764e5c31af7Sopenharmony_ciValidation layer tests exercise all relevant invalid API usage patterns and verify that correct return values and error messages are generated. In addition validation tests would try to load invalid SPIR-V binaries and verify that all generic SPIR-V, and Vulkan SPIR-V environment rules are checked. 765e5c31af7Sopenharmony_ci 766e5c31af7Sopenharmony_ciAndroid doesn't plan to ship validation layer as part of the system image so validation tests are not required by Android CTS and thus are of very low priority currently. 767