Skip to content

Refactor rasterize variant management and beforePasses scheduling#8579

Merged
mvaligursky merged 1 commit intomainfrom
mv-rasterize-variant-beforepasses
Apr 7, 2026
Merged

Refactor rasterize variant management and beforePasses scheduling#8579
mvaligursky merged 1 commit intomainfrom
mv-rasterize-variant-beforepasses

Conversation

@mvaligursky
Copy link
Copy Markdown
Contributor

@mvaligursky mvaligursky commented Apr 7, 2026

Refactors compute GSplat rasterize shader variant management and camera beforePasses scheduling for cleaner architecture and correct event handling.

Changes:

  • Move rasterize shader/BindGroupFormat/Compute creation from GSplatComputeLocalRenderer into GSplatLocalDispatchSet behind a Map-based variant cache (getRasterizeCompute(key)), allowing lazy per-variant creation without duplicating heavy buffers
  • Move beforePasses scheduling from ForwardRenderer.buildFrameGraph() into RenderPassForward.updateCameraBeforePasses(), using the existing firstCameraUse flag to guarantee exactly-once collection per camera
  • Add updateCameraUseFlags() to FramePassCameraFrame so that CameraFrame's internally created RenderPassForward instances have correct firstCameraUse/lastCameraUse flags, fixing EVENT_PRERENDER/EVENT_POSTRENDER not firing in the CameraFrame path

Move rasterize shader/BindGroupFormat/Compute creation from
GSplatComputeLocalRenderer into GSplatLocalDispatchSet behind a
Map-based variant cache (getRasterizeCompute(key)), allowing lazy
per-variant creation without duplicating heavy buffers.

Move beforePasses scheduling from ForwardRenderer.buildFrameGraph()
into RenderPassForward.updateCameraBeforePasses(), using the existing
firstCameraUse flag to guarantee exactly-once collection per camera.

Add updateCameraUseFlags() to FramePassCameraFrame so that
CameraFrame's internally created RenderPassForward instances have
correct firstCameraUse/lastCameraUse flags, fixing
EVENT_PRERENDER/EVENT_POSTRENDER not firing in the CameraFrame path.

Made-with: Cursor
@mvaligursky mvaligursky self-assigned this Apr 7, 2026
@mvaligursky mvaligursky added the area: graphics Graphics related issue label Apr 7, 2026
@mvaligursky mvaligursky merged commit 3adf819 into main Apr 7, 2026
8 checks passed
@mvaligursky mvaligursky deleted the mv-rasterize-variant-beforepasses branch April 7, 2026 15:15
mvaligursky pushed a commit that referenced this pull request Apr 8, 2026
Remove unused requiresDepth metadata from Camera.beforePasses entries
introduced in #8579, reverting the type to FramePass[]. The field was
never consumed by the scheduling logic.

Made-with: Cursor
mvaligursky added a commit that referenced this pull request Apr 8, 2026
Remove unused requiresDepth metadata from Camera.beforePasses entries
introduced in #8579, reverting the type to FramePass[]. The field was
never consumed by the scheduling logic.

Made-with: Cursor

Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: graphics Graphics related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant