mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
vulkan: add vk_debug_ignored_stype helper
from nvk. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Reviewed-by: Ivan Briano <ivan.briano@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29009>
This commit is contained in:
parent
9d5f15abb0
commit
9d34c0f705
1 changed files with 22 additions and 0 deletions
|
|
@ -22,6 +22,7 @@
|
|||
*/
|
||||
|
||||
#include "vk_instance.h"
|
||||
#include "vk_enum_to_str.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
@ -92,6 +93,27 @@ __vk_errorf(const void *_obj, VkResult error,
|
|||
const char *file, int line,
|
||||
const char *format, ...);
|
||||
|
||||
/**
|
||||
* Warn on ignored extension structs.
|
||||
*
|
||||
* The Vulkan spec requires us to ignore unsupported or unknown structs in
|
||||
* a pNext chain. In debug mode, emitting warnings for ignored structs may
|
||||
* help us discover structs that we should not have ignored.
|
||||
*
|
||||
* From the Vulkan 1.0.38 spec:
|
||||
*
|
||||
* Any component of the implementation (the loader, any enabled layers,
|
||||
* and drivers) must skip over, without processing (other than reading the
|
||||
* sType and pNext members) any chained structures with sType values not
|
||||
* defined by extensions supported by that component.
|
||||
*/
|
||||
#define vk_debug_ignored_stype(sType) \
|
||||
do { \
|
||||
const VkStructureType _type = (sType); \
|
||||
mesa_logd("%s: ignored VkStructureType %s(%u)\n", __func__, \
|
||||
vk_StructureType_to_str(_type), _type); \
|
||||
} while (0)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Loading…
Add table
Reference in a new issue