Skip to content

split/gfx scene#2077

Open
jcelerier wants to merge 54 commits into
masterfrom
split/gfx-scene
Open

split/gfx scene#2077
jcelerier wants to merge 54 commits into
masterfrom
split/gfx-scene

Conversation

@jcelerier

Copy link
Copy Markdown
Member
  • isf: TEX_DIMENSIONS_3D / IMG_SIZE_3D aliases for 3D samplers
  • isf: point3d_input AS_COLOR flag for color-swatch display
  • isf: parse-time warning on unknown csf_image_input FORMAT
  • isf: parser rework — top-level descriptors, uniform inputs, geometry AUXILIARY, vertex inputs
  • 3rdparty: add OffsetAllocator submodule
  • gfx: add AssetTable + TextureLoader for shared decoded-asset cache
  • gfx: add GpuResourceRegistry — slab-allocated GPU arenas backed by OffsetAllocator
  • gfx: add CameraMath / GpuTiming / VertexFallback helpers
  • gfx: add IsfBindingsBuilder + PipelineStateHelpers
  • gfx: add SceneGPUState — FlatScene + scene packer
  • gfx: add OffscreenDevice + RhiPreviewWidget + Metal buffer-copy backend
  • gfx: extend ISF / SimpleRenderedISF nodes for new ISF features
  • csf: rework for scene-aware compute pipeline
  • gfx: rework raw raster pipeline (MRT, AUXILIARY, EXECUTION_MODEL) and VSA
  • gfx: refresh shared graph plumbing for incremental scene pipeline
  • gfx: add ScenePreprocessorNode — scene_spec to flat draws + arena uploads
  • gfx: add SceneFilterNode + FlattenedSceneFilterNode + MergeGeometriesNode
  • avnd: split CpuFilter / CpuAnalysis lifecycle into init / initState / release
  • avnd: add scene_port concept
  • avnd: split GpuNode lifecycle and add scene_port storage helpers
  • gfx: extend ShaderProgram for new ISF features
  • gfx: refresh Filter / GeometryFilter / TexturePort for new pipeline
  • gfx: refresh WindowDevice / Spout / Syphon / WindowCapture
  • gfx: refresh GfxContext + window / screen / multiwindow nodes for incremental scene rebuild
  • js: gpu node lifecycle rework with deterministic teardown
  • wip: many bugfixes across the board
  • build: more build fixes
  • ci: fixes for older qt versions
  • rhi: populate caps
  • ci: try windows fixes
  • gfx: restore PhongNode, still used by score-vfx-template
  • gfx: keep TextureRenderTarget compatible with addons' aggregate init
  • gfx: do not include mmsystem.h in CommonUBOs.hpp
  • gfx: fix build with Qt < 6.9
  • gfx: fix designator order after TextureRenderTarget reorder
  • gfx: fix build with Qt 6.4
  • gfx: more Qt 6.4 compatibility guards

@jcelerier jcelerier force-pushed the split/gfx-scene branch 2 times, most recently from 18d8ecf to baed148 Compare June 18, 2026 16:29
jcelerier added a commit that referenced this pull request Jun 19, 2026
- BackgroundNode.hpp: include <score/application/GUIApplicationContext.hpp>
  (called score::GUIAppContext() via a broken transitive include; non-unity only)
- CommonUBOs.hpp: drop the <windows.h> + '#undef near/far' block (matches master)
  and rename the colliding UBO fields near/far -> znear/zfar. The '#undef far'
  leaked into downstream Windows headers, breaking mmeapi.h (CameraDevice.win32)
  and combaseapi.h (MSVC).
- CameraDevice.win32.cpp: clang-format off/on around the order-sensitive Windows
  includes so SortIncludes can't reorder and re-break them.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UJoeDPZWGZMVPe65Np4f2F
jcelerier added a commit that referenced this pull request Jun 19, 2026
- BackgroundNode.hpp: include <score/application/GUIApplicationContext.hpp>
  (called score::GUIAppContext() via a broken transitive include; non-unity only)
