diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKPixelFormats.h b/MoltenVK/MoltenVK/GPUObjects/MVKPixelFormats.h index 1a11ad21..0c9de9d4 100644 --- a/MoltenVK/MoltenVK/GPUObjects/MVKPixelFormats.h +++ b/MoltenVK/MoltenVK/GPUObjects/MVKPixelFormats.h @@ -342,6 +342,9 @@ public: /** Returns the name of the specified Metal pixel format. */ const char* getName(MTLPixelFormat mtlFormat); + /** Returns the name of the specified Metal vertex format. */ + const char* getName(MTLVertexFormat mtlFormat); + /** * Returns the MTLClearColor value corresponding to the color value in the VkClearValue, * extracting the color value that is VkFormat for the VkFormat. diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKPixelFormats.mm b/MoltenVK/MoltenVK/GPUObjects/MVKPixelFormats.mm index 4e98aaea..635f2a60 100644 --- a/MoltenVK/MoltenVK/GPUObjects/MVKPixelFormats.mm +++ b/MoltenVK/MoltenVK/GPUObjects/MVKPixelFormats.mm @@ -375,6 +375,10 @@ const char* MVKPixelFormats::getName(MTLPixelFormat mtlFormat) { return getMTLPixelFormatDesc(mtlFormat).name; } +const char* MVKPixelFormats::getName(MTLVertexFormat mtlFormat) { + return getMTLVertexFormatDesc(mtlFormat).name; +} + void MVKPixelFormats::enumerateSupportedFormats(VkFormatProperties properties, bool any, std::function func) { static const auto areFeaturesSupported = [any](uint32_t a, uint32_t b) { if (b == 0) return true;