Fixed: memoryTypeBits incorrectly included property flag in vkGetMemoryHostPointerPropertiesEXT()

Fixed the bug where the memory property flag was set in the memoryTypeBits field when querying host pointer properties.

Change-Id: Ia51f9a1e830e1d0d102403c124bc971071a836a9
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/77188
Commit-Queue: Shahbaz Youssefi <syoussefi@google.com>
Presubmit-Ready: Shahbaz Youssefi <syoussefi@google.com>
Tested-by: Geoff Lang <geofflang@google.com>
Reviewed-by: Geoff Lang <geofflang@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@google.com>
diff --git a/src/Vulkan/libVulkan.cpp b/src/Vulkan/libVulkan.cpp
index bbefd62..d6bc854 100644
--- a/src/Vulkan/libVulkan.cpp
+++ b/src/Vulkan/libVulkan.cpp
@@ -1526,7 +1526,12 @@
 		UNSUPPORTED("handleType %u", handleType);
 		return VK_ERROR_INVALID_EXTERNAL_HANDLE;
 	}
-	pMemoryHostPointerProperties->memoryTypeBits = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
+
+	const VkPhysicalDeviceMemoryProperties &memoryProperties =
+	    vk::PhysicalDevice::GetMemoryProperties();
+
+	// All SwiftShader memory types support this!
+	pMemoryHostPointerProperties->memoryTypeBits = (1U << memoryProperties.memoryTypeCount) - 1U;
 
 	return VK_SUCCESS;
 }