Try lower query counts in out-of-memory situations.

This commit is contained in:
Bartosz Taudul 2019-06-26 16:43:56 +02:00
parent 659631fc06
commit 0aa0b4ac8a

View File

@ -61,7 +61,11 @@ public:
poolInfo.sType = VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO; poolInfo.sType = VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO;
poolInfo.queryCount = m_queryCount; poolInfo.queryCount = m_queryCount;
poolInfo.queryType = VK_QUERY_TYPE_TIMESTAMP; poolInfo.queryType = VK_QUERY_TYPE_TIMESTAMP;
vkCreateQueryPool( device, &poolInfo, nullptr, &m_query ); while( vkCreateQueryPool( device, &poolInfo, nullptr, &m_query ) != VK_SUCCESS )
{
m_queryCount /= 2;
poolInfo.queryCount = m_queryCount;
}
VkCommandBufferBeginInfo beginInfo = {}; VkCommandBufferBeginInfo beginInfo = {};
beginInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; beginInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;