Repository navigation
fix(shader_recompiler): pack format 11_11_10 float image stores in shader - #8898
camezaro-intc wants to merge 2 commits into
Conversation
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Runs of this head ( The edge rows on hardware. The seven RX 6700 XT (Windows 11 26200, MinGW Release,
lavapipe (WSL Ubuntu 24.04, Mesa 25.2.8 with LLVM 20.1.2 as in the Linux CI, GCC 13.3 Release with SPIRV-Tools on),
Two notes:
|
|
Tested on Linux / RADV (SteamOS 3.8.28, AMD Radeon RX 570 / Polaris10, Mesa 26.2.5, GCC 16.2.1, Release), this PR (5236bb6) merged onto
One issue from reading the diff: AI-assisted: yes. |
|
Thanks @thuanquang and @ryanc2112 for the thorough review, measurements, and tests across real hardware and lavapipe!
All validation tests pass 100% with 0 |
|
RTX 4090 (Ada) on Windows, head
NVIDIA GeForce RTX 4090, driver 617.42, Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7, Release, AI-assisted: yes (Claude Code) |
a42450b to
8d5f750
Compare
|
@camezaro-intc one integration issue is still there after the rebase: |
8d5f750 to
68fc51f
Compare
|
@oneandonlydean Thanks for catching that integration issue. I've composed the fix into the packing change: colorCompareReference() in core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp now explicitly includes IrBufferFormat::Format11_11_10Float (format 36) alongside IrTextureNumericClass::Float, preserving the emulated comparison path (EmulatedCompare::ReferenceZero) while maintaining the Uint repacking path for storage stores. I ran the requested test suite with Vulkan validation layers enabled (ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation):
The branch has been updated and force-pushed. Could you please revalidate on your side whenever convenient? |
What
Packs storage image stores into guest format 36 (
Format11_11_10Float) in-shader viaFormat32UIntviews rather than relying on Vulkan'sVK_FORMAT_B10G11R11_UFLOAT_PACK32write path. Real RDNA 2 hardware rounds toward zero and saturates finite values exceeding maximum representable range to 65024.0 (11-bit) and 64512.0 (10-bit), whereas host Vulkan drivers round to nearest-even and overflow to infinity.Routes DCC fast clears for formats 36 and 43 through
VK_FORMAT_B10G11R11_UFLOAT_PACK32viaDccClearTextureFormatso fast clears produce valid 3-channel packed float layouts rather than single-channelR32_UINT.Tested
ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation:ctest --test-dir build -R "agc_driver_image_converted_unorm|agc_driver_image_repacked_float|texture_format_lookup|agc_driver$" -Vpassed 100% with zero validation errors.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)