chore(tracy): add GPU zone to ForEachLoadedFeature#2165
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 (9)
💤 Files with no reviewable changes (1)
✅ Files skipped from review due to trivial changes (4)
📝 WalkthroughWalkthroughFeature profiling integration updated: Feature::ForEachLoadedFeature gained an optional emitGpuZone flag and stored Tracy D3D11 context; State forwards the Tracy context to Feature; Deferred now calls ForEachLoadedFeature with emitGpuZone=true; several per-feature manual Tracy scopes were adjusted or removed. Changes
Sequence Diagram(s)sequenceDiagram
participant State as State::SetupResources
participant Deferred as Deferred (caller)
participant FeatureMgr as Feature (static)
participant FeatureInst as Feature instance (e.g., Skylighting)
State->>FeatureMgr: Create TracyD3D11Ctx(device, context)
State->>FeatureMgr: Feature::SetTracyCtx(tracyCtx)
Deferred->>FeatureMgr: ForEachLoadedFeature("Prepass", callback, emitGpuZone=true)
FeatureMgr->>FeatureMgr: if TRACY_ENABLE && emitGpuZone -> begin Tracy GPU zone
FeatureMgr->>FeatureInst: invoke callback(feature) (calls feature->Prepass()/...)
FeatureInst-->>FeatureMgr: return
FeatureMgr->>FeatureMgr: if GPU zone started -> end Tracy GPU zone
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/State.cpp`:
- Around line 693-694: The call to Feature::SetTracyCtx(tracyCtx) is
unconditional but SetTracyCtx is only defined when TRACY_ENABLE is set; wrap the
call (or the surrounding statement(s) that reference tracyCtx) in the
appropriate TRACY_ENABLE preprocessor guard so non-Tracy builds compile, e.g.,
conditionally call Feature::SetTracyCtx only when TRACY_ENABLE is defined after
creating tracyCtx from TracyD3D11Context; reference tracyCtx, TracyD3D11Context
and Feature::SetTracyCtx when locating the fix.
🪄 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: b4832d12-3660-4ccb-849e-7d7ec1ab0592
📒 Files selected for processing (7)
src/Deferred.cppsrc/Feature.hsrc/Features/IBL.cppsrc/Features/ScreenSpaceShadows.cppsrc/Features/Skylighting.cppsrc/Features/TerrainBlending.cppsrc/State.cpp
💤 Files with no reviewable changes (1)
- src/Features/IBL.cpp
|
No actionable suggestions for changed features. |
|
✅ A pre-release build is available for this PR: |
Introduce TracyD3D11 GPU zones in ForEachLoadedFeature via optional emitGpuZone param, wired through a static TracyD3D11Ctx set from State after device init. Remove manual BeginPerfEvent/TracyD3D11Zone calls from IBL now covered by the centralized path. Refine CPU zones in ScreenSpaceShadows, Skylighting, and TerrainBlending with callstack depth and named sub-zones for finer profiling granularity. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Feature::SetTracyCtx only exists when TRACY_ENABLE is defined; unconditional call breaks non-Tracy builds. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Introduce TracyD3D11 GPU zones in ForEachLoadedFeature via optional emitGpuZone param, wired through a static TracyD3D11Ctx set from State after device init. Remove manual BeginPerfEvent/TracyD3D11Zone calls from IBL now covered by the centralized path. Refine CPU zones in ScreenSpaceShadows, Skylighting, and TerrainBlending with callstack depth and named sub-zones for finer profiling granularity.
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
Summary by CodeRabbit