gpu: build again after 5668b8b (Layout::bytes_from from myokex/victory-amd) #64
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/uiliannn--VItoriaBr!64
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-64"
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?
@lcg007xd-c on GitHub · 2026-11-25 21:30 UTC · original
lcg007xd-c:fix/texture-bytes-from→main· +56 −2 · 2 files · 1 commits · openWhat this fixes
mainhas failed the Windows check job since5668b8b("port VICTORY_TEXTURE_HEAPS and VICTORY_STAGING_BLOCKS from myokex/victory-amd"):The ported callers, in
gpu/texture.rs:1766/1771andgpu/resource.rs:3012(placed_bytes_from), useLayout::bytes_from. That method lives invictory-formatsin myokex's commit and was not brought along.The change (from the same commit, myokex/victory-amd
c3723f3, GPL-3.0)Layout::bytes_from(first): the bytes mipfirstand the smaller mips take from the start of the texture, since smaller mips lie nearer the start. It returns the whole layout from mip 0, and whenever the chain repeats per slice: array slices, 3D, thick layouts, MSAA.detile/tile: now accept a tiled buffer ofbytes_from(mip)bytes instead of the whole layout. The new callers pass exactly that much, so without this their uploads of the smaller mips would getTooSmall. Every other case is unchanged, becausebytes_fromreturns the full size there.smaller_mips_need_only_the_start_of_the_texture: for every mip of a 1024² BC1 texture, reading from exactlybytes_from(mip)bytes gives the same pixels as reading from the whole texture, and one byte less isTooSmall. It passes on VItoriaBr's own layout code.gpu/texture.rs:1244:% HASH_EVERY == 0becomes.is_multiple_of(HASH_EVERY). That is the next clippy error (manual_is_multiple_of) once the crate compiles again.Tested (Linux, the pinned Rust 1.98.1, Windows code type-checked for
x86_64-pc-windows-msvc)cargo clippy --workspace --all-targets --locked -- -D warningsand the same with--all-features. Onmainboth fail.-D warningsandcargo test -p victory-formats, 38 passed.Not run here:
cargo test --workspaceon Windows, and the game.🤖 Generated with Claude Code
5668b8b(Layout::bytes_from from myokex/victory-amd c3723f3) cce69f5c50View 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.