VkPhysicalDevice should use Instance allocation scope
Physical device was using the wrong allocations scope.
Tests: dEQP-VK.wsi.xlib.surface.create_custom_allocator
Tests: dEQP-VK.wsi.xlib.surface.create_simulate_oom
Bug: b/132451407
Change-Id: I242d97548bdf01cbdab5cc708469bca02a845a66
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/31691
Presubmit-Ready: Ben Clayton <bclayton@google.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Tested-by: Hernan Liatis <hliatis@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
diff --git a/src/Vulkan/VkPhysicalDevice.hpp b/src/Vulkan/VkPhysicalDevice.hpp
index 11d5162..216b22a 100644
--- a/src/Vulkan/VkPhysicalDevice.hpp
+++ b/src/Vulkan/VkPhysicalDevice.hpp
@@ -27,7 +27,7 @@
class PhysicalDevice
{
public:
- static constexpr VkSystemAllocationScope GetAllocationScope() { return VK_SYSTEM_ALLOCATION_SCOPE_DEVICE; }
+ static constexpr VkSystemAllocationScope GetAllocationScope() { return VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE; }
PhysicalDevice(const void*, void* mem);
void destroy(const VkAllocationCallbacks* pAllocator) {}