vulkan/overlay: deal with unknown pNext structures
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Sat, 12 Nov 2022 22:24:11 +0000 (00:24 +0200)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 17 Apr 2023 12:41:58 +0000 (15:41 +0300)
commitb30a75a195fea9013fc912b84cd776aaa76f4692
tree7a55f922f7a204dc4f1ff1f8e17ae5b0ecaa23d0
parent1eb2359bbdd4bf00a8844095f2a24d8ada961906
vulkan/overlay: deal with unknown pNext structures

To implement some of the features of the layer, we need to enable some
of the feature bits at device/command_buffer creation. To do so, we
need to edit some of the structures coming from the application. Most
of those are const so we need to clone them before edition.

This change disables some of the layer features if we run into a
situation where one of the structure we need to clone is unknown such
that we can't make a copy of it (since we don't know its size).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7677
Cc: mesa-stable
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19897>
src/vulkan/overlay-layer/overlay.cpp