Reuse the pipeline and resident texture across BC7 mip-tail draws #119
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!119
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/119/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?
@PrivacyOnion on GitHub · 2026-11-21 16:33 UTC · original
PrivacyOnion:bc7-tail-pipeline-reuse→main· +111 −83 · 2 files · 1 commits · merged 2026-11-21 17:55 UTCChange
check_bc7_tailexercises the translated copy shader's implicit LOD clamping across all requested mip viewports (0 .. firstResident + levels.size() - 1) against the same resident SRV range (MostDetailedMip = firstResident,MipLevels = residentCount). Previously, it calleddraw_verifiedonce per requested mip level, recreating the root signature, graphics PSO, constant buffer, descriptor heaps, multi-mip default-heap BC7 texture and staging upload buffer on each iteration.draw_verifiednow builds the root signature, pipeline state, constant buffer, descriptor heaps and resident multi-mip texture once per invocation, uploads the resident mip chain on the first command list, and loops over the requested viewport draws and readbacks.tools/bc7_tiles.pyalso precomputes the 16-entryXandYblock swizzle bit tables used bylinearize_4k_s. Refs #15.Verification
Built and verified at
d355fc3on Windows 11 with VS Build Tools 2022 17.14 (MSVC 19.44.35228.0), Windows SDK10.0.26100.0, Python3.12, on bothNVIDIA GeForce RTX 5070(vendor=10de device=2f04, driver32.0.16.1664,debug_layer=enabled) andMicrosoft Basic Render Driver(WARP,vendor=1414 device=008c, driver10.0.26100.9818,debug_layer=enabled):bcpack_prefix_and_mip_tail: passed (3 tests in 0.022s).pixel_aot_hardware&pixel_aot_warp: passed (pixels=4096 channels=16384 max_absolute_error=0,debug_errors=0 debug_warnings=0, negative channel-swap and constant-buffer mismatch controls rejected).bc7_draw_hardware&bc7_draw_warp: passed all 8 requested mip viewports (requested_mip=0..7,sampled_mip=3..7,max_absolute_error=0,debug_errors=0 debug_warnings=0, and middle-mip corruption rejected).Evidence and follow-up
No new fixture files were added; existing synthetic BC7 Mode 6 and pixel shader fixtures verify identical pixel readback and negative-control rejection before and after the change.
@R0Y00 on GitHub · 2026-11-21 17:16 UTC · original
Please rebase the renderer changes on the merged dual-texture path from #100 and show that its positive and swapped-binding controls still pass alongside the mip-tail corruption control.
@PrivacyOnion on GitHub · 2026-11-21 17:35 UTC · original
Rebased onto
main(retainingsecondRows,secondTexture/secondStaging, the 2-descriptor SRV heap, andcheck_dual_pixelfrom #100) and verified that the positive dual-texture cases (forward,reverse,reuse), the--dual-pixel-swappedbinding control, the swapped-weight control, and the BC7 mip-tail middle-mip corruption control all pass on hardware (RTX 5070) andWARP: