demos+tests: Add HOST_COHERENT to HOST_VISIBLE memory requests
Where the memory is going to be mapped
Change-Id: I66c4f5950fa77fe8b785b12233adbc4e9db797ce
diff --git a/tests/vkrenderframework.cpp b/tests/vkrenderframework.cpp
index 27701a8..db5ee3e 100644
--- a/tests/vkrenderframework.cpp
+++ b/tests/vkrenderframework.cpp
@@ -819,7 +819,8 @@
void *data;
uint32_t x, y;
VkImageObj stagingImage(device);
- VkMemoryPropertyFlags reqs = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
+ VkMemoryPropertyFlags reqs = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
+ VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
stagingImage.init(16, 16, tex_format, VK_IMAGE_USAGE_TRANSFER_DST_BIT |
VK_IMAGE_USAGE_TRANSFER_SRC_BIT,
@@ -924,7 +925,8 @@
m_numVertices = constantCount;
m_stride = constantSize;
- VkMemoryPropertyFlags reqs = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
+ VkMemoryPropertyFlags reqs = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
+ VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
const size_t allocationSize = constantCount * constantSize;
init_as_src_and_dst(*m_device, allocationSize, reqs);
@@ -1054,7 +1056,8 @@
}
const size_t allocationSize = numIndexes * m_stride;
- VkMemoryPropertyFlags reqs = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
+ VkMemoryPropertyFlags reqs = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
+ VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
init_as_src_and_dst(*m_device, allocationSize, reqs);
void *pData = memory().map();