Repository navigation
startup: read block-compressed 0x105 volumes in slot 70 - #2881
Conversation
A Texture3D description in the 4 KiB standard layout with one mip and an uncompressed format is now detiled from its thick blocks (GFX10_SW_4K_S3_PATINFO rows) instead of refused. The XG-size hold counts a volume as one slice, since its footprints already span every depth layer.
A Texture3D description in the 4 KiB standard layout with a mip chain is now detiled instead of refused. Each layer of thick blocks holds that layer of every mip: the shared tail block, then the mips from the smallest to the largest, with the tail mips at the origins addrlib gives them. The mip-count check counts a volume's depth.
A Texture3D description in 0x105 with a BC1 to BC7 format was refused as unsupported_description. addrlib rounds the texel width and height of a block-compressed surface up to whole 4x4 blocks before laying it out and does not divide the depth, so a BC volume takes the thick layout of the volume of its blocks. Layout::thick now sizes the mips, the tail and the blocks from those element sides. startup_gfx10_volume checks two BC volumes against the volumes of their blocks and round-trips seven more; the new bc control sizes them by texels and must fail. The addrlib run compares 501 volumes (13,205,290 addresses, 0 mismatches), and startup_address_console draws three BC1 volume mips. startup_gfx10_layout's two BC-volume refusals now use 0x109, which stays refused.
|
Independent physical-GPU verification at I also ran a local source-built BC7 mode-6 probe through the same slot-70 draw path. It reused the existing Python volume address oracle with the 16-byte S3 row and generated distinct block contents per slice and mip using |
|
This PR is stacked on #2876 (and carries the old #2871 commit, which has since merged as a squash) and no longer merges cleanly with main. Order: #2876 first, then this one. Please merge main into the branch after #2876 lands; expect conflicts in AI-assisted; commands listed were executed locally. |
Main now holds the volume mip chain change as a squashed commit; its files replace the old copies here and only the block-compressed volume change remains.
|
Thanks for this. I reviewed head
Suggestion (not blocking):
Nits: This comment was AI-assisted. |
Depends on #2876 (and through it #2871). Until those merge, this PR's diff includes their commits. Review the last commit only.
A Texture3D description in
0x105with a block-compressed format (BC1 to BC7) was still refused asunsupported_description. This change reads those volumes too, with one mip or a mip chain. The rest of the accepted shape is unchanged. The largest mip must be whole 4x4 blocks across and down, as for 2D BC textures; the depth can be any value.addrlib's rule for a block-compressed surface (
ElemLib::AdjustSurfaceInfofromAddr2ComputeSurfaceInfo):A BC volume therefore takes the thick layout of the volume of its blocks, each block one depth layer deep. As before, the rule is restated in our own code; no addrlib code is included.
Changes:
gfx10_layout.h:supports_volumetakes block-compressed formats.Layout::thicksizes the mips, tail and blocks from the element sides (texel sides rounded up to blocks) instead of the texel sides.Still refused, unchanged: volumes in every other mode, cube views, and layout
0/0x100without a live texture.Tests:
startup_gfx10_volume:startup_gfx10_volume_bc_control(WILL_FAIL): sizes a BC volume's blocks and mips by its texel sides. It fails 4 checks.startup_gfx10_volume_addrlib: passes each BC format to addrlib as itself (ADDR_FMT_BC1toADDR_FMT_BC7) and the coordinates in blocks. It now also compares every mip count of four chains for each of BC1 to BC7: 501 volumes, 13,205,290 element addresses, 0 mismatches (305 volumes before).startup_address_console_{warp,hardware}: also draws three BC1 volume mips: 48x40x12 with one mip, and mips 1 and 3 (the second in the tail) of 64x64x8 with five mips. The Python oracle builds the backing from the 8-byte S3 row. Each block is one solid colour, and all 65,536 pixels of each draw must match.startup_gfx10_layout: two checks asserted that a BC volume in0x105is refused. That is the behaviour this PR changes. They now check a BC volume in0x109, which is still refused.Negative control run once by hand, not registered: sizing the thick layout by texels instead of blocks in
gfx10_layout.hfailsstartup_address_console_warpon the first BC volume.Checks (Windows 11 build 26200, MSVC 14.52, debug layer off; the
_hardwarerun's adapter on this host was Microsoft Basic Render Driver 10.0.26100.9818, so no physical-GPU result is claimed):Only BC1 volumes are drawn. BC2 to BC7 volumes are checked against addrlib and by round trip, not by a draw. The layout is checked against addrlib, not against console memory.
This change was AI-assisted.