-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Background
To optimize and modularize the XR rendering workflow, propose the following architectural changes:
1. Maintain a vector for each xr::StereoRenderingFrame
- Each
xr::StereoRenderingFrameshould own and manage a vector ofGPURenderPassEncoderinstances. - This enables fine-grained control over multiple render passes per frame and prepares the architecture for advanced effects and multi-pass composition.
2. Introduce a New Class (e.g., XRRenderPassQueueBuilder)
- Design and implement a new class (referred to as
Afor now), responsible for collectingTrCommandBufferRequestobjects and building a queue/vector ofGPURenderPassEncoderobjects. - The class should:
- Accept input of
TrCommandBufferRequestobjects (potentially from multiple sources) - Generate and maintain an ordered queue/vector of
GPURenderPassEncoderfor subsequent rendering operations - Support efficient queue updates and thread safety if necessary
- Accept input of
3. Integrate into TrContentRenderer::onCommandBufferRequestReceived()
- Refactor
TrContentRenderer::onCommandBufferRequestReceived()to utilize the new class (A). - Upon receiving a
TrCommandBufferRequest, pass it toAto extend/build the GPURenderPassEncoder queue for the current frame. - Ensure that the queue is properly consumed during the frame rendering pipeline.
Acceptance Criteria
- Each
xr::StereoRenderingFramemaintains and exposes its own vector ofGPURenderPassEncoder. - A new class (e.g.,
XRRenderPassQueueBuilder) exists and can convert a stream ofTrCommandBufferRequestinto a queue/vector ofGPURenderPassEncoder. - The command buffer request handling in
TrContentRendereris refactored to use this new queue builder. - The design is documented and aligns with JSAR's rendering architecture.
Related Areas
xr::StereoRenderingFrame(frame lifecycle and data members)TrContentRenderer(command buffer and rendering integration)- Command buffer and rendering pass management
This refactor will improve extensibility and clarity in the XR rendering pipeline, enabling future enhancements such as multi-pass effects, advanced compositing, and better pipeline diagnostics.
Copilot
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request