diff options
| author | Tobin Ehlis <tobine@google.com> | 2017-02-06 17:02:03 -0700 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2017-02-07 13:23:55 -0700 |
| commit | 429f33a509fd059bb6861e47d2c4c67241ac090c (patch) | |
| tree | f1d8f777305d764e33d0b9ab4388f05a7930ce86 /layers/object_tracker.cpp | |
| parent | 10aaf8d76f08638eda37b111430316e8394c7338 (diff) | |
| download | usermoji-429f33a509fd059bb6861e47d2c4c67241ac090c.tar.xz | |
layers:Fix queue state recording
Handle case when multiple calls are made to
GetPhysicalDeviceQueueFamilyProperties[2KHR]() funcs by resizing
vector and assigning elements w/ [] operator instead of using
emplace_back().
Diffstat (limited to 'layers/object_tracker.cpp')
| -rw-r--r-- | layers/object_tracker.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/layers/object_tracker.cpp b/layers/object_tracker.cpp index 67dd0218..e0d70787 100644 --- a/layers/object_tracker.cpp +++ b/layers/object_tracker.cpp @@ -3266,8 +3266,11 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevi std::lock_guard<std::mutex> lock(global_lock); if (pQueueFamilyProperties != NULL) { layer_data *instance_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map); + if (instance_data->queue_family_properties.size() < *pQueueFamilyPropertyCount) { + instance_data->queue_family_properties.resize(*pQueueFamilyPropertyCount); + } for (uint32_t i = 0; i < *pQueueFamilyPropertyCount; i++) { - instance_data->queue_family_properties.emplace_back(pQueueFamilyProperties[i]); + instance_data->queue_family_properties[i] = pQueueFamilyProperties[i]; } } } @@ -4063,8 +4066,11 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysical std::lock_guard<std::mutex> lock(global_lock); if (pQueueFamilyProperties != NULL) { layer_data *instance_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map); + if (instance_data->queue_family_properties.size() < *pQueueFamilyPropertyCount) { + instance_data->queue_family_properties.resize(*pQueueFamilyPropertyCount); + } for (uint32_t i = 0; i < *pQueueFamilyPropertyCount; i++) { - instance_data->queue_family_properties.emplace_back(pQueueFamilyProperties[i].queueFamilyProperties); + instance_data->queue_family_properties[i] = pQueueFamilyProperties[i].queueFamilyProperties; } } } |
