const deUint32 maxMemoryAllocationSize = 1073741824u;
const deUint32 maxDescriptorsInSet = 1024u;
+ // set values to be a bit smaller than required minimum values
MainDevProp3 mainProp3 =
{
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES, //VkStructureType sType;
DE_NULL, //void* pNext;
- maxDescriptorsInSet, //deUint32 maxPerSetDescriptors;
- maxMemoryAllocationSize //VkDeviceSize maxMemoryAllocationSize;
+ maxDescriptorsInSet - 1u, //deUint32 maxPerSetDescriptors;
+ maxMemoryAllocationSize - 1u //VkDeviceSize maxMemoryAllocationSize;
};
- DevProp2 prop2 =
- {
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, //VkStructureType sType;
- &mainProp3, //void* pNext;
- VkPhysicalDeviceProperties() //VkPhysicalDeviceProperties properties;
- };
+ DevProp2 prop2;
+ deMemset(&prop2, 0, sizeof(prop2)); // zero the structure
+ prop2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2;
+ prop2.pNext = &mainProp3;
m_context.getInstanceInterface().getPhysicalDeviceProperties2(m_context.getPhysicalDevice(), &prop2);
if (mainProp3.maxPerSetDescriptors < maxDescriptorsInSet)
return tcu::TestStatus::fail("Fail");
- if (mainProp3.maxMemoryAllocationSize == maxMemoryAllocationSize)
- return tcu::TestStatus::fail("Fail");
-
- if (mainProp3.maxPerSetDescriptors == maxDescriptorsInSet)
- return tcu::TestStatus::fail("Fail");
-
log << tcu::TestLog::Message << "maxMemoryAllocationSize: " << mainProp3.maxMemoryAllocationSize << tcu::TestLog::EndMessage;
log << tcu::TestLog::Message << "maxPerSetDescriptors: " << mainProp3.maxPerSetDescriptors << tcu::TestLog::EndMessage;
return tcu::TestStatus::pass("Pass");