chore(upscaling): Tracy GPU zone for SSR ReflectionsRayTracing#106
Conversation
|
Warning Review limit reached
More reviews will be available in 4 minutes and 53 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ 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.
Pull request overview
Adds TRACY-only instrumentation to expose the engine’s SSR raymarch pass (ISReflectionsRayTracing) on the Tracy GPU timeline by hooking the shader’s PreRender/PostRender vfuncs and bracketing the draw with a D3D11 Tracy GPU zone.
Changes:
- Introduces
SSRPreRender_Hook/SSRPostRender_Hookto open/close atracy::D3D11ZoneScopearound the SSR draw (TRACY builds only). - Installs the hooks via
stl::write_vfunc<0x0A/0x0B>onVTABLE_BSImagespaceShaderReflectionsRayTracingduringUpscaling::PostPostLoad(). - Adds logging to confirm installation when
TRACY_ENABLEis defined.
Measure the engine SSR raymarch pass so the foveated-SSR saving is visible on the GPU timeline. RenderDoc callstacks proved the effect renders as a pixel-shader DRAW via the non-virtual BSImagespaceShader::Render (deferred batch path), not the ImageSpaceManager vtable Render slot and not DispatchComputeShader. Hook the per-shader PreRender (0x0A) and PostRender (0x0B) vfuncs on the ReflectionsRayTracing vtable, which bracket the draw; CommonLib keeps both at stable indices across SE/AE/VR (the VR-only FakeDispatchComputeShader inserts at 0x0D, after them), so no per-version addresses are needed. The GPU zone spans the two hooks. Diagnostic-only (TRACY_ENABLE-gated), behaviour-preserving: each thunk only chains the original vfunc. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
5562348 to
eb29b2d
Compare
|
✅ A pre-release build is available for this PR: |
Replace the per-frame new/delete of the D3D11ZoneScope with a static std::optional (emplace/reset) so the diagnostic adds no heap traffic per frame and can't skew the profile it measures. Behaviour identical; TRACY_ENABLE only. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds a diagnostic-only Tracy GPU zone around the engine SSR raymarch pass (
ISReflectionsRayTracing), so the pass is visible on the Tracy GPU timeline. Split out of #82 (foveated SSR) since it's independent profiling infrastructure, not part of the feature.What it does
Wraps the SSR raymarch DRAW with a
tracy::D3D11ZoneScope, opened on the shader'sPreRender(vfunc0x0A) and closed onPostRender(0x0B).Why these hook points
RenderDoc callstacks proved the effect renders as a pixel-shader DRAW issued by the deferred batch renderer through the non-virtual
BSImagespaceShader::Render— not theImageSpaceManagervtable Render slot and notDispatchComputeShader(both of which were tried first and never fired).Renderbrackets the draw with the per-shaderPreRender/PostRendervfuncs, which CommonLib keeps at stable indices across SE/AE/VR (the VR-onlyFakeDispatchComputeShaderinserts at0x0D, after them), so hooking0x0A/0x0Bon the cross-versionedReflectionsRayTracingvtable wraps exactly the SSR draw on all three runtimes with no per-version addresses.Safety
TRACY_ENABLE-gated — zero impact on shipping builds.PreRenderthunk defensively closes any prior zone ifPostRenderwere ever skipped.Verified live (ALL-TRACY build): zone fires ~525/530 frames, ~88us baseline.
🤖 Generated with Claude Code