GPU: exclude 4:2:2 packed formats 68/69 from castable texture formats #1775
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1776"
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?
Imported from Marvisak/VIctory. Originally posted by 0xKaji on 2026-11-24T22:20:53Z.
Summary
castable()incrates/victory-gpu/src/resource.rsgroups formats byelement()size, which included68(DXGI_FORMAT_R8G8_B8G8_UNORM) and69(DXGI_FORMAT_G8R8_G8B8_UNORM) in the 2-byte 1x1 class.However,
68and69are 4:2:2 2x1 subsampled 4-byte block formats, not 1x1 2-byte texels (despiteelement()'s(2, 1)approximation). Per DirectX-Specs (d3d/VulkanOn12.md, Format List Casting), castable formats must match block size and texels-per-block, so they cannot be cast with 16-bit 1x1 formats.Per-host format filtering is left to #2101.
Change
68and69(SUBSAMPLED_422) fromcastable()incrates/victory-gpu/src/resource.rs.castable_formats_share_the_elementto assertcastable(48)excludes68and69.Verification
git diff origin/maincontains only the68/69exclusion andcastable(48)test assertion; GitHub CIcheckwill verify the trimmed commit.Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-24T22:27:01Z.
Review: APPROVED
Verified locally merged onto
origin/main(70564ae, Windows 11 x64, NVIDIA GeForce RTX 5090 + WARP, Rust 1.98.1 MSVC):cargo test -p victory-gpu— all 77 passing tests (includingcastable_host_textures_are_accepted_by_the_host) pass on both RTX 5090 hardware andVICTORY_D3D12_WARP=1(0 new failures; the 2HEAP_VIEWSfailures reproduce identically on untouchedorigin/main70564ae)cargo clippy -p victory-gpu --all-targets— 0 warningscargo xtask policy— okClean exclusion of uncastable formats (
68,69,89) from castable texture format lists with host-verified test coverage. Looks good.AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T23:03:18Z.
Review: COMMENTED
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
Formats 68/69/89 excluded from castable texture lists — hardcoded DXGI format numbers; please add a comment naming them (BC6H/BC7-family?) so the next reader doesn't need the enum table.
Imported from Marvisak/VIctory. Originally posted by DesertGamer on 2026-11-24T22:23:51Z.
VIctory V2: community PRs, merged and tested
Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch.
Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1).
⚠️ Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk.
Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help:
https://DesertGamer/VIctory-V2
Unofficial community fork of Marvisak/VIctory, GPL-3.0.
upstream-sync referenced this pull request2026-11-25 03:03:30 +00:00
call [r9+0x30]at the account-picker → world transition; a second crash overruns a 24-byte-stride table; crash-log appends interleave #2023Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T06:20:41Z.
Automated triage for the maintainers.
Merge candidate. The new commit addresses the earlier ask:
castable()incrates/victory-gpu/src/resource.rsnow returns an empty list when the format itself is 68 or 69 (R8G8_B8G8_UNORM/G8R8_G8B8_UNORM), and keeps excluding them from the 2-byte 1x1 class from the other side. The testcastable_formats_share_the_elementasserts both directions. The diff is limited to this one function and its test, and it merges cleanly withmain.CI: passing (
check).Generated by Claude Code
upstream-sync referenced this pull request2026-11-25 07:03:17 +00:00
upstream-sync referenced this pull request2026-11-25 13:03:01 +00:00
[PR #1776] GPU: exclude uncastable formats (68, 69, 89) from castable texture liststo [PR #1776] GPU: filter castable texture formats per host and exclude 4:2:2 packed 68/69Imported from Marvisak/VIctory. Originally posted by 0xKaji on 2026-11-25T13:20:23Z.
Updated and rebased onto
main(940d32f) to address the triage and review feedback:89:make_texturenow filterscastable_formatsper host withCheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT)(Support1 != D3D12_FORMAT_SUPPORT1_NONE, cached inhost_has), rather than hardcoding89(DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM) out ofcastable(). Hosts that support89(e.g. Windows drivers) keep it; hosts missing it (e.g. vkd3d-proton) drop only the unsupported format.68/69with spec rationale: Kept68(DXGI_FORMAT_R8G8_B8G8_UNORM) and69(DXGI_FORMAT_G8R8_G8B8_UNORM) excluded from the 1x1 2-byte class incastable()with explicit format names and a reference to DirectX-Specs (d3d/VulkanOn12.md, Format List Casting): they are 4:2:2 2x1 subsampled 4-byte block formats, not 1x1 2-byte texels, so they do not match block size and texels-per-block with 16-bit 1x1 formats.cargo xtask policy:asset policy: 182 files okcargo xwin clippy -p victory-gpu --tests --target x86_64-pc-windows-msvc --offline -- -D warnings: 0 warningsresource::tests::castable --test-threads=1on Linux + Wine + NVIDIA RTX 3060): 2 passed, 0 failed (castable_formats_share_the_element,castable_host_textures_are_accepted_by_the_host, assertingtex.castablematches thehost_has-filtered list).[PR #1776] GPU: filter castable texture formats per host and exclude 4:2:2 packed 68/69to [PR #1776] GPU: exclude 4:2:2 packed formats 68/69 from castable texture formatsupstream-sync referenced this pull request2026-11-25 19:06:17 +00:00
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T16:12:43Z.
Review: APPROVED
Reviewed
afa366e7a25e0aca8ba0e8137f2bdec6b122e7db(merged cleanly onto63bcca43c6a00a758510398fa43096ce7e4f7df0) and verified on Windows 11 x64 with an NVIDIA GeForce RTX 5090, WARP, and D3D12 Debug Layer.Audit
crates/victory-gpu/src/resource.rs:1080,:1088,:1089,:1100:element()(resource.rs:120-133): all other YUV/planar/4:2:2 formats (NV12103,P010104,P016105,YUY2107,Y210108,Y216109,NV11110, etc.) already returnNone; formats68(DXGI_FORMAT_R8G8_B8G8_UNORM) and69(DXGI_FORMAT_G8R8_G8B8_UNORM) were the only 2x1 4:2:2 subsampled formats mapped to(2, 1)and leaking into the 16-bit 1x1 castable class.SUBSAMPLED_422 = [68, 69]in both directions (returning an empty list for68/69and filtering them out of other(2, 1)castable lists) cleanly enforces the DirectX Format List Casting requirement that block size and texels-per-block match.Verification
63bcca43c6a00a758510398fa43096ce7e4f7df0+cargo run -p xtask -- policy(191 files ok)cargo clippy -p victory-gpu --all-targets -- -D warnings(default &--all-features)victory-gpuresource::withVICTORY_D3D12_DEBUG=1: 18/18 passed on RTX 5090; 18/18 passed (--features diagnostics) on WARP (includingcastable_formats_share_the_element).CreateCommittedResource3+ID3D12InfoQueueprobe forDXGI_FORMAT_R16_FLOAT(54) on both RTX 5090 and WARP confirmed that hostCheckFeatureSupportalone leaves68/69in the list onmain(cast54_len=13,has_68_69=true,castable(68).len()==13), while with#1776they are stripped in both directions (cast54_len=11,has_68_69=false,castable(68).len()==0,castable(69).len()==0,create_ok=true,0InfoQueue messages).View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.