From 1273a38c720b31b891fae695435342e124a3d963 Mon Sep 17 00:00:00 2001 From: Jeremy Hayes Date: Wed, 22 Feb 2017 08:53:13 -0700 Subject: demos: Use device local heap for depth Fix GH 116: Cube demo does not allocate depth buffer in device local heap. Change-Id: Ic368bc039fc555f0d8739b0aeb6648237a6fcc5c --- demos/cube.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'demos/cube.cpp') diff --git a/demos/cube.cpp b/demos/cube.cpp index 5d56ecc0..011c456f 100644 --- a/demos/cube.cpp +++ b/demos/cube.cpp @@ -1446,8 +1446,8 @@ struct Demo { depth.mem_alloc.setAllocationSize(mem_reqs.size); depth.mem_alloc.setMemoryTypeIndex(0); - auto const pass = - memory_type_from_properties(mem_reqs.memoryTypeBits, vk::MemoryPropertyFlagBits(0), &depth.mem_alloc.memoryTypeIndex); + auto const pass = memory_type_from_properties(mem_reqs.memoryTypeBits, vk::MemoryPropertyFlagBits::eDeviceLocal, + &depth.mem_alloc.memoryTypeIndex); VERIFY(pass); result = device.allocateMemory(&depth.mem_alloc, nullptr, &depth.mem); -- cgit v1.2.3