PipelineCache: track buffer allocation

Bug: 28676376

(cherry picked from commit 653704c5bc0f03512b0b43a84615b6a9138fa057)

Change-Id: Idf9c4a00928aa88c0f67cfc7db4c96c695689809
diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineCacheTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineCacheTests.cpp
index b4f9c3b..07338fa 100644
--- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineCacheTests.cpp
+++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineCacheTests.cpp
@@ -1180,6 +1180,7 @@
 			void            buildPipeline               (deUint32 ndx);
 protected:
 	Move<VkBuffer>              m_inputBuf;
+	de::MovePtr<Allocation>     m_inputBufferAlloc;
 	Move<VkShaderModule>        m_computeShaderModule;
 
 	Move<VkBuffer>              m_outputBuf[PIPELINE_CACHE_NDX_COUNT];
@@ -1226,17 +1227,16 @@
 
 	// Create buffer object, allocate storage, and generate input data
 	const VkDeviceSize          size                = sizeof(tcu::Vec4) * 128u;
-	de::MovePtr<Allocation>     bufferAlloc;
-	m_inputBuf = createBufferAndBindMemory(m_context, size, VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, &bufferAlloc);
+	m_inputBuf = createBufferAndBindMemory(m_context, size, VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, &m_inputBufferAlloc);
 
 	// Initialize input buffer
-	tcu::Vec4* pVec = reinterpret_cast<tcu::Vec4*>(bufferAlloc->getHostPtr());
+	tcu::Vec4* pVec = reinterpret_cast<tcu::Vec4*>(m_inputBufferAlloc->getHostPtr());
 	for (deUint32 ndx = 0u; ndx < 128u; ndx++)
 	{
 		for (deUint32 component = 0u; component < 4u; component++)
 			pVec[ndx][component]= (float)(ndx * (component + 1u));
 	}
-	flushMappedMemoryRange(vk, vkDevice, bufferAlloc->getMemory(), bufferAlloc->getOffset(), size);
+	flushMappedMemoryRange(vk, vkDevice, m_inputBufferAlloc->getMemory(), m_inputBufferAlloc->getOffset(), size);
 
 	// Clear the output buffer
 	for (deUint32 ndx = 0; ndx < PIPELINE_CACHE_NDX_COUNT; ndx++)