SimpleAllocator memAlloc (vk, vkDevice, getPhysicalDeviceMemoryProperties(context.getInstanceInterface(), context.getPhysicalDevice()));
const VkComponentMapping componentMappingRGBA = { VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_G, VK_COMPONENT_SWIZZLE_B, VK_COMPONENT_SWIZZLE_A };
- if (m_samplerParams.pNext != DE_NULL)
+ void const* pNext = m_samplerParams.pNext;
+ while (pNext != DE_NULL)
{
- const VkStructureType nextType = *reinterpret_cast<const VkStructureType*>(m_samplerParams.pNext);
+ const VkStructureType nextType = *reinterpret_cast<const VkStructureType*>(pNext);
switch (nextType)
{
case VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT:
TCU_THROW(NotSupportedError, "filterMinmaxImageComponentMapping is not supported (R mapping is not IDENTITY)");
}
}
+ pNext = reinterpret_cast<const VkSamplerReductionModeCreateInfo*>(pNext)->pNext;
}
break;
+ case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO:
+ pNext = reinterpret_cast<const VkSamplerYcbcrConversionInfo*>(pNext)->pNext;
+ break;
default:
TCU_FAIL("Unrecognized sType in chained sampler create info");
}