Skip to content

Retail game shows its first menus: depth views, buffers outside unified memory, rect lists - #195

Closed
theaustinayers wants to merge 3 commits into
ivall:mainfrom
theaustinayers:retail-first-screens
Closed

theaustinayers wants to merge 3 commits into
ivall:mainfrom
theaustinayers:retail-first-screens

Conversation

@theaustinayers

@theaustinayers theaustinayers commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

What this does

With these changes the newer retail game from the README table ("the image is still black") shows its first menu screens on an NVIDIA GPU: after about 45 s of black frames the account prompt appears full screen, and the next menus (legal terms) can be stepped through with a gamepad. A 4-minute run through those menus ends without a device removal. Nothing past the menus has been seen.

Tested on one machine only: Ryzen 9 9950X3D, RTX 5090, Windows 11, on top of 956a476. cargo check --release -p xcl passes on this branch; I did not run the test suite (no samples here).

It includes three open PRs

This branch does not work without #163, #170 (Sr-0w) and #168 (ShyVortex), and since the review it also needs #192 (gbuyssens) for XGTextureAddressComputer #10, which is no longer in this diff, so their changes to real.rs / device_x.rs are in the diff as they are. That is their work, not mine. If you merge those first I will rebase and this shrinks to the parts below. If you would rather have this split into smaller PRs, say so.

What is new here

Each item was found with XCL_D3D12_DEBUG=1; the debug-layer message is named where there was one.

Device removals (0x887a0001)

  • CreateDepthStencilView had no hook, so a view in the console's D16S8 format (118) reached the PC as it was (messages 47 / 276). Hooked, format mapped with pc_format.
  • Shader views of depth buffers under the console's names: R32_FLOAT of an R32G8X24 buffer (message 28) and the like. pc_depth_view_format gives the family's name; a stencil view (X24_TYPELESS_G8_UINT, X32_TYPELESS_G8X24_UINT) reads plane 1 (message 29), also in the SRV twin that dev_create_uav_x makes.
  • A UAV of a texture the PC made without ALLOW_UNORDERED_ACCESS (a console depth buffer that is also a UAV) is a null UAV instead of an illegal call (message 340), with plane 0 (message 344). Workaround: compute writes to those buffers are lost until they get a UAV twin.
  • View descriptions (RTV / SRV / UAV / DSV) and clear values get pc_format; 86 / 115 → R8G8B8A8, 116 / 117 → R16G16B16A16_FLOAT.

Device hang (0x887a0006)

  • The title binds index and vertex buffers in its ordinary memory, a private allocation outside the unified-memory windows (IASetIndexBuffer: message 725). pc_va passed the address through and the GPU stopped responding. Now a 64 KiB-aligned range of that memory gets one mirror in unified memory, and each draw copies the part it reads (the index range, and the vertices those indices name) – list_x::gpu_va, mirror_of, sync_title_buffers. The title binds one ring buffer at many offsets, so views inside a mirrored range share the mirror. Limits: mirrors are never freed (capped at 2 GiB); ExecuteIndirect draws are not synced; the copy is made when the draw is recorded, so what the title writes between recording and ExecuteCommandLists is missed; this is a copy, not the real fix (that memory being GPU-visible).

Rect lists

  • A DrawInstanced with topology 17 is expanded on the CPU to two triangles a rectangle (bind::draw_rects). The title's full-screen passes give (−1,1) (−1,−1) (1,−1) with uv (0,0) (0,1) (1,1), so the fourth corner is v0 + v2 − v1. The vertex layout is not looked at: a 4-byte word equal in all three vertices is kept, any other is taken as a float. Limits: indexed rect lists and rectangles a shader makes from the vertex index alone are still one triangle.

Others

  • XGTextureAddressComputer method Olympus: harden GameSave read results #10 answered as GetResourceTiling, derived from the layout model. Not checked against the console's library. (I looked at Retail game: XGTextureAddressComputer subresource layout, DSV format … #169's version of this and kept mine; happy to drop it in favour of that one.)
  • GetGPUVirtualAddress of a committed texture returns a block of plain memory, so the title's memset through it no longer writes to address 0. Workaround: those writes are not uploaded.
  • Debug-layer log keeps 8 messages per id instead of 200 in all, so a late error is not crowded out by early warnings.

Still wrong after this

  • Menu body text is missing most of its letters (headings are fine). One lead, not confirmed: DirectStorage: BCPack mode 7 unsupported refuses one 64 KiB chunk.
  • 7 – 28 fps in the menus on this machine.
  • One later screen was a solid colour (0xff008700) in a frame dump.

Disclosure

Written with AI assistance (Claude Code); I ran every build and test run described above on my own machine and can re-run anything you want checked. A build of this branch plus #151 and some launcher changes, with source, is at https://github.com/theaustinayers/xcl/releases/tag/v0.1.0-mod.6

🤖 Generated with Claude Code

…ed memory, rect lists

Includes open PRs ivall#163, ivall#170 (Sr-0w) and ivall#168 (ShyVortex) as they are; this
does not work without them.

- d3d12x: CreateDepthStencilView hooked; view and clear-value formats mapped;
  shader views of depth buffers get the PC's format names, stencil views plane 1;
  a UAV of a texture without ALLOW_UNORDERED_ACCESS is a null UAV.
- list_x: index / vertex buffers in title memory outside the unified-memory
  windows are mirrored in unified memory, each draw copies what it reads.
- bind: DrawInstanced of a rect list is two triangles a rectangle, the fourth
  corner (v0 + v2 - v1) made on the CPU.
- xg: XGTextureAddressComputer ivall#10 as GetResourceTiling (not checked against
  the console's library).
- GetGPUVirtualAddress of a committed texture gives memory to write through.
- Debug layer log: 8 messages per id.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Kalmarv added a commit to Kalmarv/xcl that referenced this pull request Nov 23, 2026
…ted too

