Skip to content

test: live-GPU regression pin for the deferred RT override (#121)#123

Merged
proggeramlug merged 1 commit into
mainfrom
test/rt-override-regression
Jul 17, 2026
Merged

test: live-GPU regression pin for the deferred RT override (#121)#123
proggeramlug merged 1 commit into
mainfrom
test/rt-override-regression

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Headless deferred frame + readback: without #121's branch the frame cannot render at all (no surface to acquire), so the old behavior fails this test by construction. RTs gain COPY_SRC for readback. 3/3 render_targets tests pass on real GPU.

https://claude.ai/code/session_01PmL9WgNMkAgvpYSHEZga8K

Summary by CodeRabbit

  • Bug Fixes

    • Fixed offscreen render targets so deferred frames correctly honor configured render-target overrides.
    • Enabled reading rendered results from offscreen textures for copy and validation operations.
  • Tests

    • Added regression coverage to verify rendered output is written to the selected target and preserves the expected clear color.

…e-GPU regression test

deferred_frame_writes_render_target_override arms the override the way
bloom_begin_texture_mode does, runs a full deferred frame HEADLESS (no
surface — so without the #121 branch the frame cannot render at all,
which is exactly the pre-fix behavior), reads the texture back, and
requires the magenta clear to have arrived. Channel-order and tonemap
tolerant; skips cleanly on machines with no GPU adapter.

create_render_texture gains COPY_SRC so render-target contents are
readable (tests, screenshots of offscreen renders).

Claude-Session: https://claude.ai/code/session_01PmL9WgNMkAgvpYSHEZga8K
@proggeramlug
proggeramlug merged commit 9ab4116 into main Jul 17, 2026
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0bb5761b-1e97-4836-af06-2059da0a2dab

📥 Commits

Reviewing files that changed from the base of the PR and between 90bda58 and d9f1fa1.

📒 Files selected for processing (2)
  • native/shared/src/renderer/texture_store.rs
  • native/shared/tests/render_targets.rs

📝 Walkthrough

Walkthrough

The renderer now creates render textures with COPY_SRC usage. A regression test exercises the deferred frame path with overridden offscreen color and depth targets, reads back the rendered texture, and verifies the center pixel.

Changes

Render target readback

Layer / File(s) Summary
Enable render-texture copy sources
native/shared/src/renderer/texture_store.rs
Render textures now include COPY_SRC alongside RENDER_ATTACHMENT and TEXTURE_BINDING.
Cover deferred render-target overrides
native/shared/tests/render_targets.rs
Adds imports and a regression test that configures overridden targets, runs end_frame_with_scene, reads back the texture, and checks the center pixel.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Test
  participant Renderer
  participant OffscreenTexture
  Test->>Renderer: Configure color/depth render-target overrides
  Test->>Renderer: Call end_frame_with_scene
  Renderer->>OffscreenTexture: Write deferred frame output
  Test->>OffscreenTexture: Copy texture contents
  Test->>Test: Assert center pixel is magenta-ish
Loading

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/rt-override-regression

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant