Dav1dde / glad

Multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs.
https://glad.dav1d.de/
Other
3.73k stars 440 forks source link

Vulkan API requring vulkan headers #405

Closed JRBurn777 closed 7 months ago

JRBurn777 commented 1 year ago

When generating Glad for Vulkan, the VK_EXTvideo and VK_KHRvideo extensions require the vk_video Vulkan headers.

include/glad/vulkan.h|7243 col 2| #include "vk_video/vulkan_video_codec_h264std.h"
include/glad/vulkan.h|7246 col 2| #include "vk_video/vulkan_video_codec_h264std_decode.h"
include/glad/vulkan.h|7296 col 2| #include "vk_video/vulkan_video_codec_h265std.h"
include/glad/vulkan.h|7302 col 2| #include "vk_video/vulkan_video_codec_h265std_decode.h"
include/glad/vulkan.h|7372 col 2| #include "vk_video/vulkan_video_codec_h264std_encode.h"
include/glad/vulkan.h|7489 col 2| #include "vk_video/vulkan_video_codec_h265std_encode.h"

The last two in that list are protected by "VK_ENABLE_BETA_EXTENSIONS" which I do not define, but the initial four includes cause build issues without additionally pulling in the vk_video headers.

I can avoid the issue by removing all VK_EXTvideo and VK_KHRvideo extensions before generating.

Is this intentional behavior?

Generator Options to reproduce APIs:

Extensions:

Options:

JRBurn777 commented 1 year ago

As an update, with the addition of video headers in this patch: https://github.com/Dav1dde/glad/commit/71f30638529eedfad3e9c47b0e6940dd1a7cf727, generating for Vulkan 1.3 and all extensions almost works.

python3 -m glad --out-path=<dir> --api="vulkan=1.3" c --alias --mx

If I pull down vulkan_video_codecs_common.h and place it with the other vk_video headers, I'm able to build and run.

Dav1dde commented 1 year ago

Sorry I totally forgot about this issue, looks like https://github.com/Dav1dde/glad/issues/434 is a duplicate. I've opened an issue in the Khronos tracker about it, for now manually downloading the header should be all that's needed or generating an older API version via --reproducible.

Dav1dde commented 7 months ago

Fixed with 7e52c19d0991b237979eed67e4115b8d182a6c6c