backend: pin the format/vertex-format/blend/root-args value rules with unit tests #480
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS#480
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?
@AnastasisKon on GitHub · 2026-11-27 21:57 UTC · original
What
crates/victory-backend/src/resources.rsandbackend.rsdecide how a console texture description becomes host values:Format::block()(texel or 4x4 block sizes),is_integer/is_depth,TextureDesc::d2defaults,VertexFormat::byte_size,Blend::second_source, andRootArgsappending root constants little-endian and root views padded to an 8-byte boundary before a 64-bit GPU address. None of it has tests, and every one of those rules is a value the GPU host then trusts.What this pins
TextureDesc::d2defaults andVertexFormat::byte_sizefor the formats the title uses;Blend::second_sourcefor the factor/op pairs that read it;RootArgs: constants appended little-endian, an address padded to 8 bytes then appended as a 64-bit little-endian address, and an address on an empty buffer being just the address.Test-only: no behaviour change, no new dependencies.
How it was tested
cargo test -p victory-backend(new unit tests)cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warningscargo xtask policy@AnastasisKon on GitHub · 2026-11-27 21:58 UTC · original
/claim
@github-actions[bot] on GitHub · 2026-11-27 21:58 UTC · original
Claimed by @AnastasisKon. Open a draft pull request with
Refs #476in its description within 24 hours, or the claim expires.@AnastasisKon on GitHub · 2026-11-28 12:44 UTC · original
/release - done without a PR: on branch
vibe/backend-value-rules-tests-4f9c68, in my fork'smain. The format, vertex-format, blend and root-arg value rules are pinned byformat_block_is_one_texel_or_a_4x4_block,format_integer_and_depth_flags,default_color_state_blends_nothing_and_writes_everythingandblend_second_source_reads_only_the_src1_factors.@github-actions[bot] on GitHub · 2026-11-28 12:44 UTC · original
Released. This issue is free to claim.