Repository navigation
GPU tests for untested MIMG ops: image_atomic_*, image_get_lod, image_get_resinfo, image_bvh_intersect_ray (TEST-184) - #1402
Conversation
|
Independent ps_get_lod readbacks on 27e595c, Windows RTX 5080 (616.92) and Radeon gfx1036 (32.0.21045.16010). The registered runner returned (1,3,-1,2) at every one of 4096 pixels on both. I varied the sampler and shader independently: setting maxLOD=0 changed only R, to (0,3,-1,2); reducing the horizontal footprint from eight texels/pixel to half a texel while keeping vertical at eight retained (1,3,-1,2); reducing both axes to half a texel gave (0,-1,-1,2). Changing just the single-component query destined for B from mask 0x2 to 0x1 gave (1,3,0,2). All 4096 RGBA values per variant matched their expected tuples on both devices. |
|
Tested
This adds independent NVIDIA coverage for the ten image atomics (2D and 3D), |
27e595c to
b8aa321
Compare
|
Thanks @Vonsek and @mokkymiah for the independent verification on RTX 5080, Radeon gfx1036, and RTX 3070! Rebased cleanly onto main (bb2e184), preserving the new load-d16 mode in vk_store_test/check.py/run_gpu_tests.py; re-verified 143/143 passing on RX 6800 (RADV, Linux) plus test_mimg_ops / test_shader_checks / test_run_gpu_tests. |
…_get_resinfo, image_bvh_intersect_ray (TEST-184)
b8aa321 to
90e1f5e
Compare
|
Closing as superseded by #1419 (05eb9ca), which landed TEST-184 MIMG GPU tests on main. Thanks @Vonsek and @mokkymiah for the independent verification! |
Summary
Adds GPU test coverage for the 13 MIMG opcodes previously handled by
tools/rdna2spirv.pywithout GPU tests (TEST-184, from @Vonsek's inventory in #1218):runtime/test/shaders/cs_imgatomic.asm+vk_store_test ... atomic: exercises all 10image_atomic_*opcodes (add,sub,and,or,xor,smin,smax,umin,umax,cmpswap) on both 2D (%simages, binding 4, 8x8R32_UINT) and 3D (%simages3d, binding 7, 4x4x4R32_UINT) storage images. Checks:min/maxboundary cases (-5vs5,0x80000000vs0x7FFFFFFF),suboperand direction and wraparound, andcmpswaphit (vdata[0]=src,vdata[1]=cmp) and miss.glcpre-op return value intovdata[0](and preservation ofvdata[1]oncmpswap) as well as non-glcpreservation ofvdata[0].EXECmasked) protection of memory canaries (includingINT_MAX,INT_MIN,UINT_MAX, and matching-cmpcmpswap) andglcvdataregisters.VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BITandmaxPushConstantsSize >= 144(exiting 77 if unsupported); requires neither storage-image without-format feature.runtime/test/shaders/ps_get_lod.asm: testsimage_get_lodonvk_texture_test --two-mip(S#minLod=0, maxLod=1) for bothSQ_RSRC_IMG_2D(clamped1.0, unclamped3.0viadmask:0x3; negative unclamped-1.0viadmask:0x2and clamped0.0viadmask:0x1) andSQ_RSRC_IMG_2D_ARRAY(clamped0.0, unclamped2.0).runtime/test/shaders/ps_get_resinfo.asm+vk_texture_test --rect-mip: binds a non-square 16x8 2D texture with 3 mip levels (16x8,8x4,4x2) so width, height, depth (1) and mip count (3) are all distinct, and testsimage_get_resinfoacross mips 0, 1 and 2 with full (0xf) and sparse (0x9,0x6)dmaskcompaction.runtime/test/shaders/cs_bvh32.asm: tests 32-bitimage_bvh_intersect_ray(11-VGPR address layout with non-zerotmaxinv2wherenode_hiwould sit in 64-bit, plus both zero and non-zero descriptor bases4 = 1) againstvk_compute_test ... 1 bvh.runtime/test/shaders/check.pyandscripts/run_gpu_tests.py(includingDRAWN_WITHfor--filterruns and exit-77SKIPhandling).tests/test_mimg_ops.py(stdlib-only SPIR-V translation, optionalspirv-val, and checker/routing tests) and updatedtests/test_shader_checks.py.All fixtures are hand-written RDNA2 assembly using synthetic data only (no game files).
Testing
GPU / Driver / OS: AMD Radeon RX 6800 (
RADV NAVI21, Mesa 26.2.6-arch3.1, Vulkan 1.4.354) on Arch Linux.python3 -I scripts/run_gpu_tests.py --build runtime/build/linux: 137/137 passed (includingcs_bvh32,cs_imgatomic,ps_get_lod,ps_get_resinfo).LEONIDA_W64_EMULATE=1 python3 -I scripts/run_gpu_tests.py --build runtime/build/linux: 137/137 passed.python3 -I runtime/test/shaders/build.py <tmp>+python3 -I runtime/test/shaders/check.py <tmp> runtime/build/linux: 125 of 128 pass, 3 skipped (mesh fixtures).cs_bvh32,cs_imgatomic,ps_get_lod,ps_get_resinfo) individually underVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation(libVkLayer_khronos_validation.soconfirmed loaded viaVK_LOADER_DEBUG=layer): 0 validation errors or warnings.RADV_DEBUG=shaders) forps_get_lodandcs_imgatomic.ctest --test-dir runtime/build/linux --output-on-failure: 21/21 passed.g++ -std=c++20 -fsyntax-only -Wall -Wextra -Wno-missing-field-initializers -Wpedanticonvk_store_test.cppandvk_texture_test.cpp: 0 warnings.python3 -I tests/test_mimg_ops.py,tests/test_shader_checks.py,tests/test_run_gpu_tests.py,tests/test_gpu_build_dir.py,tests/test_resource_hygiene.py,tests/test_ctest_registration.py,tests/test_run_gpu_pixel_checks.py,tests/test_run_gpu_tests_paths.py, full stdlib test loop,tests/semantic(1,171 tests), andnode --test tests/test_viewer_streaming.cjs(30 tests): all passed.AI Disclosure
This PR was developed with AI assistance; all fixtures, harness code, SPIR-V output, and test results were verified locally on the RX 6800 GPU listed above.