D3D12.X: a window smaller than the title's image shows jagged text (DWM's single bilinear tap) #554

Open
opened 2026-11-26 04:25:31 +00:00 by github-bot · 0 comments
Owner

@⁠simnJS on GitHub · 2026-11-24 01:43 UTC · original

What happens. A retail title presents 3840x2160. present.rs copies that image into a swap chain of the same size (DXGI_SCALING_STRETCH), and DWM shrinks it to the XCL window (1280x720 by default) with one bilinear tap per window pixel. At 3x (1280x720) or 1.5x (a maximized window on a 1440p screen) that skips texels: thin strokes get uneven widths and edges stair-step, so menu text looks jagged.

Measured. Retail title 1.0.2.1, main 2997c9a, RTX 4080 SUPER, 1280x720 window. A full-size frame dump of a menu (XCL_FRAME_DUMP_FULL=1) has clean text; the same frame shrunk to 1280x720 with a plain bilinear sample shows the jagged text seen in the window, and shrunk with an area filter it is clean. A 1920x1080 window (exactly 2x) also looks clean.

Plan. One PR in hle/d3d12x/present.rs (+ a small present/downscale.rs): when the client area is smaller than the image, the swap chain takes the client size and a full-screen triangle draws the image with an area filter (each texel weighted by the area it covers, in linear light). A window as large as the image keeps today's copy; without DXC the copy stays, with one log line. Tests: the route decision, and a GPU test against a CPU area filter. No letterboxing, HDR or upscaling in it.

I have it working locally and will open it as a draft once the regression runs are done.

**@⁠simnJS** on GitHub · 2026-11-24 01:43 UTC · [original](https://github.com/xcl-dev/xcl/issues/554) **What happens.** A retail title presents 3840x2160. `present.rs` copies that image into a swap chain of the same size (`DXGI_SCALING_STRETCH`), and DWM shrinks it to the XCL window (1280x720 by default) with one bilinear tap per window pixel. At 3x (1280x720) or 1.5x (a maximized window on a 1440p screen) that skips texels: thin strokes get uneven widths and edges stair-step, so menu text looks jagged. **Measured.** Retail title 1.0.2.1, main 2997c9a, RTX 4080 SUPER, 1280x720 window. A full-size frame dump of a menu (`XCL_FRAME_DUMP_FULL=1`) has clean text; the same frame shrunk to 1280x720 with a plain bilinear sample shows the jagged text seen in the window, and shrunk with an area filter it is clean. A 1920x1080 window (exactly 2x) also looks clean. **Plan.** One PR in `hle/d3d12x/present.rs` (+ a small `present/downscale.rs`): when the client area is smaller than the image, the swap chain takes the client size and a full-screen triangle draws the image with an area filter (each texel weighted by the area it covers, in linear light). A window as large as the image keeps today's copy; without DXC the copy stays, with one log line. Tests: the route decision, and a GPU test against a CPU area filter. No letterboxing, HDR or upscaling in it. I have it working locally and will open it as a draft once the regression runs are done.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:25:31 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.