mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:25:53 +01:00
[PR #111] Tests: method_variants castable-list cases on a host without relaxed format casting #163
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#163
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/111
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:old-pr/9844📝 Commits (1)
d64326eTests: method_variants castable-list cases on a host without relaxed format casting📊 Changes
1 file changed (+21 additions, -4 deletions)
View changed files
📝
runtime/test/d3d12_method_variants_test.cpp(+21 -4)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):Claimed in the coordination issue as: https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7116713080
Separate from
#5390(host adapter) and#7422(resource heap tier 1), which touch other lines of the same file.What and why
d3d12_method_variantsfails onmain5d74c2723on a laptop with an Intel UHD (Alder Lake, 32.0.101.7092) and an RTX 3060 Laptop (NVIDIA 595.97), with the layer on either GPU. The host is D3D12's default adapter, the Intel:The Intel D3D12 driver reports
RelaxedFormatCastingSupported = 0and refuses every castable-format list. A standalone probe of each adapter's own D3D12 (a 64x64R8G8B8A8_UNORMreserved texture,64KB_UNDEFINED_SWIZZLE,COMMON):RelaxedFormatCasting_SRGB_UINTR32_UINTCreateCommittedResource3),_SRGBThe layer reports the feature (the test checks
RelaxedFormatCastingSupported == TRUE), so on such a host the difference is the host's capability, not a layer bug.d3d12_clearandd3d12_typeless_rtvalready handle the same host limitation.The change is in the test only:
Edgegets acastsflag, set on the 4 edge cases that pass a castable-format list (buffer with a list,UNKNOWNin the list, mismatched texel size, valid_SRGB). "castable count with null list" is no list and stays comparable.OPTIONS12.RelaxedFormatCastingSupportedis 0, those 4 are printed asnot comparable, the host has no relaxed format castingand not compared with the host. They are still checked against their recorded answers, as every case is. Every other case is compared as before.edge cases: N of 73 compared with the host runtime.Tested
Windows 11 Pro 26200, MSVC 14.44, Vulkan SDK 1.4.363, Ninja RelWithDebInfo, on
main5d74c2723.mainfails in both rows with the Intel host; this branch:LEONIDA_VK_DEVICE)The RTX 3060 host rows used Windows' per-app GPU preference (
GpuPreference=2) for the test exe, since this test still creates its host on the default adapter (#5390changes that).Negative controls (a temporary local edit, not in this PR, flipping one layer answer before the host comparison):
CreateReservedResource2, valid castable format on textureCreateCommittedResource3, valid clear value on RTThe remaining gap is that the castable-list answers are only compared with a host that supports relaxed format casting.
ctest -R d3d12_method_variantspasses with the layer on both GPUs, with no new build warnings.git diff --check,test_ctest_registration.py,test_text_encoding.pyandtest_docs_repo_paths.pypass.AI-assisted: yes (Claude Code wrote the change and ran the tests; I checked the results and the diff).
Checklist
docs/design.md, with how it was confirmed. (n/a: no translator change)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.