mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:00:52 +01:00
[PR #288] [CLOSED] Tests: a refused depth resolve is checked by its Close alone #341
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#341
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/288
Author: @Andretuta
Created: 11/24/2026
Status: ❌ Closed
Base:
main← Head:old-pr/10019📝 Commits (1)
5894b0bTests: a refused depth resolve is checked by its Close alone📊 Changes
2 files changed (+32 additions, -27 deletions)
View changed files
📝
docs/d3d12_vulkan.md(+7 -6)📝
runtime/test/d3d12_depth_resolve_test.cpp(+25 -21)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):Claimed in the coordination issue as: claim (the
d3d12_depth_resolvered on Windows AMD item; the follow-up comment there corrects the first framing — this is the test's model, not the layer)Depends on: none. It conflicts with none of the open PRs;
mainitself does not compile today (see Tested), which the open build-fix PRs handle separately.What and why
d3d12_depth_resolveis red on every device atd083a2cc, not only on AMD, with these 8 lines (theClose 0x80070057is the correct refusal):The refused loop recorded its resolve into the same list as the clears, executed the list even though
Closehad failed, and compared the destination withexpected_planes(c, false). The layer refuses to replay a list whose recording failed (ExecuteCommandLists,d3d12_com.cpp), which is the contractdocs/d3d12_vulkan.mdalready states: "Refused calls failCloseand record nothing". So nothing of that list runs, the destination keeps what it held before, and the readback resource the test reads it through starts zeroed (d3d12_vulkan_device.cpp). The comparison could only pass where the expected stencil was 0: the 4 stencil-less D32 refused cases passed, and all 8 refused cases with a stencil plane failed — AMD, NVIDIA and WARP alike. The host arms were never the problem: every remaining AMD difference is already classifiedhost quirk: the host differs from the clears; the layer matches themand WARP is71 of 71.This checks a refused case by its
Closealone (the host arm still checks that the host refuses too), treats "a mode the device lacks" the same way, drops the now meaninglessrun_invalidparameter ofresolve_and_read, and says indocs/d3d12_vulkan.mdwhy the destination is not compared. That an invalid list's earlier commands do not run is already measured byd3d12_queue_list_type_test("and its earlier CopyBufferRegion did not modify the destination buffer"), so no coverage is lost.Tested
Windows 11, RX 9070 XT (RDNA4, GFX1201), Adrenalin 26.11.2 / Vulkan 1.4.359, MSVC 19.44, RelWithDebInfo, Ninja,
ctest -R 'd3d12_depth_resolve$|d3d12_typeless_depth$|d3d12_msaa_draw$':d3d12_depth_resolved083a2cc(no patch)After:
134 host comparisons matched, 12 calls were refused at Close, 0 modes the device lacks were refused; 20 edge MIN/MAX pairs differ— the same counts as before, so the fix removes only the impossible comparison.d3d12_typeless_depthpasses before and after.d3d12_msaa_drawsegfaults onmainbefore and after this patch for an unrelated reason: the slot-14CreateDescriptorHeapwrapper reads an address/size past the 16-byte PC desc, a normal PC heap then takes the console path andGetCPUDescriptorHandleForHeapStarthands out a stack pointer. Reported as a finding: https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7117047515Note on building:
mainatd083a2ccdoes not compile.create_console_descriptor_heappassesd->state()(aconst DeviceState&) whereDescriptorHeapwantsDeviceState&and callsDevice::identity(), which is private;d3d12_xs_device.cppalso misses thed3d12_com.hinclude that declares it. I built with those two lines worked around locally and neither workaround is in this pull request; the open build-fix PRs (#9873,#9941,#9867,#9978and others) cover them.No game data: the test writes its own resources under
%TEMP%\leonida_depth_resolve_test.AI-assisted: yes (Cline).
Checklist
docs/design.md, with how it was confirmed. — not a translator change.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.