VkDrmFormatModifierPropertiesListEXT::drmFormatModifierCount may be used uninitialized. It is a codegen bug but a proper fix breaks the protocol. Until we are ready to finalize the protocol, let's work around it. It works so far because Mesa calls the function twice in a row. In the first call, pDrmFormatModifierProperties is NULL and the uninitialized value is not used. Instead, it is initialized by the host driver. In the second call, because of how the temp pool works, the memory gets reused and the "uninitialized value" is already initialized. Thanks goes to Yiwei for figuring this out. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com>macos/master
parent
8bed497ee7
commit
56aedd7129
Loading…
Reference in new issue