Check for optional vertex buffer format support in vulkan vertex zoo

This commit is contained in:
baldurk
2019-12-13 11:07:32 +00:00
parent 5ae489b18b
commit ed53548731
+18 -1
View File
@@ -279,6 +279,23 @@ void main()
if(physProperties.limits.maxVertexOutputComponents < 128)
Avail = "Not enough vertex output components to run test";
VkFormatProperties props = {};
vkGetPhysicalDeviceFormatProperties(phys, VK_FORMAT_R64G64_SFLOAT, &props);
if((props.bufferFeatures & VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT) == 0)
{
Avail = "VK_FORMAT_R64G64_SFLOAT not supported in vertex buffers";
return;
}
vkGetPhysicalDeviceFormatProperties(phys, VK_FORMAT_R16G16B16A16_USCALED, &props);
if((props.bufferFeatures & VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT) == 0)
{
Avail = "VK_FORMAT_R16G16B16A16_USCALED not supported in vertex buffers";
return;
}
}
int main()
@@ -403,4 +420,4 @@ void main()
}
};
REGISTER_TEST();
REGISTER_TEST();