gpu_rect_list_fullscreen_order also draws the other half of the full-screen
rect as a triangle: v0, v2 and the implied corner, what a draw expanded to
two triangles a rect on the CPU sends next (ivall#195). Those are three corners
of the same rect, so the GS completes it to the whole rect as well. A draw
expanded on the CPU must therefore not also get this GS, or each rect is
drawn twice (the same image when opaque, wrong with blending).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Kalmarv

Kalmarv commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Thanks for this, and for writing down the full-screen corner order: it helped. I've been working on rect lists for #189, now open as #199. The approach is different: a translated VS+PS pipeline of topology type 19 gets a generated geometry shader that adds the fourth corner. Since both PRs touch rect lists, here is how they interact.

What the GS path covers that the CPU path doesn't

  • Indexed rect lists, and rects whose vertices a shader makes from the vertex index alone. The GS sees the VS's outputs, not the vertex buffer.
  • Any corner order. The corner shared by the other two is found from the positions. Mesa radeonsi's blits put it at v0, the R600 EXA driver at v1, your full-screen pass at v1.
  • Refusals. Pipelines whose VS has integer outputs, or whose PS reads an attribute flat or is a PC shader, keep today's single triangle and log a note, because which vertex supplies a rect's flat values isn't established. Three vertices with unequal w stay one triangle too.
  • GPU tests, one of them using your order: (−1,1) (−1,−1) (1,−1) with uv (0,0) (0,1) (1,1), at w 1 and 2. Every pixel of a 16×16 target is checked against its uv, and without the GS about half the pixels are drawn.

The hazard if both land as they are

  1. On a pipeline that has the GS, draw_rects sends v0 v1 v2 and then v0 v2 v3. The second triangle is also three corners of the same rect, so the GS completes it to the whole rect as well (there's a test for that on the branch). Each rect is then drawn twice. The picture is the same when it's opaque, but wrong with blending.
  2. pc_stream_types rewrites topology type 19 to 3 before stream_pipeline reads it. Stream pipelines then never get the GS, so their indexed rect lists stay half drawn.

Proposed split

  • The GS stays where a pipeline has it. draw_rects only expands rect-list draws on pipelines without it, the refused cases. I can add a per-pipeline flag for draw_rects to check.
  • Type 19 stays in the stream until translated_graphics_pso. On our branch stream_pipeline keeps it only for console-VS pipelines, and the translated path, the stand-in and the fallback each map it to TRIANGLE with pc_topology_type before the driver builds the pipeline.

Merging our branch onto your head (bf26412) gives no conflicts. On the merge, our four rect tests pass on an RTX 5070 Ti. They test the GS and don't go through draw_rects, so the double draw isn't measured, only shown by the second-triangle test. I'll rebase on whichever of the two lands first and add the check on our side. Does that split work for you?

@Kalmarv

Kalmarv commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

I reviewed the non-rect parts of #195 at bf26412: the IA buffer mirror, the depth views and XG #10. I read the code and added two CPU unit tests on the PR head, kept locally and not pushed; the test code is available if you want it. I did no GPU run and used no game data.

XG #10 (GetResourceTiling): three PRs implement it. #169, #192 and this one all fill slot 10. I ran this PR's version on #192's own fixture and on two more textures:

texture #195 #192
RGBA8 256×256, full chain, 64KB_S (#192's fixture) S_OK, 6 tiles, shape 128×128×1, packed (2, 7, 1, 0), standard tilings (2,2,1, tile 2) and (1,1,1, tile 1), count 4 (two more entries (0,0,0, 0xFFFFFFFF) for packed levels) the same, but count 2 (its reading of the library: packed levels are skipped)
RGBA8 256×256, one level, layout 0, which is 4KB_S S_OK, 64 tiles of 32×32 (4 KiB tiles) E_FAIL (64 KiB modes only)
RGBA8 64×64×64 3D, layout 0, which is 4KB_S thick (block depth 8) S_OK, 256 tiles, shape 8×16×1 E_NOTIMPL (2D only)
  1. 3D tile shape and tile count disagree (xg.rs:539). The shape's depth is always 1, but the block is 8 deep. 256 tiles of 8×16×1 cover 32,768 texels, while the volume has 262,144. This is wrong whatever the console's library does.
  2. It answers S_OK with 4 KiB "tiles" outside the 64 KiB modes (xg.rs:513: a tile is one block of whatever the mode is). D3D12 tiles are 64 KiB.
  3. Packed levels are written and counted (xg.rs:554). That is PC D3D12's form; XGTextureAddressComputer #10 is GetResourceTiling (read from the cons… #192 says the console library skips them.

On these fixtures #195 differs from #192 only in those three places; the 64 KiB 2D numbers match exactly. One of the three implementations should be picked.

IA buffer mirror (list_x.rs)

  1. An instance-stepped buffer drawn with one instance is synced by the vertex range (list_x.rs:1676, 1681; called from bind.rs:306). The test is DrawInstanced(4, 1, 0, StartInstanceLocation 5) with a mirrored per-instance buffer of 16-byte stride. The sync copies bytes 0–64 (vertices 0–3) but not element 5 (bytes 80–96), which is the one the draw reads. first_instance is not passed to sync_title_buffers, and the buffer's stepping is not known there. Copying the whole buffer unless the input layout steps it per vertex would cover this.
  2. Two lists binding the same new range at once get two mirrors, and one is never synced (list_x.rs:1595–1598). mirror_of checks mirrored(), then takes the lock again without checking again. The thread that loses the race pushes a second mirror and binds it. Every later mirrored() finds the first mirror, including that thread's own draw-time sync, so the second mirror keeps the bytes it had when it was made. Checking again under the lock fixes it. This comes from reading the code; no test exercises it.
  3. Copies happen when the draw is recorded; the GPU reads the mirror when the list executes (bind.rs:306, 319). Whatever the title writes after recording a draw and before ExecuteCommandLists(X) is missed. This is not in the PR's list of limits.
  4. Past the 2 GiB cap (list_x.rs:1603), gpu_va goes back to a copy made at bind time in the list's upload memory (1563), and that copy is never synced. That is the build-4 behaviour the mirrors replaced, and nothing says so in the log.
  5. A 16-bit index 0xFFFF is always taken as a strip cut (list_x.rs:1663), for list topologies too. If 65535 is a draw's highest index, that vertex is not synced.

Checked, no finding:

  • mirror_of's 64 KiB rounding and offsets: the alignment of the offset inside the mirror is kept.
  • Mirror lookup: a view inside an existing mirror resolves to the same mirror at bind and at sync.
  • Base vertex handling.
  • pc_depth_view_format's family mapping, and plane 1 for 22 / 47 in the SRV and in the UAV's SRV twin.
  • The null UAV's plane 0 and format fallback.

Not covered: no D3D12 debug-layer run of the depth views, any GPU test or ExecuteIndirect (already listed in the PR).

AI-assisted (Claude Code); synthetic inputs only.

@Kalmarv Kalmarv mentioned this pull request Nov 23, 2026
@idkwtftonamemyself

Copy link
Copy Markdown

its all claude my GUY

@Kalmarv

Kalmarv commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

About the missing body text and the DirectStorage: BCPack mode 7 unsupported lead: two points about what that log line shows, and an experiment you can run.

The log line means more than one chunk. On main, every BCPack refusal goes through warn_once("BCPack", …) (crates/xcl/src/hle/dstorage.rs, Request::check). That key is the same for every mode and every request, so the line is printed once per run: it is the first BCPack request refused, of any mode. Every later BCPack request, BC7 or otherwise, fails silently with E_DECOMPRESSION (0x89240030). The log can't tell one 64 KiB chunk from thousands.

Mode 7 is BC7. BcpackMode is the 4-bit DSTORAGE_BCPACK_MODE in DSTORAGE_REQUEST_OPTIONS. Microsoft's public GDK reference lists 1 BC1, 2 BC2, 3 BC3, 4 BC4, 5 BC5, 6 BC6H, 7 BC7 (DSTORAGE_BCPACK_MODE). So the title asked for BCPack-packed BC7 blocks, and XCL has no BCPack decoder for any mode. If a font atlas is among those textures, it is never written. Its blocks keep whatever the memory held, and zeroed BC7 blocks decode to transparent black, which would look like missing letters. That is a plausible cause, not a confirmed one. Your own list has other candidates: indexed rect lists, shader-made rects, and XGTextureAddressComputer #10.

An experiment to tell them apart: #201 (diagnostics only; the refusals don't change).

  • report.json gets dstorage.bcpack_refused: requests, zlib-combined requests and destination bytes per mode. The log now has one warning per mode and zlib stage, and a running count line.
  • With XCL_DSTORAGE_BCPACK_FILL=1, each refused BCPack destination is filled with solid blocks of its format instead of being left as it was: magenta for BC1/2/3/6H/7, red for BC4/5. The request still fails with the same status.

Run the menus once with XCL_DSTORAGE_BCPACK_FILL=1:

  • If the body text turns into magenta boxes, the missing letters are BCPack.
  • If the text looks the same and no magenta shows up there, the cause is elsewhere.

Either way, bcpack_refused in report.json shows how many chunks and bytes it is about.

AI-assisted (Claude Code). No game data.

puffnfresh added a commit to puffnfresh/rebox that referenced this pull request Nov 23, 2026
… views and null UAVs

After xcl (ivall/xcl#195, #163, #170; GPL-2.0-only):
- a DrawInstanced of a rect list with vertex buffers draws each rectangle as
  two triangles, the fourth corner v0 + v2 - v1 made on the CPU;
- shader views naming a depth buffer's plane by a colour format get the
  desktop's plane formats and plane slice;
- a UAV of a texture without unordered access is a null view, and a depth
  buffer created in the UAV state starts as a depth target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
theaustinayers added a commit to theaustinayers/xcl that referenced this pull request Nov 23, 2026
- mirror_of looks again under the lock: two lists binding one new range at once shared no mirror, and the second was never synced.
- A draw with a first instance other than 0 copies the whole buffer (a per-instance buffer was synced by the vertex range).
- 0xffff / 0xffffffff count as indices (they are cut values only for strips; a wider range only copies more).
- A vertex range past the buffer copies the whole buffer.
- The 2 GiB cap is logged when it is reached.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
theaustinayers and others added 2 commits November 23, 2026 15:39
- mirror_of looks again under the lock: two lists binding one new range at once shared no mirror, and the second was never synced.
- A draw with a first instance other than 0 copies the whole buffer (a per-instance buffer was synced by the vertex range).
- 0xffff / 0xffffffff count as indices (they are cut values only for strips; a wider range only copies more).
- A vertex range past the buffer copies the whole buffer.
- The 2 GiB cap is logged when it is reached.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ivall#192 reads the method from the console library; the version here was derived from the layout model and differs from it for 4 KiB modes, 3D textures and packed levels (review on ivall#195).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@theaustinayers

Copy link
Copy Markdown
Collaborator Author

@Kalmarv thank you, that is a careful read and you are right on the points below. Pushed two commits.

Rect lists. Your split works for me: the GS where a pipeline has it, draw_rects only for the pipelines it refuses. Add the per-pipeline flag on your side and I will check it in draw_rects; if #199 lands first I will rebase and do that here. Until then this PR is the only thing expanding them, so there is no double draw yet.

XG #10. Dropped from this PR in favour of #192, which is read from the library. Your three differences are all cases where mine guessed. The branch now needs #192 as well as #163 / #168 / #170 to reach the menus; I have been running it with #192 since this afternoon (same result in the menus).

Mirrors.

  • 5 (two mirrors from a race): fixed, mirror_of looks again under the lock.
  • 4 (per-instance buffer, one instance, first instance ≠ 0): a draw with a first instance other than 0 now copies the whole buffer. The input layout is still not consulted, so a per-instance buffer drawn from instance 0 with one instance is covered only because element 0 is inside the vertex range.
  • 8 (0xFFFF as a cut value): no longer skipped; a wider range only copies more.
  • 7 (past the 2 GiB cap): now logged once when it is reached. The behaviour is unchanged.
  • 6 (copy at record time, read at execute time): correct, and not fixed. It belongs in the limits list; I have added it to the description.

BCPack. You were right that the line hides the count, and I was wrong to call it one chunk. I added a running count on my fork: on the first screen there is exactly one refused request (mode 7, 51012 → 65536 bytes), but one button press later there are 32 within 70 ms, modes 7 and 5, over 3 MB, and it keeps going. So the menus' textures are largely BCPack and none of it loads. The letters that are missing are the short lowercase ones (a c e m n o r s u) while digits, capitals and tall letters draw, which fits blocks of a height-sorted atlas being absent. I have not run #201's magenta fill yet; I will and report here.

Tested: cargo check --release -p xcl on the branch; the same mirror code on my fork ran the title's menus for 115 s with no device removal (RTX 5090). Not tested: the instance case and the race, which I have no reproduction for.

(AI-assisted, as before.)

Kalmarv added a commit to Kalmarv/xcl that referenced this pull request Nov 23, 2026
For ivall#195, which expands rect lists to two triangles a rect on the CPU: a
draw on a pipeline that has the GS must not be expanded too, since each
half is three corners of the rect and the GS would complete both.
has_rect_list_gs(pso) answers that, for a pipeline as is_translated_graphics
takes it. A pipeline made again without the GS (retry_without_rect_gs) is not
noted, and forget_pso drops the entry with the pipeline's address.

Test (CPU): pipelines_with_the_rect_list_gs_are_known_until_forgotten.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Kalmarv

Kalmarv commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Thanks, the flag is in #199 as fbc855c: real::has_rect_list_gs(pso: usize) -> bool. It's true for a pipeline that was made with the generated rect-list GS. It takes the pipeline the same way is_translated_graphics does, so resolve a background stand-in first with pso_async::resolve_wait, as bind.rs does. A pipeline the driver refused with the GS and that was made again without it isn't flagged, and forget_pso clears the entry. So draw_rects only needs to return false when has_rect_list_gs is true for the bound pipeline. If #195 lands first, I'll add that check in #199 myself.

ivall added a commit that referenced this pull request Nov 23, 2026
…y physical pages, PC view formats

GPU-owned textures placed at title addresses are reserved (tiled) resources on 64 KiB
pages of video memory, one per page of the title's address and shared by every target
there; arenas remain for what the driver will not tile. Straddling placements had made
15 GB of union arenas in two seconds (video memory is charged to the process's commit),
and the device was removed. Physical pages mapped into plain reservations are committed
on first CPU access (a vectored handler; ReadFile, DirectStorage and CPU writes commit
first). Title GPU heaps go to the coherent window when it fits; free sparse pools go.

The device removal at ~14 s was a B5G5R5A1 UAV of a target the PC makes R8G8B8A8: views
get the PC's format for their resource – depth buffers are typeless with R24_UNORM_X8 /
R32_FLOAT views (stencil: plane 1), 116/117 are half floats, B5G5R5A1/B4G4R4A4 targets
R8G8B8A8. XG #10 is GetResourceTiling (checked against the console library), the
D16S8 family is laid out as the console's. Pipelines with the console MS in the AS slot
are refused (translated, the title rendered nothing).

From PR #195, in parts: index/vertex buffers outside unified memory are mirrored, rect
lists are two triangles a rectangle, committed textures get an address on request,
the debug layer logs per message id. XCL_ACTIVITY logs commit and video memory.
ivall added a commit that referenced this pull request Nov 23, 2026
…ormats and views

From PR #195 (fa79d46): a mirror is looked up again under the lock (two lists binding one
new range shared none), a draw with a first instance other than 0 copies the whole
buffer, strip cut values count as indices, a vertex range past the buffer copies all of
it, the 2 GiB cap is logged. A unit test for pc_resource_desc / pc_shader_view_format.
@ivall

ivall commented Nov 23, 2026

Copy link
Copy Markdown
Owner

Closing - taken into main in parts, thanks! On main (38b05b7, eaa36b6) the retail game now reaches its first menu at 30 fps with ~19 GB of commit, checked on an RX 9070; cargo test --workspace is green (548 unit tests). From this PR: index / vertex buffers outside unified memory mirrored and synced per draw, including your review fixes from fa79d46 (eaa36b6); rect lists as two triangles per rectangle on the CPU; GetGPUVirtualAddress memory for committed textures (reserved and committed on the first write instead of committed up front); stand-in streams with null shader pointers; the debug layer logged 8 messages per id. The view-format part was reworked to map views by the resource's PC format. XG #10 and the mesh-stream part are covered on main (see #192, #170).

@ivall ivall closed this Nov 23, 2026
theaustinayers added a commit to theaustinayers/xcl that referenced this pull request Nov 23, 2026
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
theaustinayers added a commit to theaustinayers/xcl that referenced this pull request Nov 23, 2026
…eam main now)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Kalmarv added a commit to Kalmarv/xcl that referenced this pull request Nov 23, 2026
…ted too

gpu_rect_list_fullscreen_order also draws the other half of the full-screen
rect as a triangle: v0, v2 and the implied corner, what a draw expanded to
two triangles a rect on the CPU sends next (ivall#195). Those are three corners
of the same rect, so the GS completes it to the whole rect as well. A draw
expanded on the CPU must therefore not also get this GS, or each rect is
drawn twice (the same image when opaque, wrong with blending).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Kalmarv added a commit to Kalmarv/xcl that referenced this pull request Nov 23, 2026
For ivall#195, which expands rect lists to two triangles a rect on the CPU: a
draw on a pipeline that has the GS must not be expanded too, since each
half is three corners of the rect and the GS would complete both.
has_rect_list_gs(pso) answers that, for a pipeline as is_translated_graphics
takes it. A pipeline made again without the GS (retry_without_rect_gs) is not
noted, and forget_pso drops the entry with the pipeline's address.

Test (CPU): pipelines_with_the_rect_list_gs_are_known_until_forgotten.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Kalmarv added a commit to Kalmarv/xcl that referenced this pull request Nov 23, 2026
Main expands a DrawInstanced of a rect list on the CPU (bind::draw_rects,
from ivall#195): v0 v1 v2, then v0 v2 v3. On a pipeline with the rect list GS
each of those halves is three corners of the rect, so the GS completed
both and every rect was drawn twice (gpu_rect_list_fullscreen_order shows
the second half completed). draw_rects now leaves a pipeline with the GS
alone (cpu_rect_expansion: real::has_rect_list_gs of the resolved
pipeline); it still expands rect lists on the pipelines the GS refuses.

Test (CPU): rect_lists_with_the_rect_list_gs_are_not_expanded_on_the_cpu.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Kalmarv added a commit to Kalmarv/xcl that referenced this pull request Nov 23, 2026
…ted too

gpu_rect_list_fullscreen_order also draws the other half of the full-screen
rect as a triangle: v0, v2 and the implied corner, what a draw expanded to
two triangles a rect on the CPU sends next (ivall#195). Those are three corners
of the same rect, so the GS completes it to the whole rect as well. A draw
expanded on the CPU must therefore not also get this GS, or each rect is
drawn twice (the same image when opaque, wrong with blending).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Kalmarv added a commit to Kalmarv/xcl that referenced this pull request Nov 23, 2026
For ivall#195, which expands rect lists to two triangles a rect on the CPU: a
draw on a pipeline that has the GS must not be expanded too, since each
half is three corners of the rect and the GS would complete both.
has_rect_list_gs(pso) answers that, for a pipeline as is_translated_graphics
takes it. A pipeline made again without the GS (retry_without_rect_gs) is not
noted, and forget_pso drops the entry with the pipeline's address.

Test (CPU): pipelines_with_the_rect_list_gs_are_known_until_forgotten.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Kalmarv added a commit to Kalmarv/xcl that referenced this pull request Nov 23, 2026
Main expands a DrawInstanced of a rect list on the CPU (bind::draw_rects,
from ivall#195): v0 v1 v2, then v0 v2 v3. On a pipeline with the rect list GS
each of those halves is three corners of the rect, so the GS completed
both and every rect was drawn twice (gpu_rect_list_fullscreen_order shows
the second half completed). draw_rects now leaves a pipeline with the GS
alone (cpu_rect_expansion: real::has_rect_list_gs of the resolved
pipeline); it still expands rect lists on the pipelines the GS refuses.

Test (CPU): rect_lists_with_the_rect_list_gs_are_not_expanded_on_the_cpu.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
theaustinayers added a commit to theaustinayers/xcl that referenced this pull request Nov 23, 2026
The fork, rebuilt on current upstream main with only what upstream does not have: the launcher's folder picker, click-to-capture mouse handling with F8 and Page Up / Page Down, a heap per DXC compile thread, the limit on waits for pipelines still being built, the installer, build.ps1, BUILDING.md, the release workflow and the README. Everything else the fork carried is in upstream now (ivall#195 in parts, ivall#211, ivall#244, ivall#252, ivall#283, ivall#289) or was a diagnostic.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.

4 participants