NVIDIAGameWorks / Displacement-MicroMap-Toolkit

Other
136 stars 10 forks source link

pfn_vkGetLatencyTimingsNV build error with latest Vulkan SDK #10

Open pknowlesnv opened 3 months ago

pknowlesnv commented 3 months ago

The external/nvpro_core submodule contains code generated from the vulkan SDK, which can conflict when compiling against a different vulkan SDK. Example build errors:

'PFN_vkGetLatencyTimingsNV': too many arguments for call
Displacement-MicroMap-Toolkit/external/nvpro_core/nvvk/extensions_vk.cpp:3263:48:
> error: cannot convert ‘uint32_t*’ {aka ‘unsigned int*’} to
> ‘VkGetLatencyMarkerInfoNV*’ in argument passing
>  3263 |   pfn_vkGetLatencyTimingsNV(device, swapchain, pTimingCount,
> pLatencyMarkerInfo);
>       | ^~~~~~~~~~~~
>       |                                                |
>       |                                                uint32_t* {aka
> unsigned int*}

A workaround may be to re-run the code generation:

python external/nvpro_core/nvvk/extensions_vk.py
NBickford-NV commented 3 months ago

As of nvpro_core version https://github.com/nvpro-samples/nvpro_core/commit/163809b8e92324b338b11ba4f39fde368bb941c3 or later, , nvpro_core now automatically re-runs extensions_vk.py if it can find Python -- if it's feasible to update the nvpro_core version, maybe that would work? Nvpro_core now has this change because it fixes this problem for most users for the span of time between when a new Vulkan SDK is released and when we have a newer version of extensions_vk.cpp in Git.