- CommonUBOs.hpp: drop the <windows.h> + '#undef near/far' block (matches master)
  and rename the colliding UBO fields near/far -> znear/zfar. The '#undef far'
  leaked into downstream Windows headers, breaking mmeapi.h (CameraDevice.win32)
  and combaseapi.h (MSVC).
- CameraDevice.win32.cpp: clang-format off/on around the order-sensitive Windows
  includes so SortIncludes can't reorder and re-break them.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UJoeDPZWGZMVPe65Np4f2F
@jcelerier jcelerier force-pushed the split/gfx-scene branch 2 times, most recently from db9b8dc to 1c1f6c8 Compare June 25, 2026 19:16
jcelerier added a commit that referenced this pull request Jun 25, 2026
- BackgroundNode.hpp: include <score/application/GUIApplicationContext.hpp>
  (called score::GUIAppContext() via a broken transitive include; non-unity only)
- CommonUBOs.hpp: drop the <windows.h> + '#undef near/far' block (matches master)
  and rename the colliding UBO fields near/far -> znear/zfar. The '#undef far'
  leaked into downstream Windows headers, breaking mmeapi.h (CameraDevice.win32)
  and combaseapi.h (MSVC).
- CameraDevice.win32.cpp: clang-format off/on around the order-sensitive Windows
  includes so SortIncludes can't reorder and re-break them.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UJoeDPZWGZMVPe65Np4f2F
jcelerier added a commit that referenced this pull request Jun 26, 2026
- BackgroundNode.hpp: include <score/application/GUIApplicationContext.hpp>
  (called score::GUIAppContext() via a broken transitive include; non-unity only)
- CommonUBOs.hpp: drop the <windows.h> + '#undef near/far' block (matches master)
  and rename the colliding UBO fields near/far -> znear/zfar. The '#undef far'
  leaked into downstream Windows headers, breaking mmeapi.h (CameraDevice.win32)
  and combaseapi.h (MSVC).
- CameraDevice.win32.cpp: clang-format off/on around the order-sensitive Windows
  includes so SortIncludes can't reorder and re-break them.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UJoeDPZWGZMVPe65Np4f2F
jcelerier added a commit that referenced this pull request Jun 26, 2026
- BackgroundNode.hpp: include <score/application/GUIApplicationContext.hpp>
  (called score::GUIAppContext() via a broken transitive include; non-unity only)
- CommonUBOs.hpp: drop the <windows.h> + '#undef near/far' block (matches master)
  and rename the colliding UBO fields near/far -> znear/zfar. The '#undef far'
  leaked into downstream Windows headers, breaking mmeapi.h (CameraDevice.win32)
  and combaseapi.h (MSVC).
- CameraDevice.win32.cpp: clang-format off/on around the order-sensitive Windows
  includes so SortIncludes can't reorder and re-break them.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UJoeDPZWGZMVPe65Np4f2F
jcelerier added 19 commits July 6, 2026 21:02
…AUXILIARY, vertex inputs

Top-level descriptors (PIPELINE_STATE, MULTIVIEW, EXECUTION_MODEL, EXTENSIONS,
CLIP_DISTANCES / CULL_DISTANCES, DEPTH_LAYOUT). New input kinds: uniform_input
(UBO INPUTS), per-input sampler_config (WRAP / FILTER / COMPARE / MIPS),
audio_sampler_config. Storage / image / cubemap input extensions: PERSISTENT,
IS_ARRAY, GENERATE_MIPS, cube/3D textures. Geometry input AUXILIARY: storage +
sampled, persistent, is_uniform, depth companion, INDIRECT block. Per-pass:
LAYER, Z, FORMAT, PIPELINE_STATE override. OUTPUTS: LAYERS, DEPTH, FORMAT,
SAMPLES, CUBEMAP, GENERATE_MIPS, WIDTH/HEIGHT expressions. Vertex inputs:
REQUIRED, DEFAULT, SEMANTIC, INTERPOLATION (with auto-flat for int/bool
varyings).

