tests: Modify vkMapMemory calls to use VK_WHOLE_SIZE
Calls were still using zero to map entire allocation which caused validation issues.
diff --git a/tests/init.cpp b/tests/init.cpp
index 1bb1d31..b694112 100644
--- a/tests/init.cpp
+++ b/tests/init.cpp
@@ -160,7 +160,7 @@
err = vkAllocateMemory(device(), &alloc_info, NULL, &gpu_mem);
ASSERT_VK_SUCCESS(err);
- err = vkMapMemory(device(), gpu_mem, 0, 0, 0, (void **) &pData);
+ err = vkMapMemory(device(), gpu_mem, 0, VK_WHOLE_SIZE, 0, (void **) &pData);
ASSERT_VK_SUCCESS(err);
memset(pData, 0x55, alloc_info.allocationSize);
diff --git a/tests/layer_validation_tests.cpp b/tests/layer_validation_tests.cpp
index 6a9d8e4..ca37ebf 100644
--- a/tests/layer_validation_tests.cpp
+++ b/tests/layer_validation_tests.cpp
@@ -632,7 +632,7 @@
// Map memory as if to initialize the image
void *mappedAddress = NULL;
- err = vkMapMemory(m_device->device(), mem, 0, 0, 0, &mappedAddress);
+ err = vkMapMemory(m_device->device(), mem, 0, VK_WHOLE_SIZE, 0, &mappedAddress);
if (!m_errorMonitor->DesiredMsgFound()) {
FAIL() << "Did not receive Error 'Error received did not match expected error message from vkMapMemory in MemTracker'";
diff --git a/tests/vktestbinding.cpp b/tests/vktestbinding.cpp
index 307786f..89b2c13 100644
--- a/tests/vktestbinding.cpp
+++ b/tests/vktestbinding.cpp
@@ -441,7 +441,7 @@
const void *DeviceMemory::map(VkFlags flags) const
{
void *data;
- if (!EXPECT(vkMapMemory(device(), handle(), 0 ,0, flags, &data) == VK_SUCCESS))
+ if (!EXPECT(vkMapMemory(device(), handle(), 0 , VK_WHOLE_SIZE, flags, &data) == VK_SUCCESS))
data = NULL;
return data;
@@ -450,7 +450,7 @@
void *DeviceMemory::map(VkFlags flags)
{
void *data;
- if (!EXPECT(vkMapMemory(device(), handle(), 0, 0, flags, &data) == VK_SUCCESS))
+ if (!EXPECT(vkMapMemory(device(), handle(), 0, VK_WHOLE_SIZE, flags, &data) == VK_SUCCESS))
data = NULL;
return data;