texture: refuse extents past 16384 texels instead of overflowing #15
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!15
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/15/head"
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?
@9hvn9yt2vk-netizen on GitHub · 2026-11-23 23:02 UTC · original
9hvn9yt2vk-netizen:fix-texture-extents→main· +31 −3 · 1 files · 1 commits · merged 2026-11-23 23:28 UTCLayout::new checked that width, height and depth are non-zero but not that they are bounded, so values a title passes unchecked (up to u32::MAX) overflowed the size arithmetic:
offset * depthin the linear layout,slice_size * slicesand the per-mip sizes in the tiled one, and a u32 next_multiple_of in Layout::tiled. Debug builds panicked; release builds wrapped silently and returned a wrong size.Refuse anything past 16384 texels per side, the most a GFX10 image descriptor holds, so no texture the GPU can use is affected.
Found with a random-input harness (four distinct overflow sites, none left after this change).
@9hvn9yt2vk-netizen on GitHub · 2026-11-23 23:03 UTC · original
loooook at thisssssss