Bug fixes: mat3/mat4 attribute slot count, TYPES struct emission in BOTH
stages, drop incorrect std430 padding heuristic that was breaking RawLight
stride.
jcelerier and others added 25 commits July 6, 2026 21:02
It breaks the score-plugin-jit unity build where cc1_main.cpp #undefs
CALLBACK earlier in the TU; windows.h is enough for the near/far undefs.
UsesShadingRate only exists since Qt 6.9; rhi/qrhi.h only since Qt 6.6 -
use private/qrhi_p.h like the rest of the codebase.
QRhi::D3D12 only exists since Qt 6.6; QDebug << std::string is
ambiguous there.
GPU timestamps & pipeline statistics need Qt 6.6, multiview needs
Qt 6.7, buffer readbacks use QRhiBufferReadbackResult before 6.6;
qrhivulkan_p.h was missing for QRhiVulkanNativeHandles.
setShadingRate build-break (rhi#1), multiview pipeline count on D3D12/Metal (rhi#2), 6.7->6.8 depth-resolve guards (rhi#3), D3D12 compute-barrier guards (rhi#4), depth-only RT UAF (rhi#5), multiview/layered MRT attachments (rhi#6), indirect stride/count + indexed-only MDI (rhi#7,8), GPU-cull readback freeze + feature check (rhi#9), PSO throttle race (rhi#11), barrier/Dynamic/D3D12-transition (rhi#12,13,14), async pipeline-cache write (rhi#17).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
model/renderer port drift for storage/image inputs and synthesized-int uniform shift across visitors, renderer port-advance and GLSL codegen (filter#2,3,11, avnd#6,7); ShaderSource hash/== (filter#4); save-without-document guard (filter#8); CSF oversized-workgroup continue + per-pass barrier (rhi#10,15).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
bounds/null-check script-supplied EdgeSpecs in incrementalEdgeUpdate (filter#1); lock edge mutations + TS_GUARDED_BY (filter#6); race-free edges_changed handoff (filter#7).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
per-attribute stride dedup (threedim#4), duplicated-instance dedup by (node,path) (threedim#1), cloud fast-path fingerprint (threedim#2), per_draws mirror seeding (threedim#3), CPU attribute bounds (threedim#10), instancer material aux sizing (threedim#11), per-frame camera/copy gating (threedim#12,13).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
defer manager deletion until no previews remain (filter#5); walk_descriptor_inputs for preview port indexing (filter#10).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
GStreamer partial-pipeline/EOS/stride/backpressure/bus (gst#1-7); Spout R16G16B16A16_UNORM (spout#9); Syphon reconnect + stop symmetry (syphon#10,11).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gpu_render_target_output specialization (avnd#1), per-pass pipeline/SRB + SRB double-free/leak (avnd#2,3), compute renderer State protocol (avnd#4), per-frame edge dedup (avnd#10), output port flags (avnd#11a), xyzw_spinbox ctor (avnd#12), graphics prepare() (avnd#13), geometry stub interface (avnd#17).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
release engine by stored key not current-thread (js#2), tolerant port guards (js#3), sample-count-mismatch fallback (js#4), dead members/branches + --script file check (js#5,6,7,8,9).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The engine rework moved the pipeline pointer to Pass::p.pipeline; ModelDisplayNode still used the old Pass::pipeline (6 sites) and failed to compile against the reworked engine. This is the engine-API blast radius and must ride with gfx-scene so score_plugin_threedim builds (and so gfx-scene can merge without breaking master's threedim plugin). The fuller ModelDisplay refresh remains on split/threedim. PR #2050.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- BackgroundNode.hpp: include <score/application/GUIApplicationContext.hpp>
  (called score::GUIAppContext() via a broken transitive include; non-unity only)
- CommonUBOs.hpp: drop the <windows.h> + '#undef near/far' block (matches master)
  and rename the colliding UBO fields near/far -> znear/zfar. The '#undef far'
  leaked into downstream Windows headers, breaking mmeapi.h (CameraDevice.win32)
  and combaseapi.h (MSVC).
- CameraDevice.win32.cpp: clang-format off/on around the order-sensitive Windows
  includes so SortIncludes can't reorder and re-break them.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UJoeDPZWGZMVPe65Np4f2F
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A8dWKnm8kgkuDaMMjapgFT
jcelerier and others added 4 commits July 7, 2026 09:35
PassMap changed from pair<Edge*, Pipeline> to pair<Edge*, Pass>; addons
like score-vfx-template still emplace a Pipeline per edge.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A8dWKnm8kgkuDaMMjapgFT
- RenderList::onEdgeRemoved: rebind surviving sink samplers to the empty
  texture before releasing their input render target; the incremental
  path dropped master's implicit rebind-everything guarantee (UAF on
  live cable disconnect).
- MultiWindowNode::setRenderSize: recreate the offscreen target before
  the render-list rebuild again (the synchronous rebuild path compiled
  pipelines against pointers freed right after); marshal the OSC
  rendersize callback to the Qt thread like the other callbacks.
- Crousti GpuNode/GpuComputeNode: recreate the SRB after the
  srb_touched destroy path; it was only created on first init, so any
  later resource reallocation bound a null native descriptor set.
- GaussianSplat: null the batch after the preprocess and depth-key
  beginComputePass — SH-preprocess frames double-submitted it.
- RawRaster: build the MRT pipeline against the per-iteration render
  pass in execution-model modes (PerMip/PerCubeFace/PerLayer color) —
  the N-attachment multisampled MRT descriptor is incompatible with the
  1-color 1-sample iteration RTs; fix depth sample-count mismatch in
  the no-declared-depth MRT branch.
- ISF: key persistent-SSBO ping-pong and MRT render-once guards on the
  RenderList frame counter — update() runs once per sink, so the bool
  guards double-swapped/double-rendered with more than one output edge;
  SimpleRenderedISF now also re-applies swapped bindings to every SRB.
- Soft-fail instead of throwing on the render thread: batch-pool
  exhaustion in RenderList::render, empty m_passes after a failed
  pipeline build in RenderedISFNode::update.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A8dWKnm8kgkuDaMMjapgFT
- ShaderProgram: removeIncludesInComments hung on backslash-escaped
  quotes (loop never advanced).
- Window::exposeEvent: restore the null-swapchain self-heal; teardown
  runs on the render thread with plain writes, so the GUI thread can
  observe the inconsistent (flag, pointer) pair mid-teardown.
- ModelCameraUBO: pack modelNormal as three vec4-aligned columns as
  std140 mat3 requires; 9 contiguous floats garbled columns 1-2.
- GenericNodeRenderer: key the pipeline cache on the renderpass
  serializedFormat() (QRhi's documented compatibility key) instead of
  the rp-desc pointer, which could alias a freed descriptor.
- ISF: seed the MULTIVIEW viewProjection UBO with identities; it was
  never written, so multiview shaders collapsed all vertices to zero.
- WindowCapture (pipewire): fix ARGB8888/XBGR8888 fourccs (were the
  invalid 'RA24'/'BX24'); double-buffer the CPU frame so grab()'s
  pointer survives the capture thread's next resize; publish a dup of
  the DMA-BUF fd so imports don't race the requeued buffer's teardown.
- Graph::reconcileAllRenderLists: don't dereference a null batch when
  the update-batch pool is exhausted.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A8dWKnm8kgkuDaMMjapgFT
- ScenePreprocessorNode: cascade_split_distances slot k must hold the
  FAR plane of cascade k (boundary k+1); copying boundary k shifted
  every split by one slice and dropped the real far distance at 8
  cascades.
- CustomMesh: skip sub-meshes whose bindings/attributes differ from
  meshes[0] — the only layout the pipeline is built for — instead of
  fetching them through the wrong strides.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A8dWKnm8kgkuDaMMjapgFT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants