Silence warnings on dedicated external memory allocations

The VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO extension structure
is safe to ignore for Linux and Fuchsia.

We already ignored it for private allocations (see vkAllocateMemory).
Some drivers can do a better job of allocating if they know that a
VkDeviceMemory will contain exactly one object with known properties.
This is the case for NVIDIA, but not SwiftShader.

For external memory, on some platforms (including Android) the shareable
object isn't just a flat blob of memory, it carries format/dimensions
etc. The AHardwareBufferExternalMemory implementation in
VkDeviceMemoryExternalAndroid.hpp obtains the image/buffer from the
VkMemoryDedicatedAllocateInfo structure to pass it to gralloc.

External memory on Linux and Fuchsia are just flat memory allocations,
so on these platforms we can ignore the dedicated allocation info.

Bug: b/156200449
Change-Id: Ia7838bb8a39aac2a1908f314d146ad11f1be79d2
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/45048
Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
diff --git a/src/Vulkan/VkDeviceMemoryExternalFuchsia.hpp b/src/Vulkan/VkDeviceMemoryExternalFuchsia.hpp
index 0352046..d1de8a2 100644
--- a/src/Vulkan/VkDeviceMemoryExternalFuchsia.hpp
+++ b/src/Vulkan/VkDeviceMemoryExternalFuchsia.hpp
@@ -66,6 +66,11 @@
 						exportHandle = true;
 						break;
 					}
+					case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO:
+						// This can safely be ignored, as the Vulkan spec mentions:
+						// "If the pNext chain includes a VkMemoryDedicatedAllocateInfo structure, then that structure
+						//  includes a handle of the sole buffer or image resource that the memory *can* be bound to."
+						break;
 
 					default:
 						WARN("VkMemoryAllocateInfo->pNext sType = %s", vk::Stringify(extInfo->sType).c_str());
diff --git a/src/Vulkan/VkDeviceMemoryExternalLinux.hpp b/src/Vulkan/VkDeviceMemoryExternalLinux.hpp
index 77c7c80..0763fd9 100644
--- a/src/Vulkan/VkDeviceMemoryExternalLinux.hpp
+++ b/src/Vulkan/VkDeviceMemoryExternalLinux.hpp
@@ -66,6 +66,11 @@
 						exportFd = true;
 					}
 					break;
+					case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO:
+						// This can safely be ignored, as the Vulkan spec mentions:
+						// "If the pNext chain includes a VkMemoryDedicatedAllocateInfo structure, then that structure
+						//  includes a handle of the sole buffer or image resource that the memory *can* be bound to."
+						break;
 
 					default:
 						WARN("VkMemoryAllocateInfo->pNext sType = %s", vk::Stringify(createInfo->sType).c_str());