Repository navigation
Vulkan: export the renderer capability and cut the fork's debug dev tools - #74
Merged
Merged
Conversation
Prepare the retained-IR / Vulkan backend for upstream: - Export the renderer capability from the generated public header: basic.h.cmake.in now defines COIN_HAVE_VULKAN_RENDERER alongside COIN_HAVE_LEGACY_GL_RENDERER, and the public Vulkan headers (SoVulkanRenderManager.h, SoVulkanRenderTarget.h, SoVulkanImageCopy.h) gate their declarations on it instead of the private COIN_BUILD_VULKAN_RENDERER build flag. An installed Coin now tells consumers what it was built with. - Drop the build-wide -DNOMINMAX; suppress the Windows min/max macros locally in the translation units that pull in <vulkan/vulkan.h> (SoVulkanPlatform.h). - Scope C++17 to a dedicated vulkanrendering object library instead of raising CMAKE_CXX_STANDARD for the whole build; the core and legacy-GL paths stay at Coin's default standard. - ABI: append SoNode::IRRender to the end of the vtable rather than inserting it between the other action methods (which shifted every later slot), and remove the dead SoVulkanRenderManager::getBackend() that leaked the internal SoVulkanRenderBackend type. - Remove the dead SoDrawList::restrikeLighting compatibility shim. - Check the previously-ignored VkResult returns on the frame path (beginFrame / waitForInFlightFrames) and surface vkCreateImageView failures. Also consolidate the fork's debugging: rename the renderer env vars FC_VULKAN_* -> COIN_VULKAN_*, route output through SoVulkanDebug::post(), and drop the ad-hoc FC_VULKAN_CLIP_DEBUG tracing from the per-command path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upstream-readiness pass over the retained-IR / Vulkan backend.
Public capability
basic.h.cmake.innow exportsCOIN_HAVE_VULKAN_RENDERER(mirroringCOIN_HAVE_LEGACY_GL_RENDERER); the public Vulkan headers gate on it instead of the privateCOIN_BUILD_VULKAN_RENDERERbuild flag, so an installed Coin tells consumers what it was built with.basic.h.in(non-CMake) defines it to 0.Build hygiene
-DNOMINMAX; the Windowsmin/maxmacros are suppressed locally viaSoVulkanPlatform.honly in the TUs that include<vulkan/vulkan.h>.vulkanrenderingobject library withcxx_std_17; core/legacy-GL and every other target stay at Coin's default standard. Verified:rendering=gnu++11,vulkanrendering=gnu++17.ABI
SoNode::IRRenderis now appended at the end of the vtable instead of being inserted between the other action methods (which shifted every later slot). Adding a virtual is still an ABI break (all consumers — Pivy, FreeCAD, third-party nodes — must recompile, andSOVERSIONshould be bumped for a release).SoVulkanRenderManager::getBackend()that returned a pointer to the internalSoVulkanRenderBackend(no callers), tightening the public/internal boundary.SoDrawList::restrikeLightingshim.Error handling
SoVulkanResult.h'sSoVulkan::Resultis an unrelated internal status type; there is no centralVK_CHECK. Audit found noassert()/abort()failure paths (onlystatic_assert+ runtime checks), and the frame-pathVkResultreturns that were ignored (beginFrame/waitForInFlightFramesvkWaitForFences/vkResetFences, andvkCreateImageView) are now checked and logged.Debug consolidation
FC_VULKAN_*->COIN_VULKAN_*; debug output routed throughSoVulkanDebug::post(); the ad-hocFC_VULKAN_CLIP_DEBUGper-command tracing removed.Testing
build-coin(standalone, C++11 default) andbuild-freecad(bundled) both build clean.