From: iostrows Date: Fri, 29 Apr 2016 11:38:52 +0000 (+0200) Subject: PipelineCache: track buffer allocation X-Git-Tag: upstream/0.1.0~840^2~9^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=653704c5bc0f03512b0b43a84615b6a9138fa057;p=platform%2Fupstream%2FVK-GL-CTS.git PipelineCache: track buffer allocation --- diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineCacheTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineCacheTests.cpp index 031583c..b93cb7a 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineCacheTests.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineCacheTests.cpp @@ -1226,6 +1226,7 @@ protected: void buildPipeline (deUint32 ndx); protected: Move m_inputBuf; + de::MovePtr m_inputBufferAlloc; Move m_computeShaderModule; Move m_outputBuf[PIPELINE_CACHE_NDX_COUNT]; @@ -1272,17 +1273,16 @@ void ComputeCacheTestInstance::buildBuffers (void) // Create buffer object, allocate storage, and generate input data const VkDeviceSize size = sizeof(tcu::Vec4) * 128u; - de::MovePtr 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(bufferAlloc->getHostPtr()); + tcu::Vec4* pVec = reinterpret_cast(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++)