Repository navigation
shader: accept GLC and DLC cache flags on direct read-only image ops - #3244
Conversation
|
For |
|
Thanks for the pointer @akimfomin — that matches what our AI-assisted. |
Fixes R0Y00#3242 Refs R0Y00#2935, R0Y00#3224 AI-assisted.
|
Rebased onto Re-verified in
AI-assisted. |
9863d46 to
12a6640
Compare
R0Y00
left a comment
There was a problem hiding this comment.
Independently reviewed 12a6640b. The masking is limited to GLC/DLC on the admitted read-only MIMG operations. Reserved bits, TFE, LWE, R128, stores and the separate atomic route retain their existing checks. The result checks cover synchronized value equivalence on desktop, with guest cache policy outside their scope.
On Windows 11 26200.9974 and RTX 4060 Laptop (32.0.16.1656), using inbox WARP 10.0.26100.9818 and DXC 10.0.26100.0, Debug and Release /O2 each recorded 10 passes and one WARP compute capability skip on integration tree db07621c. Controls covered 48 accepted containers and 16 refusals. RTX compute and pixel, WARP pixel, the runtime atomic, and exact-width store controls passed. The offscreen checks requested the debug layer.
After #3245, Release /O2 on main 0637fced plus this head (tree b6e49bed) passed five tests with one WARP compute capability skip:
ctest --test-dir out/b/release --no-tests=error --output-on-failure -j 1 -R '^(native_image_cache_flags_.*|native_wave64_exec_salu_hardware)$'The hosted Windows build and test check passed.
|
Independently tested What I traced. On gfx10, MIMG word 0 puts DLC at bit 7, GLC at bit 13, R128/A16 at bit 15, TFE at bit 16 and LWE at bit 17. The read-only mask What I ran. I built everything in ctest --test-dir out/build/<preset> --no-tests=error -j 1 -V -R '^native_image_cache_flags_.+$'The
Neighbours in
Negative control and mutants. Each mutant was rebuilt in
Afterwards I restored and rebuilt; Non-blocking. The R128, TFE, LWE and reserved-bit refusals are pinned only on Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088, Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; SDK 10.0.28000.0 DXC (the one CTest picked up); Python 3.12.10; wave32. This reply was AI-assisted. |
Accept MIMG cache-policy flags
GLC(word 0 bit 13,0x2000) andDLC(word 0 bit 7,0x0080) on read-only image operations inDirectCompute::image_io(), addressing #3224 (Rank 8:"direct image opcode or descriptor modifiers") and #2935.Fixes #3242
Refs #2935
Refs #3224
Summary
src/gfx1013_direct_compute.inl:DirectCompute::image_io(), updated the word 0 modifier check from(i.a & 0x3e0c0u)to(i.a & (store ? 0x3e0c0u : 0x3c040u)).image_load,image_load_mip,image_sample*,image_gather4*,image_getlod,image_getresinfo) now ignoreGLC(0x2000) andDLC(0x0080), matchingSLC(0x02000000) cache-policy handling.image_storewithGLC/DLC(0x3e0c0u),LWE(0x20000),TFE(0x10000),R128(0x8000), reserved word 0 bits (0x4040), reserved word 1 bits (0x3c000000u), andimage_atomic_*explicit policy checks inimage_atomic().tests/native_image_cache_flags_check.py&tests/cmake/native_image_cache_flags.cmake:controlsverification across Compute and Pixel stages forimage_load,image_load_mip,image_getresinfo,image_sample_lz,image_gather4_lz, andimage_gather4_lwithGLC,DLC,SLC, andGLC|DLC|SLC(48 compiled DXIL modules matching plainflags=0baselines), plus 16 refusal checks (image_storewithGLC/DLC,R128,TFE,LWE, reserved word 0 bits6/14, reserved word 1 bit26).psandcshardware/WARP readback tests viaoffscreen_checkusingimage_gather4_lwithGLC,DLC, andGLC|DLC|SLC.docs/experiments/native-image-cache-flags.md:Verification
Host: Windows 10.0.26100,
devpreset, DXC10.0.26100.0.cmake --build --preset dev --target compile_dxil offscreen_check native_compute_ir_dump: passed.ctest --preset dev --no-tests=error -R '^(native_image_cache_flags_|native_gather_|native_image_atomic_|native_sample_ssamp_)' -V:native_image_cache_flags_controls: Passed (48flagged DXIL modules matched plain baselines;16refusals matched).native_image_cache_flags_ps_warp: Passed (12cached-flag cases matched on Microsoft Basic Render Driver10.0.26100.9711).native_image_cache_flags_ps_hardware: Passed (12cached-flag cases matched onNVIDIA Quadro M1000M32.0.15.7371;debug_layer=unavailable).native_image_cache_flags_cs_hardware: Passed (12cached-flag cases matched onNVIDIA Quadro M1000M32.0.15.7371;debug_layer=unavailable).native_image_cache_flags_cs_warp: Skipped (77, Microsoft Basic Render Driver lacks SM 6.6 wave32).native_gather_compare_warp,native_gather_lod_*,native_image_atomic_controls/hardware,native_sample_ssamp_hardware) passed (_cs_warp/_warpwave32 tests skipped77; pre-existingnative_image_atomic_runtime_hardwarefails on this dual-GPU host becausestartup_stream_consumeruses adapter 0Intel(R) HD Graphics 530which lacks SM 6.6 wave32).ctest --preset dev --no-tests=error -R '^native_.*_(controls|ir)$' --output-on-failure: 67/67 passed (0skips).native_image_cache_flags_controls:revert_ro_cache_flags((i.a & 0x3e0c0u)): failed (rc=8).drop_r128_refusal((i.a & (store ? 0x3e0c0u : 0x34040u))): failed (rc=8).python -B tests/docs_links_check.py: passed (131Markdown files,631links).AI-assisted.