Merge pull request #410 from cdavis5e/format-props-2-match-core

MVKDevice: Make result of extended getFormatProperties() match the core API.
This commit is contained in:
Bill Hollings 2018-12-19 11:49:45 -05:00 committed by GitHub
commit 7b0630290f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -175,10 +175,9 @@ void MVKPhysicalDevice::getFormatProperties(VkFormat format, VkFormatProperties*
void MVKPhysicalDevice::getFormatProperties(VkFormat format, void MVKPhysicalDevice::getFormatProperties(VkFormat format,
VkFormatProperties2KHR* pFormatProperties) { VkFormatProperties2KHR* pFormatProperties) {
static VkFormatProperties noFmtFeats = { 0, 0, 0 };
if (pFormatProperties) { if (pFormatProperties) {
pFormatProperties->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR; pFormatProperties->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR;
pFormatProperties->formatProperties = getFormatIsSupported(format) ? mvkVkFormatProperties(format) : noFmtFeats; pFormatProperties->formatProperties = mvkVkFormatProperties(format, getFormatIsSupported(format));
} }
} }