chore(VR): remove dead reprojection code#2061
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe reprojection compute shader and its dispatch were removed; stereo reprojection is replaced by the stereo blend path. New readiness gating and stencil-swap tracking were added; shader/resource compilation and dispatch for reprojection were deleted and related settings/defaults adjusted. Changes
Sequence Diagram(s)sequenceDiagram
participant Frame
participant Deferred as Deferred::StartDeferred
participant VRFeat as globals::features::vr
participant StereoOpt as VRStereoOptimizations
participant GPU as GPU/Shaders
Frame->>Deferred: Begin frame
Deferred->>VRFeat: globals::features::vr.IsStereoOptimizationCullingReady()
alt culling ready
Deferred->>StereoOpt: Dispatch stencil classification
StereoOpt->>VRFeat: NoteStencilSwap() (via OMSetDepthStencilState hook)
end
Frame->>VRFeat: VR::DrawStereoBlend()
VRFeat->>VRFeat: compute vrStereoOptActive via IsStereoOptimizationCullingReady()
alt use overwrite blend
VRFeat->>GPU: Bind overwrite blend CS / resources
GPU-->>VRFeat: Execute stereo overwrite blend
else normal blend
VRFeat->>GPU: Bind normal blend path
GPU-->>VRFeat: Execute stereo blend
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
No actionable suggestions for changed features. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/Deferred.cpp`:
- Around line 283-285: DeferredCompositeCS can read stale texPerPixelMode if
DispatchStencil() is skipped; update DeferredPasses() to only bind
texPerPixelMode to slot 16 when the same stencil-readiness gate used to call
DispatchStencil() is true (e.g.
globals::features::vr.IsStereoOptimizationCullingReady() or
stereoOpt.IsStencilActive()), and explicitly bind a null SRV (nullptr) to slot
16 when that gate is false so the compute shader cannot early-out based on stale
data; make this change near the existing stereoMode/texPerPixelMode binding
logic to mirror the DispatchStencil() condition.
In `@src/Features/VR.h`:
- Around line 129-135: The helper IsStereoOptimizationCullingReady must mirror
the actual pass prerequisites: either extend it to include the stencil and blend
resources or create two dedicated checks CanDispatchStencil() and
CanDrawStereoBlend() and use them where DispatchStencil() and DrawStereoBlend()
are called; ensure each check validates REL::Module::IsVR(), stereoOpt.loaded,
stereoOpt.settings.stereoMode != VRStereoOptimizations::StereoMode::Off,
!stereoOpt.settings.debugSkipMerge and the specific DirectX resources (for
stencil: the same resources DispatchStencil() requires; for blend:
stereoBlendOverwriteCS, stereoBlendCopyTex and stereoBlendCB) and return false
if any are null so the outer pipeline never assumes readiness when a later stage
will early-out.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4e4c6bbf-445e-40be-b6f9-acb0efd8c7a4
📒 Files selected for processing (6)
package/Shaders/VRStereoOptimizations/ReprojectionCS.hlslsrc/Deferred.cppsrc/Features/VR.hsrc/Features/VRStereoOptimizations.cppsrc/Features/VRStereoOptimizations.hsrc/Globals.cpp
💤 Files with no reviewable changes (1)
- package/Shaders/VRStereoOptimizations/ReprojectionCS.hlsl
|
✅ A pre-release build is available for this PR: |
This reverts commit 8a0e862.
Summary by CodeRabbit
Documentation
Refactor
Chores