log << TestLog::Message << "Memory type: " << memoryType << TestLog::EndMessage;
log << TestLog::Message << "Memory heap: " << memoryHeap << TestLog::EndMessage;
- if (allocationSize * m_config.memoryAllocationCount * 4 > memoryHeap.size)
+ if (allocationSize * m_config.memoryAllocationCount * 8 > memoryHeap.size)
TCU_THROW(NotSupportedError, "Memory heap doesn't have enough memory.");
try
{
m_heaps[heapNdx].heap = memoryProperties.memoryHeaps[heapNdx];
m_heaps[heapNdx].memoryUsage = 0;
- m_heaps[heapNdx].maxMemoryUsage = m_heaps[heapNdx].heap.size / 4;
+ m_heaps[heapNdx].maxMemoryUsage = m_heaps[heapNdx].heap.size / 8;
m_heaps[heapNdx].objects.reserve(100);
if (m_opNdx == 0)
{
log << TestLog::Message << "Performing " << m_opCount << " random VkAllocMemory() / VkFreeMemory() calls before freeing all memory." << TestLog::EndMessage;
- log << TestLog::Message << "Using max one fourth of the memory in each memory heap." << TestLog::EndMessage;
+ log << TestLog::Message << "Using max 1/8 of the memory in each memory heap." << TestLog::EndMessage;
}
if (m_opNdx >= m_opCount)
const float allocationPercents[] =
{
- 0.01f, 0.1f, 0.25f
+ 0.01f
};
const int allocationCounts[] =
{
const int allocationCount = allocationCounts[allocationCountNdx];
- if ((allocationCount != -1) && ((float)allocationCount * allocationPercent > 0.25f))
+ if ((allocationCount != -1) && ((float)allocationCount * allocationPercent >= 1.00f / 8.00f))
continue;
TestConfig config;
if (allocationCount == -1)
{
- config.memoryAllocationCount = (int)(0.25f / allocationPercent);
+ config.memoryAllocationCount = (int)((1.00f / 8.00f) / allocationPercent);
if (config.memoryAllocationCount == 0
|| config.memoryAllocationCount == 1
void MemoryObject::randomFlush (const DeviceInterface& vkd, VkDevice device, de::Random& rng)
{
- const size_t rangeCount = (size_t)rng.getInt(0, 10);
+ const size_t rangeCount = (size_t)rng.getInt(1, 10);
vector<VkMappedMemoryRange> ranges (rangeCount);
randomRanges(rng, ranges, rangeCount, *m_memory, m_size);
void MemoryObject::randomInvalidate (const DeviceInterface& vkd, VkDevice device, de::Random& rng)
{
- const size_t rangeCount = (size_t)rng.getInt(0, 10);
+ const size_t rangeCount = (size_t)rng.getInt(1, 10);
vector<VkMappedMemoryRange> ranges (rangeCount);
randomRanges(rng, ranges, rangeCount, *m_memory, m_size);
enum
{
- // Use only 1/8 of each memory heap.
- MAX_MEMORY_USAGE_DIV = 8
+ // Use only 1/16 of each memory heap.
+ MAX_MEMORY_USAGE_DIV = 16
};
template<typename T>