diff options
| author | spencer-lunarg <spencer@lunarg.com> | 2024-03-19 15:49:46 +0900 |
|---|---|---|
| committer | Charles Giessen <46324611+charles-lunarg@users.noreply.github.com> | 2024-03-19 02:09:33 -0500 |
| commit | e5f1de89683f3e029f81189051372a3c379bd90a (patch) | |
| tree | 6cfd60be5ab14afc1573a02da44c729194cf8a8f /scripts | |
| parent | 2225f5c3080488eaa6a46bd49b09d97cb50579ba (diff) | |
| download | usermoji-e5f1de89683f3e029f81189051372a3c379bd90a.tar.xz | |
icd: Add special fault injection logic
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/mock_icd_generator.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/mock_icd_generator.py b/scripts/mock_icd_generator.py index bb04edb7..bc8cef92 100644 --- a/scripts/mock_icd_generator.py +++ b/scripts/mock_icd_generator.py @@ -1654,6 +1654,17 @@ CUSTOM_C_INTERCEPTS = { *pFence = (VkFence)global_unique_handle++; return VK_SUCCESS; ''', +'vkQueueSubmit': ''' + // Special way to cause DEVICE_LOST + // Picked VkExportFenceCreateInfo because needed some struct that wouldn't get cleared by validation Safe Struct + // ... TODO - It would be MUCH nicer to have a layer or other setting control when this occured + // For now this is used to allow Validation Layers test reacting to device losts + auto pNext = reinterpret_cast<const VkBaseInStructure *>(pSubmits[0].pNext); + if (pNext && pNext->sType == VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO && pNext->pNext == nullptr) { + return VK_ERROR_DEVICE_LOST; + } + return VK_SUCCESS; +''', } # MockICDGeneratorOptions - subclass of GeneratorOptions. |
