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