lavapipe: don't overwrite entire VkFormatProperties3 struct

this clobbers pNext and breaks tooling, as found by Panagiotis Apostolou

Fixes: f72d5a930b ("lavapipe: KHR_format_feature_flags2")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17462>
This commit is contained in:
Mike Blumenkrantz 2022-07-11 10:59:00 -04:00 committed by Marge Bot
parent eb6faf329c
commit 276557b9c6

View file

@ -187,8 +187,11 @@ VKAPI_ATTR void VKAPI_CALL lvp_GetPhysicalDeviceFormatProperties2(
pFormatProperties->formatProperties.optimalTilingFeatures = format_props.optimalTilingFeatures & VK_ALL_FORMAT_FEATURE_FLAG_BITS;
pFormatProperties->formatProperties.bufferFeatures = format_props.bufferFeatures & VK_ALL_FORMAT_FEATURE_FLAG_BITS;
VkFormatProperties3 *prop3 = (void*)vk_find_struct_const(pFormatProperties->pNext, FORMAT_PROPERTIES_3);
if (prop3)
*prop3 = format_props;
if (prop3) {
prop3->linearTilingFeatures = format_props.linearTilingFeatures;
prop3->optimalTilingFeatures = format_props.optimalTilingFeatures;
prop3->bufferFeatures = format_props.bufferFeatures;
}
}
static VkResult lvp_get_image_format_properties(struct lvp_physical_device *physical_device,
const VkPhysicalDeviceImageFormatInfo2 *info,