Repository navigation
Conversation
…k-union # Conflicts: # src/glue/gl.cpp
…iles - extend the backend-neutral IR with the additive fields the Vulkan backend needs: SoPointShape, SoStencilFunction/Op + SoStencilState, SoRenderState::stencil, and SoGeometryDesc::primitiveOffset - extend SoRenderParams with the external-target / gradient / camera- version / frame / replay / interaction-LOD fields - stage the fork's Vulkan-only files (all new) and helpers so the backend can be adapted to the stack interface in following commits
- SoVulkanRenderBackend::render() now takes the stack SoRenderPlan and SoSelectionState, matching SoRenderBackend - execution order is derived from the plan (opaque insertion + transparent depth sort) instead of the fork's private SoDrawList::getSortedOrder(); external entry points build a frame-local plan via SoRenderPlanner - command pass classification is mapped from the stack's orthogonal opacityClass/render stage via soVulkanCommandPass()
- IR: add SoGeometryDesc::retained, SoRasterState point-shape + scissor rect, SoMaterialData::flags + SO_MAT_* bits, SO_PARAM_CLEAR_STENCIL - Vulkan: adapter helpers for cull mode / CCW front-face (IR stores bools) - CMake: COIN_BUILD_VULKAN_RENDERER option, find_package(Vulkan), external VMA, Vulkan source/header lists, C++17 when enabled
- define SoLightingBlock + SoRenderIR::lightToEye/lightToWorld/ fillLightingBlock on the stack IR (shared by every retained backend) - add SoIRRenderAction camera-dependent frame flag (screen-constant-size and auto-zoom scenes must re-record on camera moves) - adapt the Vulkan recorder: plan-based execution order, pass/opacity+stage adapters, boolean cull/CCW, lights.size(), scissor/point-shape/material flag fields - SoVulkanRenderManager builds a SoRenderPlan and calls the new SoRenderBackend::render(drawlist, plan, params) libCoin now builds with -DCOIN_BUILD_VULKAN_RENDERER=ON against the stack.
- geometry.retained -> geometry.cacheKey != 0 - material.flags/SO_MAT_* -> texture payload + command.pixelRaster.enabled - drop the unused primitiveOffset The Vulkan backend now consumes only the canonical stack IR fields.
FreeCAD's Vulkan viewport adapter refreshes the scene-fitted clip planes after publishing a fitted plane to the shared camera; the stack manager lacked the public entry point. Additive; no behavior change on its own.
The convergence drops the pre-convergence (fork) retained-render spellings that FreeCAD's coin-vulkan-tests were written against. Add an opt-in, default-off compatibility layer so those tests keep building while the stack model is adopted: - SoRenderLegacyCompat.h defines SoRenderPassType + the SO_MAT_* bits and is pulled in by SoRenderIR.h; CMake gates it behind COIN_BUILD_RENDER_LEGACY_API (COIN_RENDER_LEGACY_API), so the shipping IR is unchanged. - Legacy IR spellings forward onto canonical fields: SoGeometryDesc::retained (cacheKey != 0), SoMaterialData::flags (texture/pixel-raster payload), SoRenderCommand::pass/pixelText (opacity+stage / pixelRaster), and SoRasterState::fillMode/cullMode (canonical fill mode / cullBackFaces). - SoDrawList::buildSortedOrder()/getSortedOrder() restore the fork's pass-then-view-depth index ordering. - SoVulkanRenderBackend::render(drawlist, params) rebuilds a plan via SoRenderPlanner; buildWorkItems honors an explicitly built sort order. - SoImage/SoText2 set the legacy material flags; SoGLRenderBackend casts the legacy fill mode. With compat on, coin-vulkan-tests builds and passes 28/28 against the ported libCoin; the default (compat off) build is unchanged.
Adopt the upstream retained-instance-data stack as the fork's coin line: the port re-implements the fork's Vulkan features (system VMA, clip-plane publish, camera-dependent replay, IR hot-path, wide-line, geometry-LOD gate, scoped prepass fence) on the stack, so its tree supersedes the pre-stack coin-Integrate content. This merge records coin-Integrate as an ancestor so the integration branch can advance to the stack port without conflicts.
| break; | ||
| case SEEK_END: | ||
| if ((file->buflen + offset > 0) && | ||
| (file->buflen + offset <= file->buflen)) { |
Owner
Author
|
Closing: this PR vendored the unmerged upstream FreeCAD/coin stack/* branch into coin-Integrate (41k additions). Superseded - the port will be re-cut against upstream, and fork work consolidated separately. |
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.
Adopts upstream's retained-instance-data stack as the base for the fork's Vulkan renderer and adapts the backend to the stack render interface.
What this branch contains
SoVulkanRenderBackend::render()takes the stackSoRenderPlan+SoSelectionState; execution order is derived from the plan instead of the fork's privateSoDrawList::getSortedOrder(); pass classification is mapped from the stack's orthogonal opacity/stage.COIN_BUILD_VULKAN_RENDERERoption, external VMA, Vulkan source lists;libCoinbuilds against the stack base.SoRenderManager::updateClippingPlanes— the public entry point the FreeCAD viewport adapter needs after publishing a fitted plane.COIN_BUILD_RENDER_LEGACY_API, default off) — a#if-guarded shim (SoRenderLegacyCompat.h) plus forwarding spellings (SoGeometryDesc::retained,SoMaterialData::flags,SoRenderCommand::pass/pixelText,SoRasterState::fillMode/cullMode,SoDrawList::buildSortedOrder/getSortedOrder, therender(drawlist, params)overload) so the fork's out-of-tree tests keep building while the canonical model is adopted.Verification
coin-port(Vulkan, compat off) andcoin-port-compat(compat on) build clean; the non-Vulkan port build is clean.coin-vulkan-testsagainst the compatlibCoin.so: 28/28 pass.Note
This branch is based on
upstream/stack/retained-instance-data, so the diff is large by construction — it carries the upstream stack plus the Vulkan port. The two Draft-grid fixes (feature-edge-only edge overlay, empty auto-clip bbox refresh) are not in it yet; they need a stack-IR feature-edge flag and will follow once they land on the fork (coin-Integrate).