diff options
| author | Tobin Ehlis <tobine@google.com> | 2016-03-16 14:20:54 -0600 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2016-03-17 13:15:42 -0600 |
| commit | 77facb532e47227f6bb57eed97bcf8fc5ef64331 (patch) | |
| tree | 188e21bf295b6b9d7149e07f14183af4cb7252ae | |
| parent | b93ac27b56349238eaf8af208ad3b40749c3b292 (diff) | |
| download | usermoji-77facb532e47227f6bb57eed97bcf8fc5ef64331.tar.xz | |
layers: Consolidate properties checks in core_validation
Remove global properties and only use properties from physDevProperties.properties.
| -rw-r--r-- | layers/core_validation.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index ea3fd528..c54f621d 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -109,7 +109,6 @@ struct layer_data { #if MTMERGE // MTMERGE - stuff pulled directly from MT uint64_t currentFenceId; - VkPhysicalDeviceProperties properties; unordered_map<VkDeviceMemory, vector<MEMORY_RANGE>> bufferRanges, imageRanges; // Maps for tracking key structs related to mem_tracker state unordered_map<VkCommandBuffer, MT_CB_INFO> cbMap; @@ -4798,7 +4797,6 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(VkPhysicalDevice g my_device_data->report_data = layer_debug_report_create_device(my_instance_data->report_data, *pDevice); createDeviceRegisterExtensions(pCreateInfo, *pDevice); // Get physical device limits for this device - // MTMTODO : Anywhere ...->properties used from MT, use ...->physDevProperties.properties instead my_instance_data->instance_dispatch_table->GetPhysicalDeviceProperties(gpu, &(my_device_data->physDevProperties.properties)); uint32_t count; my_instance_data->instance_dispatch_table->GetPhysicalDeviceQueueFamilyProperties(gpu, &count, nullptr); @@ -5935,11 +5933,11 @@ VkBool32 validate_memory_range(layer_data *my_data, const unordered_map<VkDevice return false; const vector<MEMORY_RANGE> &ranges = memory.at(new_range.memory); for (auto range : ranges) { - if ((range.end & ~(my_data->properties.limits.bufferImageGranularity - 1)) < - (new_range.start & ~(my_data->properties.limits.bufferImageGranularity - 1))) + if ((range.end & ~(my_data->physDevProperties.properties.limits.bufferImageGranularity - 1)) < + (new_range.start & ~(my_data->physDevProperties.properties.limits.bufferImageGranularity - 1))) continue; - if ((range.start & ~(my_data->properties.limits.bufferImageGranularity - 1)) > - (new_range.end & ~(my_data->properties.limits.bufferImageGranularity - 1))) + if ((range.start & ~(my_data->physDevProperties.properties.limits.bufferImageGranularity - 1)) > + (new_range.end & ~(my_data->physDevProperties.properties.limits.bufferImageGranularity - 1))) continue; skip_call |= print_memory_range_error(my_data, new_range.handle, range.handle, object_type); } |
