aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mock_icd_generator.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/scripts/mock_icd_generator.py b/scripts/mock_icd_generator.py
index 33f2cad8..fff1d7ca 100644
--- a/scripts/mock_icd_generator.py
+++ b/scripts/mock_icd_generator.py
@@ -57,7 +57,7 @@ using std::unordered_map;
// Map device memory handle to any mapped allocations that we'll need to free on unmap
static unordered_map<VkDeviceMemory, std::vector<void*>> mapped_memory_map;
-static VkPhysicalDevice physical_device = nullptr;
+static VkPhysicalDevice physical_device = (VkPhysicalDevice)CreateDispObjHandle();
static unordered_map<VkDevice, unordered_map<uint32_t, unordered_map<uint32_t, VkQueue>>> queue_map;
static unordered_map<VkDevice, unordered_map<VkBuffer, VkBufferCreateInfo>> buffer_map;
@@ -425,16 +425,10 @@ CUSTOM_C_INTERCEPTS = {
return VK_SUCCESS;
''',
'vkDestroyInstance': '''
- // Destroy physical device
- DestroyDispObjHandle((void*)physical_device);
-
DestroyDispObjHandle((void*)instance);
''',
'vkEnumeratePhysicalDevices': '''
if (pPhysicalDevices) {
- if (!physical_device) {
- physical_device = (VkPhysicalDevice)CreateDispObjHandle();
- }
*pPhysicalDevices = physical_device;
} else {
*pPhysicalDeviceCount = 1;