Disable shadow copy for DeviceMemory that suports memory control ops

The shadow copy may get out of sync when DECOMMIT or LOCK operations are
used, so shadowing the real memory should be disabled.

Change-Id: I0ef02c9ef3e7166598dabb054786cdc082b4f174
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/Vulkan-ValidationLayers/+/452714
Reviewed-by: Craig Stout <cstout@google.com>
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index adddf7d..c972f84 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -3354,7 +3354,8 @@
     auto mem_info = GetDevMemState(mem);
     if (mem_info) {
         uint32_t index = mem_info->alloc_info.memoryTypeIndex;
-        if (phys_dev_mem_props.memoryTypes[index].propertyFlags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT) {
+        if ((phys_dev_mem_props.memoryTypes[index].propertyFlags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT) ||
+            mem_info->supports_memory_control) {
             mem_info->shadow_copy = 0;
         } else {
             if (size == VK_WHOLE_SIZE) {