docs(renderer): the blue-noise tile costs 8 KiB per pass, not 32 KB - #905
Conversation
CodeRabbit finding on #889 (already merged). The comment above GetTileRG put each pass's copy of the tile at "32 KB of VRAM apiece", which is 4x the real figure. kTileSize * kTileSize * kChannels = 64 * 64 * 2 = 8192 bytes, and CreateBlueNoiseTexture asks for RG8UNorm through CreateTexture2DHandle, whose storage is immutable and SINGLE-MIP on both backends — so there is no chain to round the number up either. Two passes hold one today (SSR and SSGI), so the duplication this paragraph is justifying costs 16 KiB in total. Comment only: ownership, upload behaviour and the POD-static rationale are untouched. The number is worth getting right because the paragraph exists specifically to argue that per-pass duplication is cheap enough to prefer over a shared GPU-owning static, and a 4x-inflated cost is an argument against the thing it concludes. Not built: a change to comment text inside an existing block cannot alter compilation. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 46 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
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 |
CodeRabbit finding on #889, which had already merged by the time it was picked up
— so it lands here rather than as a fixup on that PR.
The claim
The paragraph above
BlueNoise::GetTileRG()put each pass's copy of the tile at"32 KB of VRAM apiece". The real figure is 8 KiB, 4x smaller:
kTileSize * kTileSize * kChannels=64 * 64 * 2= 8192 bytes;CreateBlueNoiseTextureasks forRG8UNormviaCreateTexture2DHandle, whosestorage is immutable and single-mip on both backends — so there is no chain
to round it up either.
Two passes hold one today (
SSRRenderPass,SSGIRenderPass), so the duplicationthat paragraph is justifying costs 16 KiB in total, not 64 KB.
Why bother with a comment
That paragraph is not decoration — it exists to argue that per-pass duplication is
cheap enough to prefer over a shared GPU-owning static, which is the
lazy-static-release-ownership.mdshape it explicitly cites. A 4x-inflated cost isan argument against the design the paragraph concludes with, so the next person
weighing "should this be shared?" would be reading evidence pointing the wrong way.
Comment only — ownership, upload behaviour and the POD-static rationale are
untouched.
Verification
Not built. The change is comment text inside an existing block and cannot alter
compilation; the pre-commit hook (clang-format included) passed.