diff options
| author | Tomgamer <tomanhorak22@gmail.com> | 2026-11-22 16:32:05 +0100 |
|---|---|---|
| committer | Tomgamer <tomanhorak22@gmail.com> | 2026-11-22 16:32:05 +0100 |
| commit | eb35aed2e7e8ea1d4a11fd4e42ab80d853f05169 (patch) | |
| tree | 22bd0e6fa6363235d1feedc1c9be678ab63bee4b /runtime | |
| parent | 759a90c42e58886153f67dcd2d5d41c44face012 (diff) | |
| parent | 4eb6155d3ac4f9d3fadb0d095c4ce13e76783615 (diff) | |
Merge origin/main into shader-309-wave64-lds-limit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime')
86 files changed, 12552 insertions, 3909 deletions
diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index 6f135558a..01e188e47 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt | |||
| @@ -394,10 +394,20 @@ if(BUILD_TESTING) | |||
| 394 | set_target_properties(tiny_game PROPERTIES | 394 | set_target_properties(tiny_game PROPERTIES |
| 395 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/fixtures/game/$<CONFIG>" | 395 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/fixtures/game/$<CONFIG>" |
| 396 | ) | 396 | ) |
| 397 | # The same game with no .reloc, at the default EXE base, as RT-22 asks about the real one: it can only run at | ||
| 398 | # 0x140000000, which arm64 Wine on macOS uses for itself (src/base_reservation.h). | ||
| 399 | add_executable(tiny_game_fixed test/fixtures/tiny_game.cpp) | ||
| 400 | target_link_libraries(tiny_game_fixed PRIVATE xgameruntime_stub) | ||
| 401 | target_compile_definitions(tiny_game_fixed PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX _CRT_SECURE_NO_WARNINGS) | ||
| 402 | target_compile_options(tiny_game_fixed PRIVATE /W4 /permissive- /utf-8 /EHsc) | ||
| 403 | target_link_options(tiny_game_fixed PRIVATE /FIXED /DYNAMICBASE:NO /BASE:0x140000000) | ||
| 404 | set_target_properties(tiny_game_fixed PROPERTIES | ||
| 405 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/fixtures/game/$<CONFIG>" | ||
| 406 | ) | ||
| 397 | add_executable(tiny_game_exit_code_test test/tiny_game_exit_code_test.cpp) | 407 | add_executable(tiny_game_exit_code_test test/tiny_game_exit_code_test.cpp) |
| 398 | target_compile_definitions(tiny_game_exit_code_test PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX) | 408 | target_compile_definitions(tiny_game_exit_code_test PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX) |
| 399 | target_compile_options(tiny_game_exit_code_test PRIVATE /W4 /permissive- /utf-8) | 409 | target_compile_options(tiny_game_exit_code_test PRIVATE /W4 /permissive- /utf-8) |
| 400 | add_dependencies(tiny_game_exit_code_test gta6rt tiny_game) | 410 | add_dependencies(tiny_game_exit_code_test gta6rt tiny_game tiny_game_fixed) |
| 401 | add_test(NAME pe_loader COMMAND pe_loader_test "$<TARGET_FILE:tiny_dll>" "$<TARGET_FILE:tiny_exe>") | 411 | add_test(NAME pe_loader COMMAND pe_loader_test "$<TARGET_FILE:tiny_dll>" "$<TARGET_FILE:tiny_exe>") |
| 402 | 412 | ||
| 403 | # Synthetic, hand-built images through Loader::load: range checks, wrapping RVAs, import-table termination and | 413 | # Synthetic, hand-built images through Loader::load: range checks, wrapping RVAs, import-table termination and |
| @@ -499,6 +509,11 @@ if(BUILD_TESTING) | |||
| 499 | add_test(NAME descriptor_table COMMAND descriptor_table_test) | 509 | add_test(NAME descriptor_table COMMAND descriptor_table_test) |
| 500 | add_executable(shader_library_test test/shader_library_test.cpp) | 510 | add_executable(shader_library_test test/shader_library_test.cpp) |
| 501 | add_test(NAME shader_library COMMAND shader_library_test) | 511 | add_test(NAME shader_library COMMAND shader_library_test) |
| 512 | # Optional: skips unless LEONIDA_SHADERS names a translated work folder (<work>/shaders/spirv). | ||
| 513 | add_executable(shader_library_corpus_test test/shader_library_corpus_test.cpp) | ||
| 514 | add_test(NAME shader_library_corpus COMMAND shader_library_corpus_test) | ||
| 515 | # Reads all 26,503 containers and modules: about 9 minutes from a hard disk. | ||
| 516 | set_tests_properties(shader_library_corpus PROPERTIES SKIP_RETURN_CODE 77 TIMEOUT 3600) | ||
| 502 | if(WIN32) | 517 | if(WIN32) |
| 503 | # Optional: skips unless LEONIDA_GAME_DIR and LEONIDA_MOVIE are set. | 518 | # Optional: skips unless LEONIDA_GAME_DIR and LEONIDA_MOVIE are set. |
| 504 | add_executable(bink_decode_test | 519 | add_executable(bink_decode_test |
| @@ -595,6 +610,11 @@ if(BUILD_TESTING) | |||
| 595 | add_test(NAME run_tiny_game COMMAND gta6rt --run $<TARGET_FILE:tiny_game> -- hello 42) | 610 | add_test(NAME run_tiny_game COMMAND gta6rt --run $<TARGET_FILE:tiny_game> -- hello 42) |
| 596 | add_test(NAME run_tiny_game_exit_code COMMAND tiny_game_exit_code_test | 611 | add_test(NAME run_tiny_game_exit_code COMMAND tiny_game_exit_code_test |
| 597 | "$<TARGET_FILE:gta6rt>" "$<TARGET_FILE:tiny_game>") | 612 | "$<TARGET_FILE:gta6rt>" "$<TARGET_FILE:tiny_game>") |
| 613 | # Without relocations it can only run at 0x140000000 (base_reservation.h), so passing means it got there; the | ||
| 614 | # game's exact exit code comes back through the relaunch. | ||
| 615 | add_test(NAME run_tiny_game_fixed COMMAND gta6rt --run $<TARGET_FILE:tiny_game_fixed> -- hello 42) | ||
| 616 | add_test(NAME run_tiny_game_fixed_exit_code COMMAND tiny_game_exit_code_test | ||
| 617 | "$<TARGET_FILE:gta6rt>" "$<TARGET_FILE:tiny_game_fixed>") | ||
| 598 | # Two modes at once are refused before anything is mapped (#886). The stand-in game's own arguments are passed, | 618 | # Two modes at once are refused before anything is mapped (#886). The stand-in game's own arguments are passed, |
| 599 | # so a gta6rt that ignored the conflict would run it, print "running" and exit 0. | 619 | # so a gta6rt that ignored the conflict would run it, print "running" and exit 0. |
| 600 | foreach(modes "dry-run;run" "dry-run;init" "init;run") | 620 | foreach(modes "dry-run;run" "dry-run;init" "init;run") |
| @@ -677,6 +697,11 @@ if(TARGET Vulkan::Headers) | |||
| 677 | endif() | 697 | endif() |
| 678 | endforeach() | 698 | endforeach() |
| 679 | if(BUILD_TESTING) | 699 | if(BUILD_TESTING) |
| 700 | add_test(NAME vk_pipeline_check_cli COMMAND "${CMAKE_COMMAND}" | ||
| 701 | "-DTOOL=$<TARGET_FILE:vk_pipeline_check>" | ||
| 702 | "-DTEST_DIR=${CMAKE_CURRENT_BINARY_DIR}/vk_pipeline_check_cli_input" | ||
| 703 | "-DRUNNER=${CMAKE_CROSSCOMPILING_EMULATOR}" | ||
| 704 | -P "${CMAKE_CURRENT_SOURCE_DIR}/test/check_vk_pipeline_cli.cmake") | ||
| 680 | add_test(NAME depth24_convert COMMAND depth24_convert_test) | 705 | add_test(NAME depth24_convert COMMAND depth24_convert_test) |
| 681 | set_tests_properties(depth24_convert PROPERTIES SKIP_RETURN_CODE 77) | 706 | set_tests_properties(depth24_convert PROPERTIES SKIP_RETURN_CODE 77) |
| 682 | # The XDXR BVH builder: the GPU writes every case, then tools/xdxr_bvh.py validates and traces them. | 707 | # The XDXR BVH builder: the GPU writes every case, then tools/xdxr_bvh.py validates and traces them. |
| @@ -753,6 +778,19 @@ if(TARGET Vulkan::Headers) | |||
| 753 | if(BUILD_TESTING) | 778 | if(BUILD_TESTING) |
| 754 | add_test(NAME vk_device_pick COMMAND vk_device_pick_test) | 779 | add_test(NAME vk_device_pick COMMAND vk_device_pick_test) |
| 755 | endif() | 780 | endif() |
| 781 | # Committed BC* texture zero-initialization via vk.zero_buffer or vk.copy_scratch (D3D-220). | ||
| 782 | add_executable(vk_bc_zero_init_test test/vk_bc_zero_init_test.cpp) | ||
| 783 | target_link_libraries(vk_bc_zero_init_test PRIVATE Vulkan::Headers ${CMAKE_DL_LIBS}) | ||
| 784 | if(WIN32) | ||
| 785 | target_compile_definitions(vk_bc_zero_init_test PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX) | ||
| 786 | endif() | ||
| 787 | if(MSVC) | ||
| 788 | target_compile_options(vk_bc_zero_init_test PRIVATE /W4 /permissive- /utf-8) | ||
| 789 | endif() | ||
| 790 | if(BUILD_TESTING) | ||
| 791 | add_test(NAME vk_bc_zero_init COMMAND vk_bc_zero_init_test) | ||
| 792 | set_tests_properties(vk_bc_zero_init PROPERTIES SKIP_RETURN_CODE 77) | ||
| 793 | endif() | ||
| 756 | # CPU-only: the bindless set's array sizes from synthetic device limits. | 794 | # CPU-only: the bindless set's array sizes from synthetic device limits. |
| 757 | add_executable(bindless_sizing_test test/bindless_sizing_test.cpp) | 795 | add_executable(bindless_sizing_test test/bindless_sizing_test.cpp) |
| 758 | target_link_libraries(bindless_sizing_test PRIVATE Vulkan::Headers) | 796 | target_link_libraries(bindless_sizing_test PRIVATE Vulkan::Headers) |
| @@ -819,7 +857,7 @@ if(TARGET Vulkan::Headers) | |||
| 819 | ${_stubs_header} | 857 | ${_stubs_header} |
| 820 | ID3D12GraphicsCommandList8 ID3D12CommandQueue ID3D12CommandAllocator ID3D12Fence1 | 858 | ID3D12GraphicsCommandList8 ID3D12CommandQueue ID3D12CommandAllocator ID3D12Fence1 |
| 821 | ID3D12Device11 ID3D12DescriptorHeap ID3D12Heap ID3D12Resource ID3D12QueryHeap ID3D12RootSignature | 859 | ID3D12Device11 ID3D12DescriptorHeap ID3D12Heap ID3D12Resource ID3D12QueryHeap ID3D12RootSignature |
| 822 | ID3D12PipelineState ID3D12CommandSignature | 860 | ID3D12PipelineState ID3D12CommandSignature ID3D12PipelineLibrary1 |
| 823 | DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../tools/gen_d3d12_stubs.py ${LEONIDA_D3D12_HEADER} | 861 | DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../tools/gen_d3d12_stubs.py ${LEONIDA_D3D12_HEADER} |
| 824 | COMMENT "Generating D3D12 COM stubs" | 862 | COMMENT "Generating D3D12 COM stubs" |
| 825 | VERBATIM) | 863 | VERBATIM) |
| @@ -961,6 +999,14 @@ if(TARGET Vulkan::Headers) | |||
| 961 | target_compile_options(queue_proxy_test PRIVATE /W4 /permissive- /utf-8) | 999 | target_compile_options(queue_proxy_test PRIVATE /W4 /permissive- /utf-8) |
| 962 | add_test(NAME queue_proxy COMMAND queue_proxy_test) | 1000 | add_test(NAME queue_proxy COMMAND queue_proxy_test) |
| 963 | set_tests_properties(queue_proxy PROPERTIES SKIP_RETURN_CODE 77) | 1001 | set_tests_properties(queue_proxy PROPERTIES SKIP_RETURN_CODE 77) |
| 1002 | # Xbox-ABI command allocator proxies (device slot 9) on the Vulkan device, and the unwrapped PC allocator on the | ||
| 1003 | # host runtime: forwarding, refused tail, guard region, lists and GPU copies on the proxy. 77: no device at all. | ||
| 1004 | add_executable(allocator_proxy_test test/allocator_proxy_test.cpp) | ||
| 1005 | target_link_libraries(allocator_proxy_test PRIVATE gta6rt_d3d12_com d3d12 dxgi) | ||
| 1006 | target_compile_definitions(allocator_proxy_test PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX) | ||
| 1007 | target_compile_options(allocator_proxy_test PRIVATE /W4 /permissive- /utf-8) | ||
| 1008 | add_test(NAME allocator_proxy COMMAND allocator_proxy_test) | ||
| 1009 | set_tests_properties(allocator_proxy PROPERTIES SKIP_RETURN_CODE 77) | ||
| 964 | # The countdown behind those event-backed waits, with no GPU: the full unsigned count, no wrap past zero. | 1010 | # The countdown behind those event-backed waits, with no GPU: the full unsigned count, no wrap past zero. |
| 965 | add_executable(d3d12_fence_waiter_test test/d3d12_fence_waiter_test.cpp) | 1011 | add_executable(d3d12_fence_waiter_test test/d3d12_fence_waiter_test.cpp) |
| 966 | target_compile_definitions(d3d12_fence_waiter_test PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX) | 1012 | target_compile_definitions(d3d12_fence_waiter_test PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX) |
| @@ -1176,8 +1222,65 @@ if(TARGET Vulkan::Headers) | |||
| 1176 | target_compile_options(d3d12_m3_frame_test PRIVATE /W4 /permissive- /utf-8) | 1222 | target_compile_options(d3d12_m3_frame_test PRIVATE /W4 /permissive- /utf-8) |
| 1177 | add_test(NAME d3d12_m3_frame COMMAND d3d12_m3_frame_test) | 1223 | add_test(NAME d3d12_m3_frame COMMAND d3d12_m3_frame_test) |
| 1178 | set_tests_properties(d3d12_m3_frame PROPERTIES SKIP_RETURN_CODE 77) | 1224 | set_tests_properties(d3d12_m3_frame PROPERTIES SKIP_RETURN_CODE 77) |
| 1225 | |||
| 1226 | # M4 (synthetic part): compute PSOs, a UAV table (structured and raw buffers, an R32_UINT storage image), an indirect | ||
| 1227 | # dispatch from arguments a first dispatch wrote, and a copy queue that streams the input in and reads the results | ||
| 1228 | # back across queue fences. cs_m4_fill.asm and cs_m4_indirect.asm go through the same build; build.py publishes | ||
| 1229 | # their synthetic FSSM programs (the compute header and the words their "fssm-data" comments give), which the | ||
| 1230 | # test wraps in shader containers. | ||
| 1231 | set(LEONIDA_M4_DIR ${CMAKE_CURRENT_BINARY_DIR}/generated/m4_shaders) | ||
| 1232 | set(LEONIDA_M4_FILES ${LEONIDA_M4_DIR}/spirv/index.json ${LEONIDA_M4_DIR}/fssm/cs_m4_fill.fssm | ||
| 1233 | ${LEONIDA_M4_DIR}/fssm/cs_m4_indirect.fssm) | ||
| 1234 | add_custom_command( | ||
| 1235 | OUTPUT ${LEONIDA_M4_FILES} | ||
| 1236 | COMMAND ${CMAKE_COMMAND} -E remove_directory ${LEONIDA_M4_DIR} | ||
| 1237 | COMMAND ${CMAKE_COMMAND} -E env "LLVM_MC=${LEONIDA_LLVM_MC}" "LEONIDA_SPIRV_TOOLS=${LEONIDA_SPIRV_TOOLS_NATIVE}" | ||
| 1238 | $<TARGET_FILE:Python3::Interpreter> -I ${CMAKE_CURRENT_SOURCE_DIR}/test/shaders/build.py | ||
| 1239 | ${LEONIDA_M4_DIR} cs_m4_fill cs_m4_indirect | ||
| 1240 | DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/test/shaders/build.py | ||
| 1241 | ${CMAKE_CURRENT_SOURCE_DIR}/test/shaders/compute_fixture.py | ||
| 1242 | ${CMAKE_CURRENT_SOURCE_DIR}/test/shaders/cs_m4_fill.asm | ||
| 1243 | ${CMAKE_CURRENT_SOURCE_DIR}/test/shaders/cs_m4_indirect.asm | ||
| 1244 | ${CMAKE_CURRENT_SOURCE_DIR}/../tools/rdna2spirv.py | ||
| 1245 | COMMENT "Translating cs_m4_fill and cs_m4_indirect for the compute test" | ||
| 1246 | VERBATIM) | ||
| 1247 | add_executable(d3d12_m4_compute_test test/d3d12_m4_compute_test.cpp shims/d3d12_xs_device.cpp ${LEONIDA_M4_FILES}) | ||
| 1248 | target_link_libraries(d3d12_m4_compute_test PRIVATE gta6rt_d3d12_com) | ||
| 1249 | target_compile_definitions(d3d12_m4_compute_test PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX | ||
| 1250 | LEONIDA_TEST_M4_DIR="${LEONIDA_M4_DIR}") | ||
| 1251 | target_compile_options(d3d12_m4_compute_test PRIVATE /W4 /permissive- /utf-8) | ||
| 1252 | add_test(NAME d3d12_m4_compute COMMAND d3d12_m4_compute_test) | ||
| 1253 | set_tests_properties(d3d12_m4_compute PROPERTIES SKIP_RETURN_CODE 77) | ||
| 1254 | |||
| 1255 | # Typed buffer UAVs and UAV counters: cs_buf_typed.asm writes typed views through V#s with a FORMAT, and | ||
| 1256 | # cs_buf_counter.asm appends to and consumes from a structured view whose counter is the second V# of its slot; | ||
| 1257 | # the test also compares typed-buffer and counter clears with the host runtime on the layer's adapter. | ||
| 1258 | set(LEONIDA_BUFFER_UAV_DIR ${CMAKE_CURRENT_BINARY_DIR}/generated/buffer_uav_shaders) | ||
| 1259 | set(LEONIDA_BUFFER_UAV_FILES ${LEONIDA_BUFFER_UAV_DIR}/spirv/index.json | ||
| 1260 | ${LEONIDA_BUFFER_UAV_DIR}/fssm/cs_buf_typed.fssm | ||
| 1261 | ${LEONIDA_BUFFER_UAV_DIR}/fssm/cs_buf_counter.fssm) | ||
| 1262 | add_custom_command( | ||
| 1263 | OUTPUT ${LEONIDA_BUFFER_UAV_FILES} | ||
| 1264 | COMMAND ${CMAKE_COMMAND} -E remove_directory ${LEONIDA_BUFFER_UAV_DIR} | ||
| 1265 | COMMAND ${CMAKE_COMMAND} -E env "LLVM_MC=${LEONIDA_LLVM_MC}" "LEONIDA_SPIRV_TOOLS=${LEONIDA_SPIRV_TOOLS_NATIVE}" | ||
| 1266 | $<TARGET_FILE:Python3::Interpreter> -I ${CMAKE_CURRENT_SOURCE_DIR}/test/shaders/build.py | ||
| 1267 | ${LEONIDA_BUFFER_UAV_DIR} cs_buf_typed cs_buf_counter | ||
| 1268 | DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/test/shaders/build.py | ||
| 1269 | ${CMAKE_CURRENT_SOURCE_DIR}/test/shaders/compute_fixture.py | ||
| 1270 | ${CMAKE_CURRENT_SOURCE_DIR}/test/shaders/cs_buf_typed.asm | ||
| 1271 | ${CMAKE_CURRENT_SOURCE_DIR}/test/shaders/cs_buf_counter.asm | ||
| 1272 | ${CMAKE_CURRENT_SOURCE_DIR}/../tools/rdna2spirv.py | ||
| 1273 | COMMENT "Translating cs_buf_typed and cs_buf_counter for the buffer UAV test" | ||
| 1274 | VERBATIM) | ||
| 1275 | add_executable(d3d12_buffer_uav_test test/d3d12_buffer_uav_test.cpp shims/d3d12_xs_device.cpp ${LEONIDA_BUFFER_UAV_FILES}) | ||
| 1276 | target_link_libraries(d3d12_buffer_uav_test PRIVATE gta6rt_d3d12_com) | ||
| 1277 | target_compile_definitions(d3d12_buffer_uav_test PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX | ||
| 1278 | LEONIDA_TEST_BUFFER_UAV_DIR="${LEONIDA_BUFFER_UAV_DIR}") | ||
| 1279 | target_compile_options(d3d12_buffer_uav_test PRIVATE /W4 /permissive- /utf-8) | ||
| 1280 | add_test(NAME d3d12_buffer_uav COMMAND d3d12_buffer_uav_test) | ||
| 1281 | set_tests_properties(d3d12_buffer_uav PROPERTIES SKIP_RETURN_CODE 77) | ||
| 1179 | else() | 1282 | else() |
| 1180 | message(STATUS "llvm-mc (set LLVM_MC) or the SDK's spirv-as/spirv-val not found: d3d12_translated_draw_test, d3d12_m2_textured_test and d3d12_m3_frame_test are not built") | 1283 | message(STATUS "llvm-mc (set LLVM_MC) or the SDK's spirv-as/spirv-val not found: d3d12_translated_draw_test, d3d12_m2_textured_test, d3d12_m3_frame_test, d3d12_m4_compute_test and d3d12_buffer_uav_test are not built") |
| 1181 | endif() | 1284 | endif() |
| 1182 | # ID3D12Resource::GetHeapProperties and ID3D12DescriptorHeap::GetDesc (node masks, resolved heap flags) against the | 1285 | # ID3D12Resource::GetHeapProperties and ID3D12DescriptorHeap::GetDesc (node masks, resolved heap flags) against the |
| 1183 | # host runtime and WARP; run explicitly on a Vulkan GPU. | 1286 | # host runtime and WARP; run explicitly on a Vulkan GPU. |
| @@ -1191,6 +1294,7 @@ if(TARGET Vulkan::Headers) | |||
| 1191 | target_compile_definitions(d3d12_indirect_zero_test PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX) | 1294 | target_compile_definitions(d3d12_indirect_zero_test PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX) |
| 1192 | target_compile_options(d3d12_indirect_zero_test PRIVATE /W4 /permissive- /utf-8) | 1295 | target_compile_options(d3d12_indirect_zero_test PRIVATE /W4 /permissive- /utf-8) |
| 1193 | add_test(NAME d3d12_indirect_zero COMMAND d3d12_indirect_zero_test) | 1296 | add_test(NAME d3d12_indirect_zero COMMAND d3d12_indirect_zero_test) |
| 1297 | set_tests_properties(d3d12_indirect_zero PROPERTIES SKIP_RETURN_CODE 77) | ||
| 1194 | set_tests_properties(d3d12_node_mask PROPERTIES SKIP_RETURN_CODE 77) | 1298 | set_tests_properties(d3d12_node_mask PROPERTIES SKIP_RETURN_CODE 77) |
| 1195 | set_tests_properties(d3d12_indirect_zero PROPERTIES SKIP_RETURN_CODE 77) | 1299 | set_tests_properties(d3d12_indirect_zero PROPERTIES SKIP_RETURN_CODE 77) |
| 1196 | 1300 | ||
| @@ -1332,6 +1436,16 @@ if(TARGET Vulkan::Headers) | |||
| 1332 | target_compile_options(d3d12_set0_compute_test PRIVATE /W4 /permissive- /utf-8) | 1436 | target_compile_options(d3d12_set0_compute_test PRIVATE /W4 /permissive- /utf-8) |
| 1333 | add_test(NAME d3d12_set0_compute COMMAND d3d12_set0_compute_test) | 1437 | add_test(NAME d3d12_set0_compute COMMAND d3d12_set0_compute_test) |
| 1334 | set_tests_properties(d3d12_set0_compute PROPERTIES SKIP_RETURN_CODE 77) | 1438 | set_tests_properties(d3d12_set0_compute PROPERTIES SKIP_RETURN_CODE 77) |
| 1439 | add_executable(d3d12_pipeline_library_test test/d3d12_pipeline_library_test.cpp | ||
| 1440 | ${LEONIDA_TEST_CS} ${LEONIDA_TEST_VS} ${LEONIDA_TEST_PS}) | ||
| 1441 | target_link_libraries(d3d12_pipeline_library_test PRIVATE gta6rt_d3d12_com) | ||
| 1442 | target_compile_definitions(d3d12_pipeline_library_test PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX | ||
| 1443 | LEONIDA_TEST_CS_SPV="${LEONIDA_TEST_CS}" | ||
| 1444 | LEONIDA_TEST_VS_SPV="${LEONIDA_TEST_VS}" | ||
| 1445 | LEONIDA_TEST_PS_SPV="${LEONIDA_TEST_PS}") | ||
| 1446 | target_compile_options(d3d12_pipeline_library_test PRIVATE /W4 /permissive- /utf-8) | ||
| 1447 | add_test(NAME d3d12_pipeline_library COMMAND d3d12_pipeline_library_test) | ||
| 1448 | set_tests_properties(d3d12_pipeline_library PROPERTIES SKIP_RETURN_CODE 77) | ||
| 1335 | else() | 1449 | else() |
| 1336 | message(STATUS "glslangValidator not found: d3d12_compute_test, d3d12_draw_test and d3d12_set0_compute_test are not built") | 1450 | message(STATUS "glslangValidator not found: d3d12_compute_test, d3d12_draw_test and d3d12_set0_compute_test are not built") |
| 1337 | endif() | 1451 | endif() |
diff --git a/runtime/README.md b/runtime/README.md index 1375ced25..7060f4368 100644 --- a/runtime/README.md +++ b/runtime/README.md | |||
| @@ -235,6 +235,14 @@ The PE-loader and Bink-decode tests that need the retail package are optional: w | |||
| 235 | `LEONIDA_GAME_DIR` (and, for Bink, `LEONIDA_MOVIE`) is unset they print `SKIP` and exit 0. They read | 235 | `LEONIDA_GAME_DIR` (and, for Bink, `LEONIDA_MOVIE`) is unset they print `SKIP` and exit 0. They read |
| 236 | the files in place and never copy or commit game data. | 236 | the files in place and never copy or commit game data. |
| 237 | 237 | ||
| 238 | `shader_library_corpus_test` runs the D3D12 layer's shader lookup (`src/shader_library.h`) over a work folder | ||
| 239 | that `make_game.py --stages shaders` built from your copy. With `LEONIDA_SHADERS=<work>/shaders/spirv` it takes | ||
| 240 | every container in `<work>/shaders/dxbc` (or `LEONIDA_SHADER_DXBC`), inflates its FSSM program and looks it up | ||
| 241 | under the stage its DXIL program header names. Each container has to find its own `index.json` entry and a | ||
| 242 | readable `.spv`, every entry has to be reached, and in containers with more than one 0x0D payload no earlier | ||
| 243 | payload may be the indexed program. Without `LEONIDA_SHADERS` it prints `SKIP` (CTest reports it as skipped). | ||
| 244 | It prints counts only; on the 1.0.2.1 corpus all 26,503 containers resolve. | ||
| 245 | |||
| 238 | ## Current limits | 246 | ## Current limits |
| 239 | 247 | ||
| 240 | `gta6rt --run <exe> [-- args]` runs an executable's entry point inside the runtime (`shims/process.cpp` gives it its | 248 | `gta6rt --run <exe> [-- args]` runs an executable's entry point inside the runtime (`shims/process.cpp` gives it its |
diff --git a/runtime/shims/d3d12_com.cpp b/runtime/shims/d3d12_com.cpp index 7e428735d..55c6f86a8 100644 --- a/runtime/shims/d3d12_com.cpp +++ b/runtime/shims/d3d12_com.cpp | |||
| @@ -113,8 +113,9 @@ class CommandAllocator final | |||
| 113 | : public Child<CommandAllocator, ID3D12CommandAllocatorStubs, ID3D12Object, ID3D12DeviceChild, ID3D12Pageable, | 113 | : public Child<CommandAllocator, ID3D12CommandAllocatorStubs, ID3D12Object, ID3D12DeviceChild, ID3D12Pageable, |
| 114 | ID3D12CommandAllocator> { | 114 | ID3D12CommandAllocator> { |
| 115 | public: | 115 | public: |
| 116 | // {7d0e6b51-34a2-4f0c-9a61-0c5b2e8f4a10} | 116 | // {7d0e6b51-34a2-4f0c-9a61-0c5b2e8f4a10}, public in d3d12_xs_device.h: the device proxy's slot 9 wraps an allocator |
| 117 | static constexpr GUID kTag{0x7d0e6b51, 0x34a2, 0x4f0c, {0x9a, 0x61, 0x0c, 0x5b, 0x2e, 0x8f, 0x4a, 0x10}}; | 117 | // in an Xbox-ABI allocator proxy only when it answers this tag, because from() below resolves such a proxy. |
| 118 | static constexpr GUID kTag = d3d12_xs::kLeonidaCommandAllocatorTag; | ||
| 118 | explicit CommandAllocator(D3D12_COMMAND_LIST_TYPE type) : type_(type) {} | 119 | explicit CommandAllocator(D3D12_COMMAND_LIST_TYPE type) : type_(type) {} |
| 119 | // Lists own their recorded commands, so there is nothing to free. As on the PC runtime (D3D-51, measured by | 120 | // Lists own their recorded commands, so there is nothing to free. As on the PC runtime (D3D-51, measured by |
| 120 | // d3d12_vulkan_device_test): E_FAIL while a list is recording into this allocator, and S_OK while its lists are | 121 | // d3d12_vulkan_device_test): E_FAIL while a list is recording into this allocator, and S_OK while its lists are |
| @@ -124,7 +125,12 @@ public: | |||
| 124 | // The one list that is recording into this allocator, or null. D3D12 allows one at a time. | 125 | // The one list that is recording into this allocator, or null. D3D12 allows one at a time. |
| 125 | const void* recording() const { return recording_; } | 126 | const void* recording() const { return recording_; } |
| 126 | void set_recording(const void* list) { recording_ = list; } | 127 | void set_recording(const void* list) { recording_ = list; } |
| 127 | static CommandAllocator* from(IUnknown* object) { return Child::from<CommandAllocator>(object); } | 128 | // An allocator proxy (the title's allocator from device slot 9) stands for the allocator behind it, so every |
| 129 | // list method that takes an allocator (CreateCommandList, Reset) resolves it here. | ||
| 130 | static CommandAllocator* from(IUnknown* object) { | ||
| 131 | if (ID3D12CommandAllocator* real = d3d12_xs::allocator_proxy_real_allocator(object)) object = real; | ||
| 132 | return Child::from<CommandAllocator>(object); | ||
| 133 | } | ||
| 128 | 134 | ||
| 129 | private: | 135 | private: |
| 130 | D3D12_COMMAND_LIST_TYPE type_; | 136 | D3D12_COMMAND_LIST_TYPE type_; |
| @@ -214,10 +220,14 @@ public: | |||
| 214 | bind_root(compute_, signature); | 220 | bind_root(compute_, signature); |
| 215 | } | 221 | } |
| 216 | void STDMETHODCALLTYPE SetGraphicsRootSignature(ID3D12RootSignature* signature) override { | 222 | void STDMETHODCALLTYPE SetGraphicsRootSignature(ID3D12RootSignature* signature) override { |
| 223 | d3d12_trace::record("ID3D12GraphicsCommandList::SetGraphicsRootSignature"); | ||
| 217 | bind_root(graphics_, signature); | 224 | bind_root(graphics_, signature); |
| 218 | } | 225 | } |
| 219 | 226 | ||
| 220 | void STDMETHODCALLTYPE SetPipelineState(ID3D12PipelineState* state) override { set_pipeline(state); } | 227 | void STDMETHODCALLTYPE SetPipelineState(ID3D12PipelineState* state) override { |
| 228 | d3d12_trace::record("ID3D12GraphicsCommandList::SetPipelineState"); | ||
| 229 | set_pipeline(state); | ||
| 230 | } | ||
| 221 | 231 | ||
| 222 | // The bound heaps matter to direct heap indexing, which is still open (section 3.4); tables carry their VAs. | 232 | // The bound heaps matter to direct heap indexing, which is still open (section 3.4); tables carry their VAs. |
| 223 | void STDMETHODCALLTYPE SetDescriptorHeaps(UINT, ID3D12DescriptorHeap* const*) override {} | 233 | void STDMETHODCALLTYPE SetDescriptorHeaps(UINT, ID3D12DescriptorHeap* const*) override {} |
| @@ -591,12 +601,17 @@ public: | |||
| 591 | cmd.argument_offset = argument_buffer_offset; | 601 | cmd.argument_offset = argument_buffer_offset; |
| 592 | cmd.count_buffer = count_buffer ? resource_id(count_buffer) : 0; | 602 | cmd.count_buffer = count_buffer ? resource_id(count_buffer) : 0; |
| 593 | cmd.count_offset = count_buffer ? count_buffer_offset : 0; | 603 | cmd.count_offset = count_buffer ? count_buffer_offset : 0; |
| 604 | if (kind == leonida::IndirectKind::dispatch && max_command_count) { // the pipeline and root arguments a Dispatch would record | ||
| 605 | if (!compute_pipeline_ || !compute_.layout) return check(false); | ||
| 606 | cmd.pipeline = compute_pipeline_; | ||
| 607 | cmd.user_data = compute_.data; | ||
| 608 | } | ||
| 594 | check(list_.execute_indirect(cmd)); | 609 | check(list_.execute_indirect(cmd)); |
| 595 | } | 610 | } |
| 596 | 611 | ||
| 597 | void STDMETHODCALLTYPE BuildRaytracingAccelerationStructure( | 612 | void STDMETHODCALLTYPE BuildRaytracingAccelerationStructure( |
| 598 | const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC* desc, UINT, | 613 | const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC* desc, UINT postbuild_count, |
| 599 | const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC*) override { | 614 | const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC* postbuild) override { |
| 600 | if (type_ == D3D12_COMMAND_LIST_TYPE_BUNDLE || !desc) return check(false); | 615 | if (type_ == D3D12_COMMAND_LIST_TYPE_BUNDLE || !desc) return check(false); |
| 601 | const auto& in = desc->Inputs; | 616 | const auto& in = desc->Inputs; |
| 602 | leonida::BuildAccelerationStructure cmd{}; | 617 | leonida::BuildAccelerationStructure cmd{}; |
| @@ -650,7 +665,38 @@ public: | |||
| 650 | cmd.triangles.push_back(t); | 665 | cmd.triangles.push_back(t); |
| 651 | } | 666 | } |
| 652 | } | 667 | } |
| 653 | check(list_.build_acceleration_structure(cmd)); | 668 | const std::uint64_t built = cmd.dst_va; |
| 669 | const bool recorded = list_.build_acceleration_structure(std::move(cmd)); | ||
| 670 | check(recorded); | ||
| 671 | if (!recorded) return; | ||
| 672 | // The postbuild values of the structure just built, after it (D3D12 orders them after the build). | ||
| 673 | for (UINT i = 0; postbuild && i < postbuild_count; ++i) { | ||
| 674 | leonida::AccelerationStructurePostbuild info{}; | ||
| 675 | info.dest_va = postbuild[i].DestBuffer; | ||
| 676 | info.type = static_cast<std::uint32_t>(postbuild[i].InfoType); | ||
| 677 | info.sources = {built}; | ||
| 678 | const bool ok = list_.acceleration_structure_postbuild(std::move(info)); | ||
| 679 | check(ok); | ||
| 680 | if (!ok) return; | ||
| 681 | } | ||
| 682 | } | ||
| 683 | |||
| 684 | void STDMETHODCALLTYPE EmitRaytracingAccelerationStructurePostbuildInfo( | ||
| 685 | const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC* desc, UINT count, | ||
| 686 | const D3D12_GPU_VIRTUAL_ADDRESS* sources) override { | ||
| 687 | if (type_ == D3D12_COMMAND_LIST_TYPE_BUNDLE || !desc || !count || !sources) return check(false); | ||
| 688 | leonida::AccelerationStructurePostbuild info{}; | ||
| 689 | info.dest_va = desc->DestBuffer; | ||
| 690 | info.type = static_cast<std::uint32_t>(desc->InfoType); | ||
| 691 | info.sources.assign(sources, sources + count); | ||
| 692 | check(list_.acceleration_structure_postbuild(std::move(info))); | ||
| 693 | } | ||
| 694 | |||
| 695 | void STDMETHODCALLTYPE CopyRaytracingAccelerationStructure(D3D12_GPU_VIRTUAL_ADDRESS dest, | ||
| 696 | D3D12_GPU_VIRTUAL_ADDRESS source, | ||
| 697 | D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE mode) override { | ||
| 698 | if (type_ == D3D12_COMMAND_LIST_TYPE_BUNDLE) return check(false); | ||
| 699 | check(list_.copy_acceleration_structure({dest, source, static_cast<std::uint32_t>(mode)})); | ||
| 654 | } | 700 | } |
| 655 | 701 | ||
| 656 | static GraphicsCommandList* from(IUnknown* object) { return Child::from<GraphicsCommandList>(object); } | 702 | static GraphicsCommandList* from(IUnknown* object) { return Child::from<GraphicsCommandList>(object); } |
| @@ -1251,7 +1297,8 @@ HRESULT create_command_list(D3D12_COMMAND_LIST_TYPE type, ID3D12CommandAllocator | |||
| 1251 | if (!command_allocator || command_allocator->type() != type) return E_INVALIDARG; | 1297 | if (!command_allocator || command_allocator->type() != type) return E_INVALIDARG; |
| 1252 | // A list is created open, so the allocator must be free: E_INVALIDARG as on the PC runtime (D3D-51). | 1298 | // A list is created open, so the allocator must be free: E_INVALIDARG as on the PC runtime (D3D-51). |
| 1253 | if (command_allocator->recording()) return E_INVALIDARG; | 1299 | if (command_allocator->recording()) return E_INVALIDARG; |
| 1254 | if (type != D3D12_COMMAND_LIST_TYPE_DIRECT && type != D3D12_COMMAND_LIST_TYPE_BUNDLE) | 1300 | if (type != D3D12_COMMAND_LIST_TYPE_DIRECT && type != D3D12_COMMAND_LIST_TYPE_BUNDLE && |
| 1301 | type != D3D12_COMMAND_LIST_TYPE_COMPUTE && type != D3D12_COMMAND_LIST_TYPE_COPY) | ||
| 1255 | stub("create_command_list(non-direct type)"); | 1302 | stub("create_command_list(non-direct type)"); |
| 1256 | auto* object = new GraphicsCommandList(type); // created open, as D3D12 does | 1303 | auto* object = new GraphicsCommandList(type); // created open, as D3D12 does |
| 1257 | object->record_into(command_allocator); | 1304 | object->record_into(command_allocator); |
diff --git a/runtime/shims/d3d12_com.h b/runtime/shims/d3d12_com.h index 2e1f2d3c5..b3b397be0 100644 --- a/runtime/shims/d3d12_com.h +++ b/runtime/shims/d3d12_com.h | |||
| @@ -273,6 +273,12 @@ inline constexpr UINT descriptor_size = 32; | |||
| 273 | // ExecuteCommandLists returns void; this is what the last call on the queue did. | 273 | // ExecuteCommandLists returns void; this is what the last call on the queue did. |
| 274 | leonida::ReplayResult last_execute_result(ID3D12CommandQueue* queue); | 274 | leonida::ReplayResult last_execute_result(ID3D12CommandQueue* queue); |
| 275 | 275 | ||
| 276 | // True when the current thread or process token has SeIncreaseBasePriorityPrivilege enabled (or the test override | ||
| 277 | // forces it), which D3D12 requires for D3D12_COMMAND_QUEUE_PRIORITY_GLOBAL_REALTIME. | ||
| 278 | bool has_global_realtime_privilege(); | ||
| 279 | // Test override for has_global_realtime_privilege(): -1 queries the token (default), 0 forces denied, 1 forces granted. | ||
| 280 | void set_global_realtime_privilege_override_for_test(int state); | ||
| 281 | |||
| 276 | // The front/back stencil references last recorded by ID3D12GraphicsCommandList8::OMSetFrontAndBackStencilRef on | 282 | // The front/back stencil references last recorded by ID3D12GraphicsCommandList8::OMSetFrontAndBackStencilRef on |
| 277 | // `list`. The values are kept for the future pipeline path, which is what would apply them. False when `list` is | 283 | // `list`. The values are kept for the future pipeline path, which is what would apply them. False when `list` is |
| 278 | // not one of this module's command lists. | 284 | // not one of this module's command lists. |
diff --git a/runtime/shims/d3d12_vulkan_device.cpp b/runtime/shims/d3d12_vulkan_device.cpp index 5cb39d0d6..af7e7aa5c 100644 --- a/runtime/shims/d3d12_vulkan_device.cpp +++ b/runtime/shims/d3d12_vulkan_device.cpp | |||
| @@ -15,15 +15,19 @@ | |||
| 15 | #include "d3d12_xs_device.h" | 15 | #include "d3d12_xs_device.h" |
| 16 | #include "dxgi_com.h" | 16 | #include "dxgi_com.h" |
| 17 | #include "../src/gfx10_descriptors.h" | 17 | #include "../src/gfx10_descriptors.h" |
| 18 | #include "../src/uav_clear.h" | ||
| 18 | #include "../src/vulkan_bindless.h" | 19 | #include "../src/vulkan_bindless.h" |
| 19 | #include "../src/vulkan_memory.h" | 20 | #include "../src/vulkan_memory.h" |
| 20 | #include "../src/resource_tiling.h" | 21 | #include "../src/resource_tiling.h" |
| 21 | #include "../src/shader_library.h" | 22 | #include "../src/shader_library.h" |
| 22 | #include "../src/vulkan_present.h" | 23 | #include "../src/vulkan_present.h" |
| 23 | #include "../src/vulkan_device_filter.h" | 24 | #include "../src/vulkan_device_filter.h" |
| 25 | #include "../src/vulkan13_features.h" | ||
| 24 | 26 | ||
| 25 | #include <vulkan/vulkan_win32.h> | 27 | #include <vulkan/vulkan_win32.h> |
| 26 | 28 | #ifdef _MSC_VER | |
| 29 | #pragma comment(lib, "advapi32.lib") | ||
| 30 | #endif | ||
| 27 | 31 | ||
| 28 | #include <algorithm> | 32 | #include <algorithm> |
| 29 | #include <atomic> | 33 | #include <atomic> |
| @@ -59,6 +63,8 @@ static_assert(sizeof(leonida::TargetView) <= kDescriptorSize); | |||
| 59 | constexpr D3D_SHADER_MODEL kHighestShaderModel = D3D_SHADER_MODEL_6_0; | 63 | constexpr D3D_SHADER_MODEL kHighestShaderModel = D3D_SHADER_MODEL_6_0; |
| 60 | constexpr D3D_ROOT_SIGNATURE_VERSION kHighestRootSignatureVersion = D3D_ROOT_SIGNATURE_VERSION_1_1; | 64 | constexpr D3D_ROOT_SIGNATURE_VERSION kHighestRootSignatureVersion = D3D_ROOT_SIGNATURE_VERSION_1_1; |
| 61 | 65 | ||
| 66 | std::atomic<int> g_global_realtime_privilege_override{-1}; | ||
| 67 | |||
| 62 | void log_once(const char* what, int value) { | 68 | void log_once(const char* what, int value) { |
| 63 | static std::mutex mutex; | 69 | static std::mutex mutex; |
| 64 | static std::set<std::pair<std::string, int>> seen; | 70 | static std::set<std::pair<std::string, int>> seen; |
| @@ -1060,6 +1066,21 @@ const char* heap_properties_refusal(const D3D12_HEAP_PROPERTIES& heap) { | |||
| 1060 | return nullptr; | 1066 | return nullptr; |
| 1061 | } | 1067 | } |
| 1062 | 1068 | ||
| 1069 | // Why the host would refuse this CreateHeap/CreateHeap1 description, or null if these checks pass (D3D-238). A probe | ||
| 1070 | // on an RX 5700 and WARP refuses an alignment other than 0, 64 KiB and 4 MiB, the heap properties above (a type of 0, | ||
| 1071 | // a custom heap without a CPU page property), and a heap that denies buffers and both kinds of texture. | ||
| 1072 | const char* heap_desc_refusal(const D3D12_HEAP_DESC& desc) { | ||
| 1073 | if (!desc.SizeInBytes) return "zero size"; | ||
| 1074 | if (desc.Alignment && desc.Alignment != D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT && | ||
| 1075 | desc.Alignment != D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT) | ||
| 1076 | return "alignment (0, 64 KiB or 4 MiB)"; | ||
| 1077 | if (const char* why = heap_properties_refusal(desc.Properties)) return why; | ||
| 1078 | constexpr UINT deny_all = D3D12_HEAP_FLAG_DENY_BUFFERS | D3D12_HEAP_FLAG_DENY_RT_DS_TEXTURES | | ||
| 1079 | D3D12_HEAP_FLAG_DENY_NON_RT_DS_TEXTURES; | ||
| 1080 | if ((UINT(desc.Flags) & deny_all) == deny_all) return "heap flags denying every resource kind"; | ||
| 1081 | return nullptr; | ||
| 1082 | } | ||
| 1083 | |||
| 1063 | // Why the host would refuse this committed resource, or null if these checks pass. The flag and format tables were | 1084 | // Why the host would refuse this committed resource, or null if these checks pass. The flag and format tables were |
| 1064 | // measured on an RX 9070 XT, an integrated Radeon and WARP, which agree on all of them. Cross-adapter resources | 1085 | // measured on an RX 9070 XT, an integrated Radeon and WARP, which agree on all of them. Cross-adapter resources |
| 1065 | // (valid there only as a row-major texture on a SHARED | SHARED_CROSS_ADAPTER heap) are refused: this layer has no | 1086 | // (valid there only as a row-major texture on a SHARED | SHARED_CROSS_ADAPTER heap) are refused: this layer has no |
| @@ -1355,6 +1376,10 @@ public: | |||
| 1355 | binding.size = desc_.Width; | 1376 | binding.size = desc_.Width; |
| 1356 | binding.buffer = device_.arena.buffer; | 1377 | binding.buffer = device_.arena.buffer; |
| 1357 | binding.buffer_offset = va_; | 1378 | binding.buffer_offset = va_; |
| 1379 | binding.va = va_; | ||
| 1380 | binding.host_readable = (heap_.Type == D3D12_HEAP_TYPE_READBACK || | ||
| 1381 | (heap_.Type == D3D12_HEAP_TYPE_CUSTOM && | ||
| 1382 | heap_.CPUPageProperty == D3D12_CPU_PAGE_PROPERTY_WRITE_BACK)); | ||
| 1358 | device_.context->add_resource(id(), binding); | 1383 | device_.context->add_resource(id(), binding); |
| 1359 | return S_OK; | 1384 | return S_OK; |
| 1360 | } | 1385 | } |
| @@ -1460,8 +1485,9 @@ public: | |||
| 1460 | D3D12_RESOURCE_DESC STDMETHODCALLTYPE GetDesc() override { | 1485 | D3D12_RESOURCE_DESC STDMETHODCALLTYPE GetDesc() override { |
| 1461 | D3D12_RESOURCE_DESC desc = desc_; | 1486 | D3D12_RESOURCE_DESC desc = desc_; |
| 1462 | if (!desc.Alignment) { | 1487 | if (!desc.Alignment) { |
| 1463 | desc.Alignment = desc.SampleDesc.Count > 1 ? D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT | 1488 | desc.Alignment = (desc.SampleDesc.Count > 1 && !is_tiled_layout(desc.Layout)) |
| 1464 | : D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT; | 1489 | ? D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT |
| 1490 | : D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT; | ||
| 1465 | } | 1491 | } |
| 1466 | return desc; | 1492 | return desc; |
| 1467 | } | 1493 | } |
| @@ -1937,6 +1963,7 @@ public: | |||
| 1937 | bool reserved() const { return reserved_; } | 1963 | bool reserved() const { return reserved_; } |
| 1938 | VkDeviceSize offset() const { return offset_; } | 1964 | VkDeviceSize offset() const { return offset_; } |
| 1939 | UINT64 bytes() const { return desc_.SizeInBytes; } | 1965 | UINT64 bytes() const { return desc_.SizeInBytes; } |
| 1966 | UINT64 alignment() const { return desc_.Alignment ? desc_.Alignment : D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT; } | ||
| 1940 | const D3D12_HEAP_PROPERTIES& properties() const { return desc_.Properties; } | 1967 | const D3D12_HEAP_PROPERTIES& properties() const { return desc_.Properties; } |
| 1941 | D3D12_HEAP_FLAGS flags() const { return desc_.Flags; } | 1968 | D3D12_HEAP_FLAGS flags() const { return desc_.Flags; } |
| 1942 | 1969 | ||
| @@ -2616,6 +2643,99 @@ struct TextureView { | |||
| 2616 | float min_lod = 0.0f; | 2643 | float min_lod = 0.0f; |
| 2617 | }; | 2644 | }; |
| 2618 | 2645 | ||
| 2646 | // In-memory pipeline library (docs/d3d12_vulkan.md sections 3.6 and 4). D3D12 cached blobs are driver-specific | ||
| 2647 | // and ignored across runs; Serialize writes a versioned header so CreatePipelineLibrary recognizes our own blobs | ||
| 2648 | // and returns D3D12_ERROR_DRIVER_VERSION_MISMATCH for foreign or corrupt ones. | ||
| 2649 | class PipelineLibrary final | ||
| 2650 | : public Child<PipelineLibrary, ID3D12PipelineLibrary1Stubs, ID3D12Object, ID3D12DeviceChild, ID3D12Pageable, | ||
| 2651 | ID3D12PipelineLibrary, ID3D12PipelineLibrary1> { | ||
| 2652 | public: | ||
| 2653 | // {6e2a9d41-7b5f-4c83-8e14-2a9d6f3c5b10} | ||
| 2654 | static constexpr GUID kTag{0x6e2a9d41, 0x7b5f, 0x4c83, {0x8e, 0x14, 0x2a, 0x9d, 0x6f, 0x3c, 0x5b, 0x10}}; | ||
| 2655 | |||
| 2656 | struct Header { | ||
| 2657 | std::uint32_t magic; | ||
| 2658 | std::uint32_t version; | ||
| 2659 | std::uint32_t count; | ||
| 2660 | std::uint32_t reserved; | ||
| 2661 | }; | ||
| 2662 | static constexpr std::uint32_t kMagic = 0x314C504Cu; // "LPL1" | ||
| 2663 | static constexpr std::uint32_t kVersion = 1; | ||
| 2664 | |||
| 2665 | ~PipelineLibrary() override { | ||
| 2666 | std::lock_guard lock(mutex_); | ||
| 2667 | for (auto& [name, pso] : entries_) | ||
| 2668 | if (pso) pso->Release(); | ||
| 2669 | entries_.clear(); | ||
| 2670 | } | ||
| 2671 | |||
| 2672 | static bool valid_blob(const void* data, SIZE_T size) { | ||
| 2673 | if (!data || size < sizeof(Header)) return false; | ||
| 2674 | Header h{}; | ||
| 2675 | std::memcpy(&h, data, sizeof(h)); | ||
| 2676 | return h.magic == kMagic && h.version == kVersion && h.reserved == 0; | ||
| 2677 | } | ||
| 2678 | |||
| 2679 | HRESULT STDMETHODCALLTYPE StorePipeline(LPCWSTR name, ID3D12PipelineState* pipeline) override { | ||
| 2680 | if (!name || !*name || !pipeline) return E_INVALIDARG; | ||
| 2681 | if (!PipelineState::from<PipelineState>(pipeline)) return E_INVALIDARG; | ||
| 2682 | std::lock_guard lock(mutex_); | ||
| 2683 | auto [it, inserted] = entries_.emplace(name, pipeline); | ||
| 2684 | if (!inserted) return E_INVALIDARG; | ||
| 2685 | pipeline->AddRef(); | ||
| 2686 | return S_OK; | ||
| 2687 | } | ||
| 2688 | |||
| 2689 | HRESULT STDMETHODCALLTYPE LoadGraphicsPipeline(LPCWSTR name, const D3D12_GRAPHICS_PIPELINE_STATE_DESC* desc, | ||
| 2690 | REFIID riid, void** out) override { | ||
| 2691 | if (!out) return E_POINTER; | ||
| 2692 | *out = nullptr; | ||
| 2693 | if (!name || !*name || !desc) return E_INVALIDARG; | ||
| 2694 | return load_entry(name, false, true, riid, out); | ||
| 2695 | } | ||
| 2696 | |||
| 2697 | HRESULT STDMETHODCALLTYPE LoadComputePipeline(LPCWSTR name, const D3D12_COMPUTE_PIPELINE_STATE_DESC* desc, | ||
| 2698 | REFIID riid, void** out) override { | ||
| 2699 | if (!out) return E_POINTER; | ||
| 2700 | *out = nullptr; | ||
| 2701 | if (!name || !*name || !desc) return E_INVALIDARG; | ||
| 2702 | return load_entry(name, true, false, riid, out); | ||
| 2703 | } | ||
| 2704 | |||
| 2705 | HRESULT STDMETHODCALLTYPE LoadPipeline(LPCWSTR name, const D3D12_PIPELINE_STATE_STREAM_DESC* desc, | ||
| 2706 | REFIID riid, void** out) override { | ||
| 2707 | if (!out) return E_POINTER; | ||
| 2708 | *out = nullptr; | ||
| 2709 | if (!name || !*name || !desc || !desc->SizeInBytes || !desc->pPipelineStateSubobjectStream) return E_INVALIDARG; | ||
| 2710 | return load_entry(name, false, false, riid, out); | ||
| 2711 | } | ||
| 2712 | |||
| 2713 | SIZE_T STDMETHODCALLTYPE GetSerializedSize() override { return sizeof(Header); } | ||
| 2714 | |||
| 2715 | HRESULT STDMETHODCALLTYPE Serialize(void* data, SIZE_T size) override { | ||
| 2716 | if (!data || size < sizeof(Header)) return E_INVALIDARG; | ||
| 2717 | std::lock_guard lock(mutex_); | ||
| 2718 | const Header h{kMagic, kVersion, static_cast<std::uint32_t>(entries_.size()), 0}; | ||
| 2719 | std::memcpy(data, &h, sizeof(h)); | ||
| 2720 | return S_OK; | ||
| 2721 | } | ||
| 2722 | |||
| 2723 | private: | ||
| 2724 | HRESULT load_entry(LPCWSTR name, bool require_compute, bool require_graphics, REFIID riid, void** out) { | ||
| 2725 | std::lock_guard lock(mutex_); | ||
| 2726 | const auto it = entries_.find(name); | ||
| 2727 | if (it == entries_.end()) return E_INVALIDARG; | ||
| 2728 | PipelineState* ps = PipelineState::from<PipelineState>(it->second); | ||
| 2729 | if (!ps) return E_INVALIDARG; | ||
| 2730 | if (require_compute && !ps->compute()) return E_INVALIDARG; | ||
| 2731 | if (require_graphics && !ps->graphics()) return E_INVALIDARG; | ||
| 2732 | return it->second->QueryInterface(riid, out); | ||
| 2733 | } | ||
| 2734 | |||
| 2735 | std::mutex mutex_; | ||
| 2736 | std::unordered_map<std::wstring, ID3D12PipelineState*> entries_; | ||
| 2737 | }; | ||
| 2738 | |||
| 2619 | // The T# of a view: what the shader gets to know about it, in the structure the console's shaders read. | 2739 | // The T# of a view: what the shader gets to know about it, in the structure the console's shaders read. |
| 2620 | // False (with a log) for a view set 0 cannot show yet. | 2740 | // False (with a log) for a view set 0 cannot show yet. |
| 2621 | bool image_descriptor(const Resource& resource, const TextureView& view, leonida::gfx10::Image& out) { | 2741 | bool image_descriptor(const Resource& resource, const TextureView& view, leonida::gfx10::Image& out) { |
| @@ -2646,7 +2766,7 @@ bool image_descriptor(const Resource& resource, const TextureView& view, leonida | |||
| 2646 | const auto dimension = line ? D3D12_RESOURCE_DIMENSION_TEXTURE1D : | 2766 | const auto dimension = line ? D3D12_RESOURCE_DIMENSION_TEXTURE1D : |
| 2647 | view.type == g::ImageType::image_3d ? D3D12_RESOURCE_DIMENSION_TEXTURE3D : | 2767 | view.type == g::ImageType::image_3d ? D3D12_RESOURCE_DIMENSION_TEXTURE3D : |
| 2648 | D3D12_RESOURCE_DIMENSION_TEXTURE2D; | 2768 | D3D12_RESOURCE_DIMENSION_TEXTURE2D; |
| 2649 | if (desc.Dimension != dimension || (line && desc.DepthOrArraySize != 1) || msaa != (desc.SampleDesc.Count > 1)) { | 2769 | if (desc.Dimension != dimension || (line && view.layer_count != 1) || msaa != (desc.SampleDesc.Count > 1)) { |
| 2650 | log_once("view type incompatible with texture dimension or sample count; view type", int(view.type)); | 2770 | log_once("view type incompatible with texture dimension or sample count; view type", int(view.type)); |
| 2651 | return false; | 2771 | return false; |
| 2652 | } | 2772 | } |
| @@ -3094,7 +3214,19 @@ public: | |||
| 3094 | get_properties(state_.info.physical, &properties); | 3214 | get_properties(state_.info.physical, &properties); |
| 3095 | features.ms_samples = {VK_SAMPLE_COUNT_4_BIT, state_.ms_fallback_samples(VK_FORMAT_R32_UINT), | 3215 | features.ms_samples = {VK_SAMPLE_COUNT_4_BIT, state_.ms_fallback_samples(VK_FORMAT_R32_UINT), |
| 3096 | state_.ms_fallback_samples(VK_FORMAT_R32_SINT)}; | 3216 | state_.ms_fallback_samples(VK_FORMAT_R32_SINT)}; |
| 3097 | if (!leonida::bindless::size_bindings(features, properties.properties.limits, v11, indexed)) | 3217 | // Past maxPerSetDescriptors, ask the driver about the grown layout (D3D-219: Intel's Xe-LP reports 6159). |
| 3218 | const auto layout_support = reinterpret_cast<PFN_vkGetDescriptorSetLayoutSupport>( | ||
| 3219 | get_device(state_.info.device, "vkGetDescriptorSetLayoutSupport")); | ||
| 3220 | std::function<bool(const leonida::BindlessFeatures&)> layout_supported; | ||
| 3221 | if (layout_support) | ||
| 3222 | layout_supported = [&](const leonida::BindlessFeatures& candidate) { | ||
| 3223 | const leonida::bindless::SetLayout layout(candidate); | ||
| 3224 | VkDescriptorSetLayoutSupport support{VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT}; | ||
| 3225 | layout_support(state_.info.device, &layout.info, &support); | ||
| 3226 | return support.supported == VK_TRUE; | ||
| 3227 | }; | ||
| 3228 | if (!leonida::bindless::size_bindings(features, properties.properties.limits, v11, indexed, | ||
| 3229 | layout_supported)) | ||
| 3098 | std::fprintf(stderr, "[rt] d3d12: the device's descriptor limits are below the bindless set's default " | 3230 | std::fprintf(stderr, "[rt] d3d12: the device's descriptor limits are below the bindless set's default " |
| 3099 | "sizes; it holds less\n"); | 3231 | "sizes; it holds less\n"); |
| 3100 | } | 3232 | } |
| @@ -3379,8 +3511,8 @@ public: | |||
| 3379 | log_once("CreateCommandQueue refused (type, priority, flags or node mask), type", desc->Type); | 3511 | log_once("CreateCommandQueue refused (type, priority, flags or node mask), type", desc->Type); |
| 3380 | return d3d12_trace::result(method, E_INVALIDARG); | 3512 | return d3d12_trace::result(method, E_INVALIDARG); |
| 3381 | } | 3513 | } |
| 3382 | // Global realtime priority needs a privilege the host grants only on request; without it, this answer. | 3514 | // Global realtime priority needs SeIncreaseBasePriorityPrivilege enabled in the token; without it, this answer. |
| 3383 | if (desc->Priority == D3D12_COMMAND_QUEUE_PRIORITY_GLOBAL_REALTIME) { | 3515 | if (desc->Priority == D3D12_COMMAND_QUEUE_PRIORITY_GLOBAL_REALTIME && !has_global_realtime_privilege()) { |
| 3384 | log_once("CreateCommandQueue refused (global realtime priority), type", desc->Type); | 3516 | log_once("CreateCommandQueue refused (global realtime priority), type", desc->Type); |
| 3385 | return d3d12_trace::result(method, DXGI_ERROR_ACCESS_DENIED); | 3517 | return d3d12_trace::result(method, DXGI_ERROR_ACCESS_DENIED); |
| 3386 | } | 3518 | } |
| @@ -3513,7 +3645,7 @@ public: | |||
| 3513 | auto& vk = state_.context->vk; | 3645 | auto& vk = state_.context->vk; |
| 3514 | if (desc && state_.context->xdxr_acceleration_structures()) { | 3646 | if (desc && state_.context->xdxr_acceleration_structures()) { |
| 3515 | // XDXR records: the layout depends only on the triangle or instance count (xdxr_build.h), so the sizes | 3647 | // XDXR records: the layout depends only on the triangle or instance count (xdxr_build.h), so the sizes |
| 3516 | // are exact. An update rebuilds the structure, so it needs the same scratch. | 3648 | // are exact. An update refits (no sort); the build's scratch size covers it. |
| 3517 | leonida::BuildAccelerationStructure build{}; | 3649 | leonida::BuildAccelerationStructure build{}; |
| 3518 | build.is_tlas = desc->Type == D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL; | 3650 | build.is_tlas = desc->Type == D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL; |
| 3519 | if (build.is_tlas) { | 3651 | if (build.is_tlas) { |
| @@ -3676,7 +3808,7 @@ public: | |||
| 3676 | return hand_out(signature, riid, out); | 3808 | return hand_out(signature, riid, out); |
| 3677 | } | 3809 | } |
| 3678 | 3810 | ||
| 3679 | // PC slot 11; the Xbox ABI reaches it through device slot 62 (the proxy forwards). | 3811 | // PC slot 11; the Xbox ABI reaches it through device slots 62 and 67 (the proxy forwards). |
| 3680 | HRESULT STDMETHODCALLTYPE CreateComputePipelineState(const D3D12_COMPUTE_PIPELINE_STATE_DESC* desc, REFIID riid, | 3812 | HRESULT STDMETHODCALLTYPE CreateComputePipelineState(const D3D12_COMPUTE_PIPELINE_STATE_DESC* desc, REFIID riid, |
| 3681 | void** out) override { | 3813 | void** out) override { |
| 3682 | if (!out) return E_POINTER; | 3814 | if (!out) return E_POINTER; |
| @@ -3705,6 +3837,19 @@ public: | |||
| 3705 | return hand_out(pipeline, riid, out); | 3837 | return hand_out(pipeline, riid, out); |
| 3706 | } | 3838 | } |
| 3707 | 3839 | ||
| 3840 | // Device1: in-memory pipeline library (docs/d3d12_vulkan.md sections 3.6 and 4). | ||
| 3841 | HRESULT STDMETHODCALLTYPE CreatePipelineLibrary(const void* blob, SIZE_T size, REFIID riid, void** out) override { | ||
| 3842 | constexpr auto method = "ID3D12Device1::CreatePipelineLibrary"; | ||
| 3843 | if (out) *out = nullptr; | ||
| 3844 | if (size > 0 && !blob) return d3d12_trace::result(method, E_INVALIDARG); | ||
| 3845 | if (size > 0 && !PipelineLibrary::valid_blob(blob, size)) | ||
| 3846 | return d3d12_trace::result(method, D3D12_ERROR_DRIVER_VERSION_MISMATCH); | ||
| 3847 | if (!out) return d3d12_trace::result(method, S_FALSE); | ||
| 3848 | auto* lib = new PipelineLibrary(); | ||
| 3849 | lib->attach_device(identity()); | ||
| 3850 | return d3d12_trace::result(method, hand_out(lib, riid, out)); | ||
| 3851 | } | ||
| 3852 | |||
| 3708 | UINT STDMETHODCALLTYPE GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE) override { | 3853 | UINT STDMETHODCALLTYPE GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE) override { |
| 3709 | return kDescriptorSize; | 3854 | return kDescriptorSize; |
| 3710 | } | 3855 | } |
| @@ -3763,13 +3908,16 @@ public: | |||
| 3763 | r->allows_view_format(vulkan_format(requested, false).format)); | 3908 | r->allows_view_format(vulkan_format(requested, false).format)); |
| 3764 | if (typeless_rgba8 || (requested != rd.Format && listed && | 3909 | if (typeless_rgba8 || (requested != rd.Format && listed && |
| 3765 | rd.Format == DXGI_FORMAT_R8G8B8A8_UNORM)) { | 3910 | rd.Format == DXGI_FORMAT_R8G8B8A8_UNORM)) { |
| 3766 | const bool plain = desc && desc->ViewDimension == D3D12_RTV_DIMENSION_TEXTURE2D; | 3911 | const bool msaa = rd.SampleDesc.Count > 1; |
| 3767 | const bool array = desc && desc->ViewDimension == D3D12_RTV_DIMENSION_TEXTURE2DARRAY; | 3912 | const bool plain = !msaa && desc && desc->ViewDimension == D3D12_RTV_DIMENSION_TEXTURE2D; |
| 3913 | const bool array = !msaa && desc && desc->ViewDimension == D3D12_RTV_DIMENSION_TEXTURE2DARRAY; | ||
| 3914 | const bool ms = msaa && desc && desc->ViewDimension == D3D12_RTV_DIMENSION_TEXTURE2DMS; | ||
| 3915 | const bool ms_array = msaa && desc && desc->ViewDimension == D3D12_RTV_DIMENSION_TEXTURE2DMSARRAY; | ||
| 3768 | const UINT plane = plain ? desc->Texture2D.PlaneSlice : | 3916 | const UINT plane = plain ? desc->Texture2D.PlaneSlice : |
| 3769 | array ? desc->Texture2DArray.PlaneSlice : 0; | 3917 | array ? desc->Texture2DArray.PlaneSlice : 0; |
| 3770 | // Subtraction keeps malformed layer ranges from overflowing during validation. | 3918 | // Subtraction keeps malformed layer ranges from overflowing during validation. |
| 3771 | if ((!plain && !array) || rd.Dimension != D3D12_RESOURCE_DIMENSION_TEXTURE2D || | 3919 | if ((!plain && !array && !ms && !ms_array) || rd.Dimension != D3D12_RESOURCE_DIMENSION_TEXTURE2D || |
| 3772 | rd.SampleDesc.Count != 1 || plane || !view.resource || view.mip >= rd.MipLevels || | 3920 | plane || !view.resource || view.mip >= rd.MipLevels || |
| 3773 | !view.layer_count || view.first_layer >= rd.DepthOrArraySize || | 3921 | !view.layer_count || view.first_layer >= rd.DepthOrArraySize || |
| 3774 | view.layer_count > rd.DepthOrArraySize - view.first_layer || | 3922 | view.layer_count > rd.DepthOrArraySize - view.first_layer || |
| 3775 | !(rd.Flags & D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET)) { | 3923 | !(rd.Flags & D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET)) { |
| @@ -3862,6 +4010,24 @@ public: | |||
| 3862 | std::size_t(count) * kDescriptorSize); | 4010 | std::size_t(count) * kDescriptorSize); |
| 3863 | } | 4011 | } |
| 3864 | 4012 | ||
| 4013 | // A constant-buffer view is a 16-byte GFX10 raw buffer V# in the first half of the slot (zeros in the rest). | ||
| 4014 | // A null description, zero address, or zero size leaves the whole slot zeroed (null V#: reads return 0). | ||
| 4015 | void STDMETHODCALLTYPE CreateConstantBufferView(const D3D12_CONSTANT_BUFFER_VIEW_DESC* desc, | ||
| 4016 | D3D12_CPU_DESCRIPTOR_HANDLE destination) override { | ||
| 4017 | d3d12_trace::record("ID3D12Device::CreateConstantBufferView"); | ||
| 4018 | if (!destination.ptr) return; | ||
| 4019 | std::memset(reinterpret_cast<void*>(destination.ptr), 0, kDescriptorSize); | ||
| 4020 | if (!desc || !desc->BufferLocation || !desc->SizeInBytes) return; | ||
| 4021 | leonida::gfx10::Buffer buffer{}; | ||
| 4022 | buffer.address = desc->BufferLocation; | ||
| 4023 | buffer.stride = 0; | ||
| 4024 | buffer.num_records = desc->SizeInBytes; | ||
| 4025 | buffer.format = leonida::gfx10::format_from_vulkan(VK_FORMAT_R32_UINT); | ||
| 4026 | buffer.oob_select = leonida::gfx10::OobSelect::raw; | ||
| 4027 | const leonida::gfx10::BufferWords words = leonida::gfx10::encode(buffer); | ||
| 4028 | std::memcpy(reinterpret_cast<void*>(destination.ptr), words.data(), sizeof(words)); | ||
| 4029 | } | ||
| 4030 | |||
| 3865 | // A shader-resource view of a texture is a T# in the slot (docs section 3.4): the shader loads those eight | 4031 | // A shader-resource view of a texture is a T# in the slot (docs section 3.4): the shader loads those eight |
| 3866 | // dwords through its descriptor table and finds the image by them. A slot left as zeros is a null descriptor: | 4032 | // dwords through its descriptor table and finds the image by them. A slot left as zeros is a null descriptor: |
| 3867 | // nothing is registered for it, so the shader gets the fallback image. Buffer views are not implemented. | 4033 | // nothing is registered for it, so the shader gets the fallback image. Buffer views are not implemented. |
| @@ -3885,9 +4051,10 @@ public: | |||
| 3885 | TextureView view{}; | 4051 | TextureView view{}; |
| 3886 | if (!desc) { | 4052 | if (!desc) { |
| 3887 | const bool array = r->desc().DepthOrArraySize > 1; | 4053 | const bool array = r->desc().DepthOrArraySize > 1; |
| 3888 | if (r->desc().Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE1D && !array) | 4054 | if (r->desc().Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE1D && !array) { |
| 3889 | view.type = ImageType::image_1d; | 4055 | view.type = ImageType::image_1d; |
| 3890 | else if (r->desc().Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D) | 4056 | view.layer_count = 1; |
| 4057 | } else if (r->desc().Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D) | ||
| 3891 | view.type = ImageType::image_3d; | 4058 | view.type = ImageType::image_3d; |
| 3892 | else if (r->desc().SampleDesc.Count > 1) | 4059 | else if (r->desc().SampleDesc.Count > 1) |
| 3893 | view.type = array ? ImageType::image_2d_msaa_array : ImageType::image_2d_msaa; | 4060 | view.type = array ? ImageType::image_2d_msaa_array : ImageType::image_2d_msaa; |
| @@ -3901,6 +4068,7 @@ public: | |||
| 3901 | view.type = ImageType::image_1d; | 4068 | view.type = ImageType::image_1d; |
| 3902 | view.first_mip = desc->Texture1D.MostDetailedMip; | 4069 | view.first_mip = desc->Texture1D.MostDetailedMip; |
| 3903 | view.mip_count = desc->Texture1D.MipLevels; | 4070 | view.mip_count = desc->Texture1D.MipLevels; |
| 4071 | view.layer_count = 1; | ||
| 3904 | view.min_lod = desc->Texture1D.ResourceMinLODClamp; | 4072 | view.min_lod = desc->Texture1D.ResourceMinLODClamp; |
| 3905 | break; | 4073 | break; |
| 3906 | case D3D12_SRV_DIMENSION_TEXTURE3D: | 4074 | case D3D12_SRV_DIMENSION_TEXTURE3D: |
| @@ -3957,6 +4125,95 @@ public: | |||
| 3957 | write_image_descriptor(*r, view, destination, false); | 4125 | write_image_descriptor(*r, view, destination, false); |
| 3958 | } | 4126 | } |
| 3959 | 4127 | ||
| 4128 | // An unordered-access view of a buffer is a V# in the slot (docs section 3.4): the shader loads those four dwords | ||
| 4129 | // through its descriptor table and reaches the bytes by the console VA in them. A structured view (format | ||
| 4130 | // UNKNOWN and a stride) is `stride` and a record count, a raw one (R32_TYPELESS with the RAW flag) is a byte count, | ||
| 4131 | // a typed one (any other format) is the format's GFX10_FORMAT code with the element size as the stride and an | ||
| 4132 | // element count: the V# a buffer_load_format / buffer_store_format / buffer_atomic reads (OOB_SELECT 1, so the | ||
| 4133 | // index is checked against NUM_RECORDS, docs/buffer_bounds.md). A slot left as zeros is a null descriptor. | ||
| 4134 | // A UAV counter (docs section 3.4, "UAV counters") is a second, raw V# of 4 bytes in the slot's upper 16 bytes: the | ||
| 4135 | // counter resource's address plus CounterOffsetInBytes. Append and consume are atomics a shader does on it. | ||
| 4136 | void write_buffer_uav(ID3D12Resource* resource, ID3D12Resource* counter, const D3D12_UNORDERED_ACCESS_VIEW_DESC* desc, | ||
| 4137 | D3D12_CPU_DESCRIPTOR_HANDLE destination) { | ||
| 4138 | namespace g = leonida::gfx10; | ||
| 4139 | const D3D12_RESOURCE_DESC& rd = Resource::from<Resource>(resource)->desc(); | ||
| 4140 | if (!(rd.Flags & D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS)) { | ||
| 4141 | log_once("unordered-access view of a buffer created without ALLOW_UNORDERED_ACCESS; flags", int(rd.Flags)); | ||
| 4142 | return; | ||
| 4143 | } | ||
| 4144 | if (!desc || desc->ViewDimension != D3D12_UAV_DIMENSION_BUFFER) { | ||
| 4145 | log_once("unordered-access view of a buffer needs a buffer view description; dimension", | ||
| 4146 | desc ? int(desc->ViewDimension) : -1); | ||
| 4147 | return; | ||
| 4148 | } | ||
| 4149 | const D3D12_BUFFER_UAV& view = desc->Buffer; | ||
| 4150 | const bool structured = desc->Format == DXGI_FORMAT_UNKNOWN; | ||
| 4151 | const bool raw = desc->Format == DXGI_FORMAT_R32_TYPELESS && (view.Flags & D3D12_BUFFER_UAV_FLAG_RAW); | ||
| 4152 | const bool typed = !structured && !raw; | ||
| 4153 | std::uint32_t format_code = 0, element_bytes = 0; | ||
| 4154 | g::Swizzle channels = g::identity_swizzle; | ||
| 4155 | if (typed) { | ||
| 4156 | // D3D12: a typed view has no RAW flag; its format is one of the typed-UAV formats the layer can name. | ||
| 4157 | const Format mapped = vulkan_format(desc->Format, false); | ||
| 4158 | const auto* layout = mapped.format != VK_FORMAT_UNDEFINED && !mapped.typeless && !mapped.rgb96 && | ||
| 4159 | !(view.Flags & D3D12_BUFFER_UAV_FLAG_RAW) | ||
| 4160 | ? leonida::uav_clear::layout(mapped.format) | ||
| 4161 | : nullptr; | ||
| 4162 | format_code = layout ? g::format_from_vulkan(mapped.format) : 0; | ||
| 4163 | if (!format_code || format_code >= 128) { // the V#'s FORMAT is 7 bits | ||
| 4164 | log_once("typed buffer unordered-access view format not supported; format", int(desc->Format)); | ||
| 4165 | return; | ||
| 4166 | } | ||
| 4167 | element_bytes = layout->bytes; | ||
| 4168 | channels = g::format_swizzle(mapped.format); | ||
| 4169 | } | ||
| 4170 | const UINT64 unit = structured ? view.StructureByteStride : typed ? element_bytes : 4; | ||
| 4171 | if (!unit || unit > 0x3fff || view.FirstElement > rd.Width / unit || | ||
| 4172 | (UINT64(view.FirstElement) + view.NumElements) > rd.Width / unit || | ||
| 4173 | UINT64(view.NumElements) * (structured || typed ? 1 : 4) > ~0u) { | ||
| 4174 | log_once("unordered-access view of a buffer outside the resource or with a bad stride; elements", | ||
| 4175 | int(view.NumElements)); | ||
| 4176 | return; | ||
| 4177 | } | ||
| 4178 | // D3D12: a counter belongs to a structured view and sits in a buffer that allows unordered access, 4096-byte | ||
| 4179 | // aligned with room for its 4 bytes; with no counter resource the offset is 0. | ||
| 4180 | if (counter || view.CounterOffsetInBytes) { | ||
| 4181 | const Resource* c = counter ? Resource::from<Resource>(counter) : nullptr; | ||
| 4182 | const bool valid = c && !c->image() && structured && | ||
| 4183 | (c->desc().Flags & D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS) && | ||
| 4184 | !(view.CounterOffsetInBytes % D3D12_UAV_COUNTER_PLACEMENT_ALIGNMENT) && | ||
| 4185 | UINT64(view.CounterOffsetInBytes) + 4 <= c->desc().Width; | ||
| 4186 | if (!valid) { | ||
| 4187 | log_once("unordered-access view counter refused (a structured view, a buffer that allows unordered " | ||
| 4188 | "access, a 4096-aligned offset inside it); offset", | ||
| 4189 | int(view.CounterOffsetInBytes)); | ||
| 4190 | return; | ||
| 4191 | } | ||
| 4192 | } | ||
| 4193 | const UINT64 va = resource->GetGPUVirtualAddress(); | ||
| 4194 | const UINT64 counter_va = counter ? counter->GetGPUVirtualAddress() : 0; | ||
| 4195 | if (!va || (counter && !counter_va)) return; | ||
| 4196 | g::Buffer buffer{}; | ||
| 4197 | buffer.address = va + view.FirstElement * unit; | ||
| 4198 | buffer.stride = structured || typed ? std::uint32_t(unit) : 0; | ||
| 4199 | buffer.num_records = std::uint32_t(structured || typed ? view.NumElements : UINT64(view.NumElements) * 4); | ||
| 4200 | buffer.format = format_code; | ||
| 4201 | buffer.swizzle = channels; | ||
| 4202 | buffer.oob_select = typed ? g::OobSelect::structured | ||
| 4203 | : structured ? g::OobSelect::structured_with_offset : g::OobSelect::raw; | ||
| 4204 | const g::BufferWords words = g::encode(buffer); | ||
| 4205 | std::memcpy(reinterpret_cast<void*>(destination.ptr), words.data(), sizeof(words)); | ||
| 4206 | if (counter) { | ||
| 4207 | g::Buffer counter_buffer{}; | ||
| 4208 | counter_buffer.address = counter_va + view.CounterOffsetInBytes; | ||
| 4209 | counter_buffer.num_records = 4; | ||
| 4210 | counter_buffer.oob_select = g::OobSelect::raw; | ||
| 4211 | const g::BufferWords counter_words = g::encode(counter_buffer); | ||
| 4212 | std::memcpy(reinterpret_cast<char*>(destination.ptr) + sizeof(words), counter_words.data(), | ||
| 4213 | sizeof(counter_words)); | ||
| 4214 | } | ||
| 4215 | } | ||
| 4216 | |||
| 3960 | // An unordered-access view of a texture is a T# too, of one mip; set 0 also holds it as a storage image. | 4217 | // An unordered-access view of a texture is a T# too, of one mip; set 0 also holds it as a storage image. |
| 3961 | void STDMETHODCALLTYPE CreateUnorderedAccessView(ID3D12Resource* resource, ID3D12Resource* counter, | 4218 | void STDMETHODCALLTYPE CreateUnorderedAccessView(ID3D12Resource* resource, ID3D12Resource* counter, |
| 3962 | const D3D12_UNORDERED_ACCESS_VIEW_DESC* desc, | 4219 | const D3D12_UNORDERED_ACCESS_VIEW_DESC* desc, |
| @@ -3969,7 +4226,11 @@ public: | |||
| 3969 | if (resource) stub("ID3D12Device::CreateUnorderedAccessView(resource from another device)"); | 4226 | if (resource) stub("ID3D12Device::CreateUnorderedAccessView(resource from another device)"); |
| 3970 | return; | 4227 | return; |
| 3971 | } | 4228 | } |
| 3972 | if (!r->image() || counter) return stub("ID3D12Device::CreateUnorderedAccessView(buffer)"); | 4229 | if (!r->image()) return write_buffer_uav(resource, counter, desc, destination); |
| 4230 | if (counter) { | ||
| 4231 | log_once("unordered-access view of a texture with a counter resource; dimension", int(r->desc().Dimension)); | ||
| 4232 | return; | ||
| 4233 | } | ||
| 3973 | if (!(r->desc().Flags & D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS)) { | 4234 | if (!(r->desc().Flags & D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS)) { |
| 3974 | log_once("unordered-access view of a texture created without ALLOW_UNORDERED_ACCESS; flags", | 4235 | log_once("unordered-access view of a texture created without ALLOW_UNORDERED_ACCESS; flags", |
| 3975 | int(r->desc().Flags)); | 4236 | int(r->desc().Flags)); |
| @@ -4005,6 +4266,7 @@ public: | |||
| 4005 | return; | 4266 | return; |
| 4006 | } | 4267 | } |
| 4007 | write_image_descriptor(*r, view, destination, true); | 4268 | write_image_descriptor(*r, view, destination, true); |
| 4269 | state_.context->note_storage_image(r->id()); | ||
| 4008 | } | 4270 | } |
| 4009 | 4271 | ||
| 4010 | // A sampler is an S# in the first 16 bytes of the slot; the shader finds the sampler by those four dwords. | 4272 | // A sampler is an S# in the first 16 bytes of the slot; the shader finds the sampler by those four dwords. |
| @@ -4238,7 +4500,11 @@ public: | |||
| 4238 | // 64 KiB-aligned offset is simply that offset into the arena, and its console VA is the heap's place plus it. | 4500 | // 64 KiB-aligned offset is simply that offset into the arena, and its console VA is the heap's place plus it. |
| 4239 | HRESULT STDMETHODCALLTYPE CreateHeap(const D3D12_HEAP_DESC* desc, REFIID riid, void** out) override { | 4501 | HRESULT STDMETHODCALLTYPE CreateHeap(const D3D12_HEAP_DESC* desc, REFIID riid, void** out) override { |
| 4240 | if (out) *out = nullptr; | 4502 | if (out) *out = nullptr; |
| 4241 | if (!desc || !desc->SizeInBytes) return E_INVALIDARG; | 4503 | if (!desc) return E_INVALIDARG; |
| 4504 | if (const char* why = heap_desc_refusal(*desc)) { | ||
| 4505 | log_once((std::string("CreateHeap refused (") + why + "), heap type").c_str(), int(desc->Properties.Type)); | ||
| 4506 | return E_INVALIDARG; | ||
| 4507 | } | ||
| 4242 | if (!state_.arena.mapped) { | 4508 | if (!state_.arena.mapped) { |
| 4243 | log_once("heaps need the GPU address arena (bufferDeviceAddress); heap size in KiB:", | 4509 | log_once("heaps need the GPU address arena (bufferDeviceAddress); heap size in KiB:", |
| 4244 | int(desc->SizeInBytes / 1024)); | 4510 | int(desc->SizeInBytes / 1024)); |
| @@ -4258,6 +4524,18 @@ public: | |||
| 4258 | return hand_out(heap, riid, out); | 4524 | return hand_out(heap, riid, out); |
| 4259 | } | 4525 | } |
| 4260 | 4526 | ||
| 4527 | // Device4: CreateHeap with a protected session, which is refused as CreateCommittedResource1 refuses one. The host | ||
| 4528 | // gives the same answers as CreateHeap for the D3D-238 descriptions. | ||
| 4529 | HRESULT STDMETHODCALLTYPE CreateHeap1(const D3D12_HEAP_DESC* desc, ID3D12ProtectedResourceSession* session, | ||
| 4530 | REFIID riid, void** out) override { | ||
| 4531 | if (out) *out = nullptr; | ||
| 4532 | if (session) { | ||
| 4533 | log_once("protected resource session refused (not supported) by CreateHeap1", 1); | ||
| 4534 | return E_INVALIDARG; | ||
| 4535 | } | ||
| 4536 | return CreateHeap(desc, riid, out); | ||
| 4537 | } | ||
| 4538 | |||
| 4261 | HRESULT STDMETHODCALLTYPE CreatePlacedResource(ID3D12Heap* heap_interface, UINT64 heap_offset, | 4539 | HRESULT STDMETHODCALLTYPE CreatePlacedResource(ID3D12Heap* heap_interface, UINT64 heap_offset, |
| 4262 | const D3D12_RESOURCE_DESC* desc, D3D12_RESOURCE_STATES, | 4540 | const D3D12_RESOURCE_DESC* desc, D3D12_RESOURCE_STATES, |
| 4263 | const D3D12_CLEAR_VALUE*, REFIID riid, void** out) override { | 4541 | const D3D12_CLEAR_VALUE*, REFIID riid, void** out) override { |
| @@ -4310,26 +4588,35 @@ public: | |||
| 4310 | return E_INVALIDARG; | 4588 | return E_INVALIDARG; |
| 4311 | } | 4589 | } |
| 4312 | const bool tiled = is_tiled_layout(desc->Layout); | 4590 | const bool tiled = is_tiled_layout(desc->Layout); |
| 4591 | const bool msaa = desc->SampleDesc.Count > 1; | ||
| 4313 | if (desc->Dimension == D3D12_RESOURCE_DIMENSION_BUFFER) { | 4592 | if (desc->Dimension == D3D12_RESOURCE_DIMENSION_BUFFER) { |
| 4593 | if (heap->flags() & D3D12_HEAP_FLAG_DENY_BUFFERS) return E_INVALIDARG; | ||
| 4314 | if (desc->Layout != D3D12_TEXTURE_LAYOUT_ROW_MAJOR) return E_INVALIDARG; | 4594 | if (desc->Layout != D3D12_TEXTURE_LAYOUT_ROW_MAJOR) return E_INVALIDARG; |
| 4315 | if (desc->Width > heap->bytes() || heap_offset > heap->bytes() - desc->Width) return E_INVALIDARG; | 4595 | if (desc->Width > heap->bytes() || heap_offset > heap->bytes() - desc->Width) return E_INVALIDARG; |
| 4316 | } else if (heap_offset >= heap->bytes()) { | 4596 | } else { |
| 4317 | return E_INVALIDARG; | ||
| 4318 | } | ||
| 4319 | if (tiled) { | ||
| 4320 | if (heap->properties().Type == D3D12_HEAP_TYPE_UPLOAD || | 4597 | if (heap->properties().Type == D3D12_HEAP_TYPE_UPLOAD || |
| 4321 | heap->properties().Type == D3D12_HEAP_TYPE_READBACK) | 4598 | heap->properties().Type == D3D12_HEAP_TYPE_READBACK) |
| 4322 | return E_INVALIDARG; | 4599 | return E_INVALIDARG; |
| 4323 | if (desc->Dimension != D3D12_RESOURCE_DIMENSION_TEXTURE2D && | 4600 | const bool rt_ds = (desc->Flags & (D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET | |
| 4324 | desc->Dimension != D3D12_RESOURCE_DIMENSION_TEXTURE3D) | 4601 | D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL)) != 0; |
| 4325 | return E_INVALIDARG; | 4602 | if (rt_ds && (heap->flags() & D3D12_HEAP_FLAG_DENY_RT_DS_TEXTURES)) return E_INVALIDARG; |
| 4326 | const D3D12_RESOURCE_ALLOCATION_INFO alloc = allocation(*desc); | 4603 | if (!rt_ds && (heap->flags() & D3D12_HEAP_FLAG_DENY_NON_RT_DS_TEXTURES)) return E_INVALIDARG; |
| 4327 | if (alloc.SizeInBytes == UINT64_MAX || alloc.SizeInBytes > heap->bytes() || | 4604 | if (tiled || msaa) { |
| 4328 | heap_offset > heap->bytes() - alloc.SizeInBytes) | 4605 | if (tiled && desc->Dimension != D3D12_RESOURCE_DIMENSION_TEXTURE2D && |
| 4606 | desc->Dimension != D3D12_RESOURCE_DIMENSION_TEXTURE3D) | ||
| 4607 | return E_INVALIDARG; | ||
| 4608 | if (msaa && desc->Dimension != D3D12_RESOURCE_DIMENSION_TEXTURE2D) return E_INVALIDARG; | ||
| 4609 | const D3D12_RESOURCE_ALLOCATION_INFO alloc = allocation(*desc); | ||
| 4610 | if (alloc.SizeInBytes == UINT64_MAX || heap->alignment() < alloc.Alignment || | ||
| 4611 | heap_offset % alloc.Alignment || alloc.SizeInBytes > heap->bytes() || | ||
| 4612 | heap_offset > heap->bytes() - alloc.SizeInBytes) | ||
| 4613 | return E_INVALIDARG; | ||
| 4614 | if (tiled && static_cast<UINT>(desc->Layout) == kXboxTiledLayout) { | ||
| 4615 | log_once("placed resource with the Xbox tiled layout, as 64KB_UNDEFINED_SWIZZLE; dimension", | ||
| 4616 | int(desc->Dimension)); | ||
| 4617 | } | ||
| 4618 | } else if (heap_offset >= heap->bytes()) { | ||
| 4329 | return E_INVALIDARG; | 4619 | return E_INVALIDARG; |
| 4330 | if (static_cast<UINT>(desc->Layout) == kXboxTiledLayout) { | ||
| 4331 | log_once("placed resource with the Xbox tiled layout, as 64KB_UNDEFINED_SWIZZLE; dimension", | ||
| 4332 | int(desc->Dimension)); | ||
| 4333 | } | 4620 | } |
| 4334 | } | 4621 | } |
| 4335 | // Only buffers are addressable, as in D3D12: a placed texture keeps a null VA and its own Vulkan image. | 4622 | // Only buffers are addressable, as in D3D12: a placed texture keeps a null VA and its own Vulkan image. |
| @@ -4341,8 +4628,6 @@ public: | |||
| 4341 | hr = resource->create_placed_buffer(); | 4628 | hr = resource->create_placed_buffer(); |
| 4342 | } else if (!tiled && desc->Dimension != D3D12_RESOURCE_DIMENSION_TEXTURE2D) { | 4629 | } else if (!tiled && desc->Dimension != D3D12_RESOURCE_DIMENSION_TEXTURE2D) { |
| 4343 | log_once("placed resource dimension not supported:", int(desc->Dimension)); | 4630 | log_once("placed resource dimension not supported:", int(desc->Dimension)); |
| 4344 | } else if (desc->SampleDesc.Count > 1) { | ||
| 4345 | log_once("multisampled placed resource not supported; samples", int(desc->SampleDesc.Count)); | ||
| 4346 | } else { | 4631 | } else { |
| 4347 | hr = S_OK; | 4632 | hr = S_OK; |
| 4348 | const Format format = state_.texture_format(*desc); | 4633 | const Format format = state_.texture_format(*desc); |
| @@ -5109,21 +5394,19 @@ private: | |||
| 5109 | D3D12_RESOURCE_DESC resolved = desc; | 5394 | D3D12_RESOURCE_DESC resolved = desc; |
| 5110 | if (!resolved.MipLevels) resolved.MipLevels = full; | 5395 | if (!resolved.MipLevels) resolved.MipLevels = full; |
| 5111 | if (resolved.MipLevels > full) return kInvalidAllocation; | 5396 | if (resolved.MipLevels > full) return kInvalidAllocation; |
| 5112 | if (samples > 1 && (volume || one_d || resolved.MipLevels != 1 || | 5397 | const bool depth_stencil = desc.Flags & D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL; |
| 5398 | if (samples > 1 && (volume || one_d || resolved.MipLevels != 1 || !(desc.Flags & attachment) || | ||
| 5399 | (desc.Flags & attachment) == attachment || | ||
| 5113 | (desc.Flags & D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS))) | 5400 | (desc.Flags & D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS))) |
| 5114 | return kInvalidAllocation; | 5401 | return kInvalidAllocation; |
| 5115 | // The PC runtime: simultaneous access only single-sampled and without depth-stencil, and no volume depth. | 5402 | // The PC runtime: simultaneous access only single-sampled and without depth-stencil, and no volume depth. |
| 5116 | const bool depth_stencil = desc.Flags & D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL; | ||
| 5117 | if (((desc.Flags & D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS) && (depth_stencil || samples > 1)) || | 5403 | if (((desc.Flags & D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS) && (depth_stencil || samples > 1)) || |
| 5118 | (volume && depth_stencil)) | 5404 | (volume && depth_stencil)) |
| 5119 | return kInvalidAllocation; | 5405 | return kInvalidAllocation; |
| 5120 | const bool tiled = is_tiled_layout(desc.Layout); | 5406 | const bool tiled = is_tiled_layout(desc.Layout); |
| 5121 | if (tiled) { | 5407 | if (tiled) { |
| 5122 | if (one_d) return kInvalidAllocation; | 5408 | if (one_d || (samples > 1 && samples != 4)) return kInvalidAllocation; |
| 5123 | if (desc.Alignment && desc.Alignment != align_64k) return kInvalidAllocation; | 5409 | if (desc.Alignment && desc.Alignment != align_64k) return kInvalidAllocation; |
| 5124 | // Tiled MSAA is 4x single-mip 2D attachment only (measured on RTX 5070 Ti and WARP). | ||
| 5125 | if (samples > 1 && (samples != 4 || !(desc.Flags & attachment) || (desc.Flags & attachment) == attachment)) | ||
| 5126 | return kInvalidAllocation; | ||
| 5127 | } else if (desc.Layout != D3D12_TEXTURE_LAYOUT_UNKNOWN) { | 5410 | } else if (desc.Layout != D3D12_TEXTURE_LAYOUT_UNKNOWN) { |
| 5128 | log_once("GetResourceAllocationInfo layout as UNKNOWN:", desc.Layout); | 5411 | log_once("GetResourceAllocationInfo layout as UNKNOWN:", desc.Layout); |
| 5129 | } | 5412 | } |
| @@ -5186,12 +5469,10 @@ private: | |||
| 5186 | if (!image_descriptor(resource, view, image)) return; | 5469 | if (!image_descriptor(resource, view, image)) return; |
| 5187 | const leonida::gfx10::ImageWords words = leonida::gfx10::encode(image); | 5470 | const leonida::gfx10::ImageWords words = leonida::gfx10::encode(image); |
| 5188 | const bool registered = state_.bind_image(words, image, resource.image(), resource.format(), | 5471 | const bool registered = state_.bind_image(words, image, resource.image(), resource.format(), |
| 5189 | resource.aspects(), storage, false, | 5472 | resource.aspects(), storage, resource.has_view_format_list(), |
| 5190 | resource.r9g9b9e5_as_r32_uint()); | 5473 | resource.r9g9b9e5_as_r32_uint()); |
| 5191 | if (leonida::gfx10::multisampled(image.type) && !registered) return; | 5474 | if (leonida::gfx10::multisampled(image.type) && !registered) return; |
| 5192 | std::memcpy(reinterpret_cast<void*>(destination.ptr), words.data(), sizeof(words)); | 5475 | std::memcpy(reinterpret_cast<void*>(destination.ptr), words.data(), sizeof(words)); |
| 5193 | state_.bind_image(words, image, resource.image(), resource.format(), resource.aspects(), storage, | ||
| 5194 | resource.has_view_format_list(), resource.r9g9b9e5_as_r32_uint()); | ||
| 5195 | } | 5476 | } |
| 5196 | 5477 | ||
| 5197 | // Shared by CreateCommittedResource and CreateCommittedResource3. A castable-format list is only meaningful on | 5478 | // Shared by CreateCommittedResource and CreateCommittedResource3. A castable-format list is only meaningful on |
| @@ -5741,7 +6022,8 @@ HRESULT create_dxgi_factory(ID3D12Device* device, REFIID riid, void** out) { | |||
| 5741 | i.queue_family, riid, out); | 6022 | i.queue_family, riid, out); |
| 5742 | } | 6023 | } |
| 5743 | 6024 | ||
| 5744 | // Creates its own Vulkan 1.3 instance and device. LEONIDA_VK_VALIDATION=1 adds VK_LAYER_KHRONOS_validation. | 6025 | // Creates its own Vulkan instance and a Vulkan 1.3 device, or a 1.2 device with VK_KHR_dynamic_rendering and |
| 6026 | // VK_KHR_synchronization2 (vulkan13_features.h). LEONIDA_VK_VALIDATION=1 adds VK_LAYER_KHRONOS_validation. | ||
| 5745 | HRESULT create_vulkan_device_standalone(REFIID riid, void** out) { | 6027 | HRESULT create_vulkan_device_standalone(REFIID riid, void** out) { |
| 5746 | if (!out) return E_POINTER; | 6028 | if (!out) return E_POINTER; |
| 5747 | *out = nullptr; | 6029 | *out = nullptr; |
| @@ -5854,22 +6136,21 @@ HRESULT create_vulkan_device_standalone(REFIID riid, void** out) { | |||
| 5854 | bool chosen_bc = false; | 6136 | bool chosen_bc = false; |
| 5855 | VkPhysicalDeviceFeatures chosen_features{}; | 6137 | VkPhysicalDeviceFeatures chosen_features{}; |
| 5856 | VkPhysicalDeviceVulkan12Features chosen12{}; | 6138 | VkPhysicalDeviceVulkan12Features chosen12{}; |
| 5857 | VkPhysicalDeviceVulkan13Features chosen13{}; | ||
| 5858 | bool chosen_draw_params = false; | 6139 | bool chosen_draw_params = false; |
| 6140 | leonida::Vulkan13Features v13, candidate13; | ||
| 5859 | for (VkPhysicalDevice candidate : physicals) { | 6141 | for (VkPhysicalDevice candidate : physicals) { |
| 5860 | VkPhysicalDeviceProperties props{}; | 6142 | VkPhysicalDeviceProperties props{}; |
| 5861 | vkGetPhysicalDeviceProperties(candidate, &props); | 6143 | vkGetPhysicalDeviceProperties(candidate, &props); |
| 5862 | if (props.apiVersion < VK_API_VERSION_1_3 || !leonida::vulkan_device_wanted(props.deviceName)) continue; | 6144 | if (!leonida::vulkan_device_wanted(props.deviceName)) continue; |
| 5863 | VkPhysicalDeviceVulkan13Features f13{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES}; | 6145 | candidate13.query(candidate, props.apiVersion, vkGetPhysicalDeviceFeatures2, vkEnumerateDeviceExtensionProperties); |
| 5864 | VkPhysicalDeviceVulkan11Features f11{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES, &f13}; | 6146 | if (!candidate13.usable()) continue; |
| 6147 | VkPhysicalDeviceVulkan11Features f11{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES}; | ||
| 5865 | VkPhysicalDeviceVulkan12Features f12{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES, &f11}; | 6148 | VkPhysicalDeviceVulkan12Features f12{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES, &f11}; |
| 5866 | VkPhysicalDeviceFeatures2 features{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, &f12}; | 6149 | VkPhysicalDeviceFeatures2 features{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, &f12}; |
| 5867 | vkGetPhysicalDeviceFeatures2(candidate, &features); | 6150 | vkGetPhysicalDeviceFeatures2(candidate, &features); |
| 5868 | const bool bc = features.features.textureCompressionBC; | 6151 | const bool bc = features.features.textureCompressionBC; |
| 5869 | const bool draw_params = f11.shaderDrawParameters; | 6152 | const bool draw_params = f11.shaderDrawParameters; |
| 5870 | if (!f13.dynamicRendering || !f13.synchronization2 || !f12.timelineSemaphore || | 6153 | if (!f12.timelineSemaphore || !f12.separateDepthStencilLayouts || !f12.bufferDeviceAddress) continue; |
| 5871 | !f12.separateDepthStencilLayouts || !f12.bufferDeviceAddress) | ||
| 5872 | continue; | ||
| 5873 | std::uint32_t family_count = 0; | 6154 | std::uint32_t family_count = 0; |
| 5874 | vkGetPhysicalDeviceQueueFamilyProperties(candidate, &family_count, nullptr); | 6155 | vkGetPhysicalDeviceQueueFamilyProperties(candidate, &family_count, nullptr); |
| 5875 | std::vector<VkQueueFamilyProperties> families(family_count); | 6156 | std::vector<VkQueueFamilyProperties> families(family_count); |
| @@ -5883,18 +6164,22 @@ HRESULT create_vulkan_device_standalone(REFIID riid, void** out) { | |||
| 5883 | chosen_bc = bc; | 6164 | chosen_bc = bc; |
| 5884 | chosen_features = features.features; | 6165 | chosen_features = features.features; |
| 5885 | chosen12 = f12; | 6166 | chosen12 = f12; |
| 5886 | chosen13 = f13; | ||
| 5887 | chosen_draw_params = draw_params; | 6167 | chosen_draw_params = draw_params; |
| 6168 | v13.choose(candidate13); | ||
| 5888 | } | 6169 | } |
| 5889 | break; | 6170 | break; |
| 5890 | } | 6171 | } |
| 5891 | } | 6172 | } |
| 5892 | if (!info.physical) | 6173 | if (!info.physical) |
| 5893 | return fail(leonida::vulkan_device_filter().empty() | 6174 | return fail(leonida::vulkan_device_filter().empty() |
| 5894 | ? "no Vulkan 1.3 GPU with dynamicRendering, synchronization2, timelineSemaphore and " | 6175 | ? "no Vulkan 1.3 GPU (or 1.2 with VK_KHR_dynamic_rendering and VK_KHR_synchronization2) with " |
| 5895 | "separateDepthStencilLayouts" | 6176 | "dynamicRendering, synchronization2, timelineSemaphore and separateDepthStencilLayouts" |
| 5896 | : "no GPU named by LEONIDA_VK_DEVICE has Vulkan 1.3 with dynamicRendering, synchronization2, " | 6177 | : "no GPU named by LEONIDA_VK_DEVICE has Vulkan 1.3 (or 1.2 with VK_KHR_dynamic_rendering and " |
| 5897 | "timelineSemaphore and separateDepthStencilLayouts"); | 6178 | "VK_KHR_synchronization2) with dynamicRendering, synchronization2, timelineSemaphore and " |
| 6179 | "separateDepthStencilLayouts"); | ||
| 6180 | if (!v13.core) | ||
| 6181 | std::fprintf(stderr, "[rt] d3d12: Vulkan 1.2 device: dynamicRendering and synchronization2 through their KHR " | ||
| 6182 | "extensions\n"); | ||
| 5898 | 6183 | ||
| 5899 | // VK_EXT_conditional_rendering for SetPredication, VK_KHR_swapchain for DXGI presentation, and optional | 6184 | // VK_EXT_conditional_rendering for SetPredication, VK_KHR_swapchain for DXGI presentation, and optional |
| 5900 | // VK_KHR_acceleration_structure + VK_KHR_ray_query for hardware BVH builds (BLAS + TLAS). | 6185 | // VK_KHR_acceleration_structure + VK_KHR_ray_query for hardware BVH builds (BLAS + TLAS). |
| @@ -5964,17 +6249,13 @@ HRESULT create_vulkan_device_standalone(REFIID riid, void** out) { | |||
| 5964 | ext_chain = &enable_conditional; | 6249 | ext_chain = &enable_conditional; |
| 5965 | } | 6250 | } |
| 5966 | 6251 | ||
| 5967 | VkPhysicalDeviceVulkan13Features enable13{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES, ext_chain}; | ||
| 5968 | enable13.dynamicRendering = VK_TRUE; | ||
| 5969 | enable13.synchronization2 = VK_TRUE; | ||
| 5970 | // Subgroup size control: a pipeline stage asks for the size its shader was translated for (src/subgroup_size.h). | 6252 | // Subgroup size control: a pipeline stage asks for the size its shader was translated for (src/subgroup_size.h). |
| 5971 | enable13.subgroupSizeControl = chosen13.subgroupSizeControl; | 6253 | leonida::query_subgroup_size_caps(vkGetPhysicalDeviceProperties2, info.physical, v13.subgroup_size_control, |
| 5972 | enable13.computeFullSubgroups = chosen13.computeFullSubgroups; | 6254 | v13.compute_full_subgroups, info.subgroup); |
| 5973 | leonida::query_subgroup_size_caps(vkGetPhysicalDeviceProperties2, info.physical, chosen13.subgroupSizeControl, | ||
| 5974 | chosen13.computeFullSubgroups, info.subgroup); | ||
| 5975 | // Translated vertex shaders read BaseVertex / BaseInstance (SPIR-V DrawParameters) to give v0 / v3 the | 6255 | // Translated vertex shaders read BaseVertex / BaseInstance (SPIR-V DrawParameters) to give v0 / v3 the |
| 5976 | // hardware's zero-based vertex and instance ids (docs/design.md, Inputs and outputs). | 6256 | // hardware's zero-based vertex and instance ids (docs/design.md, Inputs and outputs). |
| 5977 | VkPhysicalDeviceVulkan11Features enable11{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES, &enable13}; | 6257 | VkPhysicalDeviceVulkan11Features enable11{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES, |
| 6258 | v13.enable(ext_chain)}; | ||
| 5978 | enable11.shaderDrawParameters = chosen_draw_params ? VK_TRUE : VK_FALSE; | 6259 | enable11.shaderDrawParameters = chosen_draw_params ? VK_TRUE : VK_FALSE; |
| 5979 | if (!chosen_draw_params) std::fprintf(stderr, "[rt] d3d12: the GPU has no shaderDrawParameters\n"); | 6260 | if (!chosen_draw_params) std::fprintf(stderr, "[rt] d3d12: the GPU has no shaderDrawParameters\n"); |
| 5980 | VkPhysicalDeviceVulkan12Features enable12{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES, &enable11}; | 6261 | VkPhysicalDeviceVulkan12Features enable12{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES, &enable11}; |
| @@ -6047,8 +6328,8 @@ HRESULT create_vulkan_device_standalone(REFIID riid, void** out) { | |||
| 6047 | vkGetPhysicalDeviceFeatures2(info.physical, &query); | 6328 | vkGetPhysicalDeviceFeatures2(info.physical, &query); |
| 6048 | info.image_view_min_lod = min_lod.minLod == VK_TRUE; | 6329 | info.image_view_min_lod = min_lod.minLod == VK_TRUE; |
| 6049 | if (info.image_view_min_lod) { | 6330 | if (info.image_view_min_lod) { |
| 6050 | min_lod.pNext = enable13.pNext; | 6331 | min_lod.pNext = *v13.next(); |
| 6051 | enable13.pNext = &min_lod; | 6332 | *v13.next() = &min_lod; |
| 6052 | } | 6333 | } |
| 6053 | } | 6334 | } |
| 6054 | VkPhysicalDeviceHostImageCopyFeaturesEXT host_copy{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES_EXT}; | 6335 | VkPhysicalDeviceHostImageCopyFeaturesEXT host_copy{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES_EXT}; |
| @@ -6059,8 +6340,8 @@ HRESULT create_vulkan_device_standalone(REFIID riid, void** out) { | |||
| 6059 | const char* host_image_copy_name = VK_EXT_HOST_IMAGE_COPY_EXTENSION_NAME; | 6340 | const char* host_image_copy_name = VK_EXT_HOST_IMAGE_COPY_EXTENSION_NAME; |
| 6060 | info.host_image_copy = has_host_image_copy && host_copy.hostImageCopy; | 6341 | info.host_image_copy = has_host_image_copy && host_copy.hostImageCopy; |
| 6061 | if (info.host_image_copy) { | 6342 | if (info.host_image_copy) { |
| 6062 | host_copy.pNext = enable13.pNext; // after the conditional rendering features, if any | 6343 | host_copy.pNext = *v13.next(); // after the conditional rendering features, if any |
| 6063 | enable13.pNext = &host_copy; | 6344 | *v13.next() = &host_copy; |
| 6064 | } else { | 6345 | } else { |
| 6065 | std::fprintf(stderr, "[rt] d3d12: no VK_EXT_host_image_copy; CPU texture copies use a staging submit\n"); | 6346 | std::fprintf(stderr, "[rt] d3d12: no VK_EXT_host_image_copy; CPU texture copies use a staging submit\n"); |
| 6066 | } | 6347 | } |
| @@ -6077,8 +6358,8 @@ HRESULT create_vulkan_device_standalone(REFIID riid, void** out) { | |||
| 6077 | vkGetPhysicalDeviceFeatures2(info.physical, &query); | 6358 | vkGetPhysicalDeviceFeatures2(info.physical, &query); |
| 6078 | info.shader_fma = shader_fma.shaderFmaFloat32 == VK_TRUE; | 6359 | info.shader_fma = shader_fma.shaderFmaFloat32 == VK_TRUE; |
| 6079 | if (info.shader_fma) { | 6360 | if (info.shader_fma) { |
| 6080 | shader_fma.pNext = enable13.pNext; | 6361 | shader_fma.pNext = *v13.next(); |
| 6081 | enable13.pNext = &shader_fma; | 6362 | *v13.next() = &shader_fma; |
| 6082 | } | 6363 | } |
| 6083 | } | 6364 | } |
| 6084 | #endif | 6365 | #endif |
| @@ -6113,9 +6394,10 @@ HRESULT create_vulkan_device_standalone(REFIID riid, void** out) { | |||
| 6113 | // Switching a vsync swapchain to IMMEDIATE or FIFO_RELAXED per present (PresentX's ImmediateThresholdPercent): | 6394 | // Switching a vsync swapchain to IMMEDIATE or FIFO_RELAXED per present (PresentX's ImmediateThresholdPercent): |
| 6114 | // the KHR extension (promoted from the EXT one, same structures) with the surface extension of the same name | 6395 | // the KHR extension (promoted from the EXT one, same structures) with the surface extension of the same name |
| 6115 | // on the instance, else the EXT one. Only enabled where the instance has the surface half and the GPU the feature. | 6396 | // on the instance, else the EXT one. Only enabled where the instance has the surface half and the GPU the feature. |
| 6397 | const char* swapchain_m1_name = nullptr; | ||
| 6398 | #if defined(VK_KHR_swapchain_maintenance1) | ||
| 6116 | VkPhysicalDeviceSwapchainMaintenance1FeaturesKHR swapchain_m1{ | 6399 | VkPhysicalDeviceSwapchainMaintenance1FeaturesKHR swapchain_m1{ |
| 6117 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_KHR}; | 6400 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_KHR}; |
| 6118 | const char* swapchain_m1_name = nullptr; | ||
| 6119 | if (has_swapchain && instance_has_surface) { | 6401 | if (has_swapchain && instance_has_surface) { |
| 6120 | const auto device_has = [&](const char* name) { | 6402 | const auto device_has = [&](const char* name) { |
| 6121 | return std::any_of(extensions.begin(), extensions.end(), | 6403 | return std::any_of(extensions.begin(), extensions.end(), |
| @@ -6129,13 +6411,14 @@ HRESULT create_vulkan_device_standalone(REFIID riid, void** out) { | |||
| 6129 | VkPhysicalDeviceFeatures2 query{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, &swapchain_m1}; | 6411 | VkPhysicalDeviceFeatures2 query{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, &swapchain_m1}; |
| 6130 | vkGetPhysicalDeviceFeatures2(info.physical, &query); | 6412 | vkGetPhysicalDeviceFeatures2(info.physical, &query); |
| 6131 | if (swapchain_m1.swapchainMaintenance1 == VK_TRUE) { | 6413 | if (swapchain_m1.swapchainMaintenance1 == VK_TRUE) { |
| 6132 | swapchain_m1.pNext = enable13.pNext; | 6414 | swapchain_m1.pNext = *v13.next(); |
| 6133 | enable13.pNext = &swapchain_m1; | 6415 | *v13.next() = &swapchain_m1; |
| 6134 | } else { | 6416 | } else { |
| 6135 | swapchain_m1_name = nullptr; | 6417 | swapchain_m1_name = nullptr; |
| 6136 | } | 6418 | } |
| 6137 | } | 6419 | } |
| 6138 | } | 6420 | } |
| 6421 | #endif | ||
| 6139 | info.swapchain_maintenance1 = swapchain_m1_name != nullptr; | 6422 | info.swapchain_maintenance1 = swapchain_m1_name != nullptr; |
| 6140 | 6423 | ||
| 6141 | VkDeviceCreateInfo device_info{VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, &enable12}; | 6424 | VkDeviceCreateInfo device_info{VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, &enable12}; |
| @@ -6143,6 +6426,7 @@ HRESULT create_vulkan_device_standalone(REFIID riid, void** out) { | |||
| 6143 | device_info.pQueueCreateInfos = &queue_info; | 6426 | device_info.pQueueCreateInfos = &queue_info; |
| 6144 | device_info.pEnabledFeatures = &enable; | 6427 | device_info.pEnabledFeatures = &enable; |
| 6145 | std::vector<const char*> device_extensions; | 6428 | std::vector<const char*> device_extensions; |
| 6429 | v13.add_extensions(device_extensions); | ||
| 6146 | if (info.image_view_min_lod) device_extensions.push_back(VK_EXT_IMAGE_VIEW_MIN_LOD_EXTENSION_NAME); | 6430 | if (info.image_view_min_lod) device_extensions.push_back(VK_EXT_IMAGE_VIEW_MIN_LOD_EXTENSION_NAME); |
| 6147 | if (info.conditional_rendering) device_extensions.push_back(conditional_extension); | 6431 | if (info.conditional_rendering) device_extensions.push_back(conditional_extension); |
| 6148 | if (info.host_image_copy) device_extensions.push_back(host_image_copy_name); | 6432 | if (info.host_image_copy) device_extensions.push_back(host_image_copy_name); |
| @@ -6196,4 +6480,29 @@ HRESULT create_vulkan_device_standalone(REFIID riid, void** out) { | |||
| 6196 | return hand_out(device, riid, out); | 6480 | return hand_out(device, riid, out); |
| 6197 | } | 6481 | } |
| 6198 | 6482 | ||
| 6483 | bool has_global_realtime_privilege() { | ||
| 6484 | const int override_state = g_global_realtime_privilege_override.load(std::memory_order_relaxed); | ||
| 6485 | if (override_state >= 0) return override_state != 0; | ||
| 6486 | HANDLE token = nullptr; | ||
| 6487 | if (!OpenThreadToken(GetCurrentThread(), TOKEN_QUERY, TRUE, &token) && | ||
| 6488 | !OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token)) | ||
| 6489 | return false; | ||
| 6490 | LUID luid{}; | ||
| 6491 | BOOL enabled = FALSE; | ||
| 6492 | if (LookupPrivilegeValueW(nullptr, L"SeIncreaseBasePriorityPrivilege", &luid)) { | ||
| 6493 | PRIVILEGE_SET set{}; | ||
| 6494 | set.PrivilegeCount = 1; | ||
| 6495 | set.Control = PRIVILEGE_SET_ALL_NECESSARY; | ||
| 6496 | set.Privilege[0].Luid = luid; | ||
| 6497 | set.Privilege[0].Attributes = SE_PRIVILEGE_ENABLED; | ||
| 6498 | if (!PrivilegeCheck(token, &set, &enabled)) enabled = FALSE; | ||
| 6499 | } | ||
| 6500 | CloseHandle(token); | ||
| 6501 | return enabled != FALSE; | ||
| 6502 | } | ||
| 6503 | |||
| 6504 | void set_global_realtime_privilege_override_for_test(int state) { | ||
| 6505 | g_global_realtime_privilege_override.store(state, std::memory_order_relaxed); | ||
| 6506 | } | ||
| 6507 | |||
| 6199 | } // namespace rt::d3d12 | 6508 | } // namespace rt::d3d12 |
diff --git a/runtime/shims/d3d12_xs_device.cpp b/runtime/shims/d3d12_xs_device.cpp index 57cd292c7..65a4f3995 100644 --- a/runtime/shims/d3d12_xs_device.cpp +++ b/runtime/shims/d3d12_xs_device.cpp | |||
| @@ -388,18 +388,29 @@ HRESULT create_heap_proxy(ID3D12DescriptorHeap* real, DeviceProxy* device, REFII | |||
| 388 | // | 388 | // |
| 389 | // QueryInterface answers only the interfaces the proxy models (the base chain and its own interface, Fence1 when | 389 | // QueryInterface answers only the interfaces the proxy models (the base chain and its own interface, Fence1 when |
| 390 | // the real fence has it), like the device and heap proxies, so the COM identity holds and no real object leaks to | 390 | // the real fence has it), like the device and heap proxies, so the COM identity holds and no real object leaks to |
| 391 | // the title. Leonida's own code reaches the real object through queue_proxy_real_queue / fence_proxy_real_fence. | 391 | // the title. Leonida's own code reaches the real object through queue_proxy_real_queue / fence_proxy_real_fence / |
| 392 | // allocator_proxy_real_allocator. | ||
| 393 | // | ||
| 394 | // Command allocators (device slot 9) are the third kind: their public chain is 9 slots (Reset at 8). Slot 9 wraps | ||
| 395 | // only an allocator that answers kLeonidaCommandAllocatorTag, because a list takes the title's allocator in | ||
| 396 | // CreateCommandList and Reset and only the Vulkan layer's lists resolve a proxy there (CommandAllocator::from); | ||
| 397 | // a PC runtime allocator is handed out unchanged until a command-list proxy unwraps it at Reset. | ||
| 392 | 398 | ||
| 393 | enum class ChildKind { queue, fence }; | 399 | enum class ChildKind { queue, fence, allocator }; |
| 394 | 400 | ||
| 395 | constexpr unsigned kQueueSlots = 128; // the table: 19 public slots plus a refused tail | 401 | constexpr unsigned kQueueSlots = 128; // the table: 19 public slots plus a refused tail |
| 396 | constexpr unsigned kFenceSlots = 64; // the table: 12 public slots plus a refused tail | 402 | constexpr unsigned kFenceSlots = 64; // the table: 12 public slots plus a refused tail |
| 397 | constexpr unsigned kQueuePublicSlots = 19; // ID3D12CommandQueue | 403 | constexpr unsigned kQueuePublicSlots = 19; // ID3D12CommandQueue |
| 398 | constexpr unsigned kFencePublicSlots = 11; // ID3D12Fence | 404 | constexpr unsigned kFencePublicSlots = 11; // ID3D12Fence |
| 399 | constexpr unsigned kFence1PublicSlots = 12; // ID3D12Fence1 | 405 | constexpr unsigned kFence1PublicSlots = 12; // ID3D12Fence1 |
| 406 | constexpr unsigned kAllocatorSlots = 64; // the table: 9 public slots plus a refused tail | ||
| 407 | constexpr unsigned kAllocatorPublicSlots = 9; // ID3D12CommandAllocator: the base chain and Reset (slot 8) | ||
| 400 | constexpr SIZE_T kTableRegion = 64 * 1024; // one allocation granule: the table page plus 15 never-committed pages | 408 | constexpr SIZE_T kTableRegion = 64 * 1024; // one allocation granule: the table page plus 15 never-committed pages |
| 401 | static_assert(kQueueSlots > kQueuePublicSlots && kFenceSlots > kFence1PublicSlots, "the tables need a tail"); | 409 | static_assert(kQueueSlots > kQueuePublicSlots && kFenceSlots > kFence1PublicSlots && |
| 402 | static_assert(kQueueSlots * sizeof(void*) <= 4096 && kFenceSlots * sizeof(void*) <= 4096, | 410 | kAllocatorSlots > kAllocatorPublicSlots, |
| 411 | "the tables need a tail"); | ||
| 412 | static_assert(kQueueSlots * sizeof(void*) <= 4096 && kFenceSlots * sizeof(void*) <= 4096 && | ||
| 413 | kAllocatorSlots * sizeof(void*) <= 4096, | ||
| 403 | "a table must fit in the first page of its reservation"); | 414 | "a table must fit in the first page of its reservation"); |
| 404 | 415 | ||
| 405 | constexpr unsigned kQueueSignal = 14, kQueueWait = 15; // (ID3D12Fence*, UINT64) | 416 | constexpr unsigned kQueueSignal = 14, kQueueWait = 15; // (ID3D12Fence*, UINT64) |
| @@ -415,7 +426,9 @@ struct ChildProxy { | |||
| 415 | 426 | ||
| 416 | template <ChildKind K> | 427 | template <ChildKind K> |
| 417 | struct ChildStats { | 428 | struct ChildStats { |
| 418 | static constexpr unsigned kSlots = K == ChildKind::queue ? kQueueSlots : kFenceSlots; | 429 | static constexpr unsigned kSlots = K == ChildKind::queue ? kQueueSlots |
| 430 | : K == ChildKind::fence ? kFenceSlots | ||
| 431 | : kAllocatorSlots; | ||
| 419 | static inline std::atomic<std::uint64_t> hits[kSlots]; | 432 | static inline std::atomic<std::uint64_t> hits[kSlots]; |
| 420 | static inline std::atomic<bool> first[kSlots]; | 433 | static inline std::atomic<bool> first[kSlots]; |
| 421 | static inline std::atomic<bool> beyond_warned[kSlots]; | 434 | static inline std::atomic<bool> beyond_warned[kSlots]; |
| @@ -426,7 +439,7 @@ struct ChildStats { | |||
| 426 | 439 | ||
| 427 | template <ChildKind K> | 440 | template <ChildKind K> |
| 428 | constexpr const char* child_kind_name() { | 441 | constexpr const char* child_kind_name() { |
| 429 | return K == ChildKind::queue ? "queue" : "fence"; | 442 | return K == ChildKind::queue ? "queue" : K == ChildKind::fence ? "fence" : "allocator"; |
| 430 | } | 443 | } |
| 431 | 444 | ||
| 432 | template <ChildKind K> | 445 | template <ChildKind K> |
| @@ -441,8 +454,10 @@ const char* child_public_name(unsigned slot) { | |||
| 441 | if (slot < 8) return object[slot]; | 454 | if (slot < 8) return object[slot]; |
| 442 | if constexpr (K == ChildKind::queue) { | 455 | if constexpr (K == ChildKind::queue) { |
| 443 | if (slot < kQueuePublicSlots) return queue[slot - 8]; | 456 | if (slot < kQueuePublicSlots) return queue[slot - 8]; |
| 444 | } else { | 457 | } else if constexpr (K == ChildKind::fence) { |
| 445 | if (slot < kFence1PublicSlots) return fence[slot - 8]; | 458 | if (slot < kFence1PublicSlots) return fence[slot - 8]; |
| 459 | } else { | ||
| 460 | if (slot == 8) return "Reset"; | ||
| 446 | } | 461 | } |
| 447 | return nullptr; | 462 | return nullptr; |
| 448 | } | 463 | } |
| @@ -454,7 +469,9 @@ template <ChildKind K> | |||
| 454 | const char* child_trace_name(unsigned slot) { | 469 | const char* child_trace_name(unsigned slot) { |
| 455 | static const auto names = [] { | 470 | static const auto names = [] { |
| 456 | static char storage[ChildStats<K>::kSlots][64]; | 471 | static char storage[ChildStats<K>::kSlots][64]; |
| 457 | const char* iface = K == ChildKind::queue ? "XboxID3D12CommandQueue" : "XboxID3D12Fence"; | 472 | const char* iface = K == ChildKind::queue ? "XboxID3D12CommandQueue" |
| 473 | : K == ChildKind::fence ? "XboxID3D12Fence" | ||
| 474 | : "XboxID3D12CommandAllocator"; | ||
| 458 | for (unsigned s = 0; s < ChildStats<K>::kSlots; ++s) { | 475 | for (unsigned s = 0; s < ChildStats<K>::kSlots; ++s) { |
| 459 | const char* method = child_public_name<K>(s); | 476 | const char* method = child_public_name<K>(s); |
| 460 | if (method) | 477 | if (method) |
| @@ -528,8 +545,10 @@ bool is_child_iid(const IID& iid) { | |||
| 528 | return true; | 545 | return true; |
| 529 | if constexpr (K == ChildKind::queue) { | 546 | if constexpr (K == ChildKind::queue) { |
| 530 | return IsEqualIID(iid, __uuidof(ID3D12CommandQueue)); | 547 | return IsEqualIID(iid, __uuidof(ID3D12CommandQueue)); |
| 531 | } else { | 548 | } else if constexpr (K == ChildKind::fence) { |
| 532 | return IsEqualIID(iid, __uuidof(ID3D12Fence)) || IsEqualIID(iid, __uuidof(ID3D12Fence1)); | 549 | return IsEqualIID(iid, __uuidof(ID3D12Fence)) || IsEqualIID(iid, __uuidof(ID3D12Fence1)); |
| 550 | } else { | ||
| 551 | return IsEqualIID(iid, __uuidof(ID3D12CommandAllocator)); | ||
| 533 | } | 552 | } |
| 534 | } | 553 | } |
| 535 | 554 | ||
| @@ -608,7 +627,8 @@ IUnknown* proxy_real_object(const void* object) { | |||
| 608 | void* const vtable = *reinterpret_cast<void* const*>(object); | 627 | void* const vtable = *reinterpret_cast<void* const*>(object); |
| 609 | if (vtable == reinterpret_cast<void*>(get_heap_vtable())) return static_cast<const HeapProxy*>(object)->real; | 628 | if (vtable == reinterpret_cast<void*>(get_heap_vtable())) return static_cast<const HeapProxy*>(object)->real; |
| 610 | if (vtable == reinterpret_cast<void*>(get_child_vtable<ChildKind::queue>()) || | 629 | if (vtable == reinterpret_cast<void*>(get_child_vtable<ChildKind::queue>()) || |
| 611 | vtable == reinterpret_cast<void*>(get_child_vtable<ChildKind::fence>())) | 630 | vtable == reinterpret_cast<void*>(get_child_vtable<ChildKind::fence>()) || |
| 631 | vtable == reinterpret_cast<void*>(get_child_vtable<ChildKind::allocator>())) | ||
| 612 | return static_cast<const ChildProxy*>(object)->real; | 632 | return static_cast<const ChildProxy*>(object)->real; |
| 613 | return nullptr; | 633 | return nullptr; |
| 614 | } | 634 | } |
| @@ -685,6 +705,7 @@ LONG CALLBACK table_overrun_handler(EXCEPTION_POINTERS* info) { | |||
| 685 | const auto address = static_cast<std::uintptr_t>(record->ExceptionInformation[1]); | 705 | const auto address = static_cast<std::uintptr_t>(record->ExceptionInformation[1]); |
| 686 | report_table_overrun<ChildKind::queue>(address); | 706 | report_table_overrun<ChildKind::queue>(address); |
| 687 | report_table_overrun<ChildKind::fence>(address); | 707 | report_table_overrun<ChildKind::fence>(address); |
| 708 | report_table_overrun<ChildKind::allocator>(address); | ||
| 688 | } | 709 | } |
| 689 | return EXCEPTION_CONTINUE_SEARCH; // diagnostics only: the fault goes on to the title's handlers or the crash | 710 | return EXCEPTION_CONTINUE_SEARCH; // diagnostics only: the fault goes on to the title's handlers or the crash |
| 690 | } | 711 | } |
| @@ -803,8 +824,10 @@ HRESULT wrap_child(IUnknown* created, DeviceProxy* device, const IID* riid, void | |||
| 803 | proxy->real_vtable = *reinterpret_cast<void***>(created); | 824 | proxy->real_vtable = *reinterpret_cast<void***>(created); |
| 804 | if constexpr (K == ChildKind::queue) { | 825 | if constexpr (K == ChildKind::queue) { |
| 805 | proxy->slot_count = kQueuePublicSlots; | 826 | proxy->slot_count = kQueuePublicSlots; |
| 806 | } else { | 827 | } else if constexpr (K == ChildKind::fence) { |
| 807 | proxy->slot_count = supports_iid(created, __uuidof(ID3D12Fence1)) ? kFence1PublicSlots : kFencePublicSlots; | 828 | proxy->slot_count = supports_iid(created, __uuidof(ID3D12Fence1)) ? kFence1PublicSlots : kFencePublicSlots; |
| 829 | } else { | ||
| 830 | proxy->slot_count = kAllocatorPublicSlots; | ||
| 808 | } | 831 | } |
| 809 | proxy->refs.store(1, std::memory_order_relaxed); | 832 | proxy->refs.store(1, std::memory_order_relaxed); |
| 810 | proxy_add_ref(device); // the object keeps its Xbox-ABI device alive for GetDevice | 833 | proxy_add_ref(device); // the object keeps its Xbox-ABI device alive for GetDevice |
| @@ -894,6 +917,43 @@ HRESULT proxy_create_fence(DeviceProxy* self, std::uint64_t initial_value, std:: | |||
| 894 | return wrap_child<ChildKind::fence>(static_cast<IUnknown*>(created), self, riid, out); | 917 | return wrap_child<ChildKind::fence>(static_cast<IUnknown*>(created), self, riid, out); |
| 895 | } | 918 | } |
| 896 | 919 | ||
| 920 | // True when `allocator` is one whose consumers resolve allocator proxies: Leonida's own Vulkan-layer allocator, | ||
| 921 | // whose lists (CreateCommandList, Reset) find the real allocator through allocator_proxy_real_allocator. A PC | ||
| 922 | // runtime allocator does not answer the tag, and its lists would take a proxy for their own allocator. | ||
| 923 | bool resolves_allocator_proxies(IUnknown* allocator) { | ||
| 924 | void* found = nullptr; | ||
| 925 | if (FAILED(allocator->QueryInterface(kLeonidaCommandAllocatorTag, &found)) || !found) return false; | ||
| 926 | static_cast<IUnknown*>(found)->Release(); // the implementation pointer starts with its IUnknown chain | ||
| 927 | return true; | ||
| 928 | } | ||
| 929 | |||
| 930 | // Device slot 9: CreateCommandAllocator(type, riid, out). An allocator proxy where the list side resolves it (see | ||
| 931 | // resolves_allocator_proxies); any other allocator goes back unchanged, logged once, so the host runtime's lists | ||
| 932 | // never see a proxy. Null output and null IID as slot 8. | ||
| 933 | HRESULT proxy_create_command_allocator(DeviceProxy* self, std::uint64_t type, const IID* riid, void** out) { | ||
| 934 | note_slot(9); | ||
| 935 | if (out) *out = nullptr; // as slot 8 | ||
| 936 | if (!riid) return E_POINTER; | ||
| 937 | const auto list_type = static_cast<D3D12_COMMAND_LIST_TYPE>(static_cast<std::uint32_t>(type)); | ||
| 938 | #pragma warning(suppress : 6387) // the caller's null output, on purpose (see slot 8) | ||
| 939 | if (!out) return self->real->CreateCommandAllocator(list_type, *riid, nullptr); | ||
| 940 | void* created = nullptr; | ||
| 941 | const HRESULT hr = self->real->CreateCommandAllocator(list_type, __uuidof(ID3D12CommandAllocator), &created); | ||
| 942 | if (FAILED(hr)) return hr; | ||
| 943 | if (!created) return E_FAIL; | ||
| 944 | auto* allocator = static_cast<IUnknown*>(created); | ||
| 945 | if (!resolves_allocator_proxies(allocator)) { | ||
| 946 | static std::atomic<bool> logged{false}; | ||
| 947 | if (!logged.exchange(true, std::memory_order_relaxed)) | ||
| 948 | std::fprintf(stderr, "[rt] d3d12_xs: allocators of this device are not wrapped: its command lists " | ||
| 949 | "cannot resolve an allocator proxy\n"); | ||
| 950 | const HRESULT asked = allocator->QueryInterface(*riid, out); | ||
| 951 | allocator->Release(); | ||
| 952 | return asked; | ||
| 953 | } | ||
| 954 | return wrap_child<ChildKind::allocator>(allocator, self, riid, out); | ||
| 955 | } | ||
| 956 | |||
| 897 | // Device slot 32: OpenSharedHandle(handle, riid, out). The object is opened as asked; when it is a fence (whatever | 957 | // Device slot 32: OpenSharedHandle(handle, riid, out). The object is opened as asked; when it is a fence (whatever |
| 898 | // interface was asked for, IUnknown included) the title gets a fence proxy, anything else (heaps, resources) is | 958 | // interface was asked for, IUnknown included) the title gets a fence proxy, anything else (heaps, resources) is |
| 899 | // returned unchanged. | 959 | // returned unchanged. |
| @@ -981,6 +1041,61 @@ HRESULT proxy_create_compute_pipeline_state(DeviceProxy* self, const D3D12_COMPU | |||
| 981 | return self->real->CreateComputePipelineState(desc, *riid, out); | 1041 | return self->real->CreateComputePipelineState(desc, *riid, out); |
| 982 | } | 1042 | } |
| 983 | 1043 | ||
| 1044 | // The Xbox slot 67 creates a compute pipeline from native GPU code: (desc, riid, out), named | ||
| 1045 | // DeserializeComputePipelineStateX in amd_fidelityfx_upscaler_xbox.dll's messages (call at RVA 0x56d9). The desc | ||
| 1046 | // passes the root signature at +0x00, followed by pointer/size pairs for the shader's FSPX entries (docs/fspx.md): | ||
| 1047 | // kind 0 (dispatch state) at +0x08/+0x10, kind 1 at +0x18/+0x20, kind 6 (the RDNA2 program) at +0x28/+0x30, and | ||
| 1048 | // kind 7 (records) at +0x38/+0x40. Translates the console description to a standard D3D12_COMPUTE_PIPELINE_STATE_DESC | ||
| 1049 | // with CS bytecode pointing at kind 6 and routes it to CreateComputePipelineState on the PC device (slot 11), which | ||
| 1050 | // on the Vulkan device resolves through the translator. The PC slot 67 is CreateProtectedResourceSession1. | ||
| 1051 | HRESULT proxy_create_compute_pipeline_from_native_code(DeviceProxy* self, const void* desc, | ||
| 1052 | const IID* riid, void** out) { | ||
| 1053 | note_slot(67); | ||
| 1054 | if (!out) return E_POINTER; | ||
| 1055 | *out = nullptr; | ||
| 1056 | if (!desc) return E_INVALIDARG; | ||
| 1057 | if (!riid) return E_POINTER; | ||
| 1058 | |||
| 1059 | // FSPX description layout (docs/fspx.md §How the DLL reads it): | ||
| 1060 | struct XboxNativeComputePipelineStateDesc { | ||
| 1061 | ID3D12RootSignature* root_signature; // +0x00 | ||
| 1062 | const void* kind0; // +0x08: dispatch state | ||
| 1063 | std::uint64_t kind0_size; // +0x10: 28 bytes | ||
| 1064 | const void* kind1; // +0x18: unknown | ||
| 1065 | std::uint64_t kind1_size; // +0x20: 20 bytes | ||
| 1066 | const void* kind6; // +0x28: RDNA2 program code | ||
| 1067 | std::uint64_t kind6_size; // +0x30: program size in bytes | ||
| 1068 | const void* kind7; // +0x38: resource/hash records | ||
| 1069 | std::uint64_t kind7_size; // +0x40: records size in bytes | ||
| 1070 | }; | ||
| 1071 | const auto* xbox_desc = static_cast<const XboxNativeComputePipelineStateDesc*>(desc); | ||
| 1072 | |||
| 1073 | if (xbox_desc->kind0 || xbox_desc->kind0_size || xbox_desc->kind1 || xbox_desc->kind1_size || | ||
| 1074 | xbox_desc->kind7 || xbox_desc->kind7_size) { | ||
| 1075 | static std::atomic<bool> logged{false}; | ||
| 1076 | if (!logged.exchange(true, std::memory_order_relaxed)) { | ||
| 1077 | std::fprintf(stderr, | ||
| 1078 | "[rt] d3d12_xs: slot 67 FSPX metadata: kind0 0x%llx (%llu B), kind1 0x%llx (%llu B), kind7 0x%llx (%llu B)\n", | ||
| 1079 | static_cast<unsigned long long>(reinterpret_cast<std::uintptr_t>(xbox_desc->kind0)), | ||
| 1080 | static_cast<unsigned long long>(xbox_desc->kind0_size), | ||
| 1081 | static_cast<unsigned long long>(reinterpret_cast<std::uintptr_t>(xbox_desc->kind1)), | ||
| 1082 | static_cast<unsigned long long>(xbox_desc->kind1_size), | ||
| 1083 | static_cast<unsigned long long>(reinterpret_cast<std::uintptr_t>(xbox_desc->kind7)), | ||
| 1084 | static_cast<unsigned long long>(xbox_desc->kind7_size)); | ||
| 1085 | } | ||
| 1086 | } | ||
| 1087 | |||
| 1088 | D3D12_COMPUTE_PIPELINE_STATE_DESC pc_desc{}; | ||
| 1089 | pc_desc.pRootSignature = xbox_desc->root_signature; | ||
| 1090 | pc_desc.CS.pShaderBytecode = xbox_desc->kind6; | ||
| 1091 | pc_desc.CS.BytecodeLength = static_cast<SIZE_T>(xbox_desc->kind6_size); | ||
| 1092 | pc_desc.NodeMask = 0; | ||
| 1093 | pc_desc.CachedPSO = {nullptr, 0}; | ||
| 1094 | pc_desc.Flags = D3D12_PIPELINE_STATE_FLAG_NONE; | ||
| 1095 | |||
| 1096 | return self->real->CreateComputePipelineState(&pc_desc, *riid, out); | ||
| 1097 | } | ||
| 1098 | |||
| 984 | HRESULT proxy_create_resource(DeviceProxy* self, const D3D12_HEAP_PROPERTIES* heap_properties, | 1099 | HRESULT proxy_create_resource(DeviceProxy* self, const D3D12_HEAP_PROPERTIES* heap_properties, |
| 985 | D3D12_HEAP_FLAGS heap_flags, const D3D12_RESOURCE_DESC* xbox_desc, | 1100 | D3D12_HEAP_FLAGS heap_flags, const D3D12_RESOURCE_DESC* xbox_desc, |
| 986 | D3D12_RESOURCE_STATES initial_state, const D3D12_CLEAR_VALUE* clear_value, | 1101 | D3D12_RESOURCE_STATES initial_state, const D3D12_CLEAR_VALUE* clear_value, |
| @@ -1024,6 +1139,9 @@ std::uint64_t WINAPI proxy_slot(DeviceProxy* self, std::uint64_t a1, std::uint64 | |||
| 1024 | } else if constexpr (Slot == 8) { | 1139 | } else if constexpr (Slot == 8) { |
| 1025 | return hr_to_u64(proxy_create_command_queue(self, reinterpret_cast<const D3D12_COMMAND_QUEUE_DESC*>(a1), | 1140 | return hr_to_u64(proxy_create_command_queue(self, reinterpret_cast<const D3D12_COMMAND_QUEUE_DESC*>(a1), |
| 1026 | reinterpret_cast<const IID*>(a2), reinterpret_cast<void**>(a3))); | 1141 | reinterpret_cast<const IID*>(a2), reinterpret_cast<void**>(a3))); |
| 1142 | } else if constexpr (Slot == 9) { | ||
| 1143 | return hr_to_u64(proxy_create_command_allocator(self, a1, reinterpret_cast<const IID*>(a2), | ||
| 1144 | reinterpret_cast<void**>(a3))); | ||
| 1027 | } else if constexpr (Slot == 36) { | 1145 | } else if constexpr (Slot == 36) { |
| 1028 | return hr_to_u64(proxy_create_fence(self, a1, a2, reinterpret_cast<const IID*>(a3), | 1146 | return hr_to_u64(proxy_create_fence(self, a1, a2, reinterpret_cast<const IID*>(a3), |
| 1029 | reinterpret_cast<void**>(a4))); | 1147 | reinterpret_cast<void**>(a4))); |
| @@ -1044,18 +1162,9 @@ std::uint64_t WINAPI proxy_slot(DeviceProxy* self, std::uint64_t a1, std::uint64 | |||
| 1044 | self, reinterpret_cast<const D3D12_COMPUTE_PIPELINE_STATE_DESC*>(a1), a2, a3, | 1162 | self, reinterpret_cast<const D3D12_COMPUTE_PIPELINE_STATE_DESC*>(a1), a2, a3, |
| 1045 | reinterpret_cast<const IID*>(a4), reinterpret_cast<void**>(a5))); | 1163 | reinterpret_cast<const IID*>(a4), reinterpret_cast<void**>(a5))); |
| 1046 | } else if constexpr (Slot == 67) { | 1164 | } else if constexpr (Slot == 67) { |
| 1047 | // Measured in amd_fidelityfx_upscaler_xbox.dll (call at RVA 0x56d9): (desc, riid, out), named | 1165 | return hr_to_u64(proxy_create_compute_pipeline_from_native_code( |
| 1048 | // DeserializeComputePipelineStateX in the DLL's own messages. The desc is the root signature at +0x00, then | 1166 | self, reinterpret_cast<const void*>(a1), reinterpret_cast<const IID*>(a2), |
| 1049 | // pointer/size pairs for the shader's FSPX entries, with the native RDNA2 program at +0x28 (docs/fspx.md); | 1167 | reinterpret_cast<void**>(a3))); |
| 1050 | // the DLL falls back to slot 62 when it fails. The PC device's slot 67 is CreateProtectedResourceSession1, a | ||
| 1051 | // different method, so it is refused here, not forwarded. | ||
| 1052 | note_slot(67); | ||
| 1053 | static std::atomic<bool> logged{false}; | ||
| 1054 | if (!logged.exchange(true, std::memory_order_relaxed)) | ||
| 1055 | std::fprintf(stderr, | ||
| 1056 | "[rt] d3d12_xs: device slot 67 (Xbox DeserializeComputePipelineStateX) -> E_NOTIMPL\n"); | ||
| 1057 | if (a3) *reinterpret_cast<void**>(a3) = nullptr; | ||
| 1058 | return hr_to_u64(E_NOTIMPL); | ||
| 1059 | } else if constexpr (Slot == 76) { | 1168 | } else if constexpr (Slot == 76) { |
| 1060 | return hr_to_u64(proxy_create_resource( | 1169 | return hr_to_u64(proxy_create_resource( |
| 1061 | self, reinterpret_cast<const D3D12_HEAP_PROPERTIES*>(a1), | 1170 | self, reinterpret_cast<const D3D12_HEAP_PROPERTIES*>(a1), |
| @@ -1186,13 +1295,19 @@ ID3D12Device* device_proxy_real_device(const void* device) { | |||
| 1186 | } | 1295 | } |
| 1187 | 1296 | ||
| 1188 | bool device_slot_overridden(unsigned slot) { | 1297 | bool device_slot_overridden(unsigned slot) { |
| 1189 | return slot <= 2 || slot == 8 || slot == 14 || slot == 31 || slot == 32 || slot == 34 || slot == 35 || | 1298 | return slot <= 2 || slot == 8 || slot == 9 || slot == 14 || slot == 31 || slot == 32 || slot == 34 || slot == 35 || |
| 1190 | slot == 36 || slot == 45 || slot == 46 || slot == 50 || slot == 62 || slot == 67 || | 1299 | slot == 36 || slot == 45 || slot == 46 || slot == 50 || slot == 62 || slot == 67 || |
| 1191 | slot == 75 || slot == 76; | 1300 | slot == 75 || slot == 76; |
| 1192 | } | 1301 | } |
| 1193 | 1302 | ||
| 1194 | bool is_queue_proxy(const void* queue) { return is_child_proxy<ChildKind::queue>(queue); } | 1303 | bool is_queue_proxy(const void* queue) { return is_child_proxy<ChildKind::queue>(queue); } |
| 1195 | bool is_fence_proxy(const void* fence) { return is_child_proxy<ChildKind::fence>(fence); } | 1304 | bool is_fence_proxy(const void* fence) { return is_child_proxy<ChildKind::fence>(fence); } |
| 1305 | bool is_allocator_proxy(const void* allocator) { return is_child_proxy<ChildKind::allocator>(allocator); } | ||
| 1306 | |||
| 1307 | ID3D12CommandAllocator* allocator_proxy_real_allocator(const void* allocator) { | ||
| 1308 | if (!is_allocator_proxy(allocator)) return nullptr; | ||
| 1309 | return reinterpret_cast<ID3D12CommandAllocator*>(static_cast<const ChildProxy*>(allocator)->real); | ||
| 1310 | } | ||
| 1196 | 1311 | ||
| 1197 | ID3D12CommandQueue* queue_proxy_real_queue(const void* queue) { | 1312 | ID3D12CommandQueue* queue_proxy_real_queue(const void* queue) { |
| 1198 | if (!is_queue_proxy(queue)) return nullptr; | 1313 | if (!is_queue_proxy(queue)) return nullptr; |
| @@ -1214,9 +1329,13 @@ unsigned fence_proxy_slot_count(const void* fence) { | |||
| 1214 | 1329 | ||
| 1215 | unsigned queue_proxy_table_size() { return kQueueSlots; } | 1330 | unsigned queue_proxy_table_size() { return kQueueSlots; } |
| 1216 | unsigned fence_proxy_table_size() { return kFenceSlots; } | 1331 | unsigned fence_proxy_table_size() { return kFenceSlots; } |
| 1332 | unsigned allocator_proxy_table_size() { return kAllocatorSlots; } | ||
| 1333 | unsigned allocator_proxy_slot_count(const void* allocator) { | ||
| 1334 | return is_allocator_proxy(allocator) ? static_cast<const ChildProxy*>(allocator)->slot_count : 0; | ||
| 1335 | } | ||
| 1217 | 1336 | ||
| 1218 | unsigned long command_object_proxy_ref_count(const void* object) { | 1337 | unsigned long command_object_proxy_ref_count(const void* object) { |
| 1219 | if (!is_queue_proxy(object) && !is_fence_proxy(object)) return 0; | 1338 | if (!is_queue_proxy(object) && !is_fence_proxy(object) && !is_allocator_proxy(object)) return 0; |
| 1220 | return static_cast<const ChildProxy*>(object)->refs.load(std::memory_order_relaxed); | 1339 | return static_cast<const ChildProxy*>(object)->refs.load(std::memory_order_relaxed); |
| 1221 | } | 1340 | } |
| 1222 | 1341 | ||
| @@ -1251,8 +1370,24 @@ std::uint64_t fence_table_overruns() { | |||
| 1251 | bool command_object_tables_guarded() { | 1370 | bool command_object_tables_guarded() { |
| 1252 | get_child_vtable<ChildKind::queue>(); | 1371 | get_child_vtable<ChildKind::queue>(); |
| 1253 | get_child_vtable<ChildKind::fence>(); | 1372 | get_child_vtable<ChildKind::fence>(); |
| 1373 | get_child_vtable<ChildKind::allocator>(); | ||
| 1254 | return ChildStats<ChildKind::queue>::table_end.load(std::memory_order_acquire) && | 1374 | return ChildStats<ChildKind::queue>::table_end.load(std::memory_order_acquire) && |
| 1255 | ChildStats<ChildKind::fence>::table_end.load(std::memory_order_acquire); | 1375 | ChildStats<ChildKind::fence>::table_end.load(std::memory_order_acquire) && |
| 1376 | ChildStats<ChildKind::allocator>::table_end.load(std::memory_order_acquire); | ||
| 1377 | } | ||
| 1378 | |||
| 1379 | std::uint64_t allocator_slot_hits(unsigned slot) { | ||
| 1380 | using S = ChildStats<ChildKind::allocator>; | ||
| 1381 | return slot < S::kSlots ? S::hits[slot].load(std::memory_order_relaxed) : 0; | ||
| 1382 | } | ||
| 1383 | |||
| 1384 | bool allocator_slot_first_call_seen(unsigned slot) { | ||
| 1385 | using S = ChildStats<ChildKind::allocator>; | ||
| 1386 | return slot < S::kSlots && S::first[slot].load(std::memory_order_relaxed); | ||
| 1387 | } | ||
| 1388 | |||
| 1389 | std::uint64_t allocator_table_overruns() { | ||
| 1390 | return ChildStats<ChildKind::allocator>::overruns.load(std::memory_order_relaxed); | ||
| 1256 | } | 1391 | } |
| 1257 | 1392 | ||
| 1258 | bool heap_slot_overridden(unsigned slot) { | 1393 | bool heap_slot_overridden(unsigned slot) { |
| @@ -1292,6 +1427,7 @@ void reset_device_proxy_stats() { | |||
| 1292 | } | 1427 | } |
| 1293 | reset_child_stats<ChildKind::queue>(); | 1428 | reset_child_stats<ChildKind::queue>(); |
| 1294 | reset_child_stats<ChildKind::fence>(); | 1429 | reset_child_stats<ChildKind::fence>(); |
| 1430 | reset_child_stats<ChildKind::allocator>(); | ||
| 1295 | } | 1431 | } |
| 1296 | 1432 | ||
| 1297 | } // namespace rt::d3d12_xs | 1433 | } // namespace rt::d3d12_xs |
diff --git a/runtime/shims/d3d12_xs_device.h b/runtime/shims/d3d12_xs_device.h index 510560516..12ac5a78f 100644 --- a/runtime/shims/d3d12_xs_device.h +++ b/runtime/shims/d3d12_xs_device.h | |||
| @@ -3,6 +3,9 @@ | |||
| 3 | // Measured Xbox device deviations used here (vtable indices, x64): | 3 | // Measured Xbox device deviations used here (vtable indices, x64): |
| 4 | // slot 62 CreateComputePipelineState(desc, w2, w3, iid, out): two words (0 from XboxBvhBuilder, meaning unknown) | 4 | // slot 62 CreateComputePipelineState(desc, w2, w3, iid, out): two words (0 from XboxBvhBuilder, meaning unknown) |
| 5 | // before the IID. The PC slot 62 is CreateStateObject. | 5 | // before the IID. The PC slot 62 is CreateStateObject. |
| 6 | // slot 67 CreateComputePipelineState from native code (desc, iid, out): converts the Xbox native-code desc | ||
| 7 | // (+0x00 root signature, +0x28 code, +0x30 size) to D3D12_COMPUTE_PIPELINE_STATE_DESC and forwards | ||
| 8 | // to PC CreateComputePipelineState (slot 11). The PC slot 67 is CreateProtectedResourceSession1. | ||
| 6 | // slot 76 resource creation -> PC CreateCommittedResource (PC slot 27), with the Xbox layout word ignored. | 9 | // slot 76 resource creation -> PC CreateCommittedResource (PC slot 27), with the Xbox layout word ignored. |
| 7 | // The measured slots 9/10 (GetCPU/GPUDescriptorHandleForHeapStart) are ID3D12DescriptorHeap methods, not device | 10 | // The measured slots 9/10 (GetCPU/GPUDescriptorHandleForHeapStart) are ID3D12DescriptorHeap methods, not device |
| 8 | // methods: the PC device's 9/10 are CreateCommandAllocator/CreateGraphicsPipelineState and are forwarded unchanged. | 11 | // methods: the PC device's 9/10 are CreateCommandAllocator/CreateGraphicsPipelineState and are forwarded unchanged. |
| @@ -57,8 +60,9 @@ unsigned device_proxy_slot_count(const void* device); | |||
| 57 | ID3D12Device* device_proxy_real_device(const void* device); | 60 | ID3D12Device* device_proxy_real_device(const void* device); |
| 58 | 61 | ||
| 59 | // True for slots the proxy handles itself rather than forwarding verbatim: IUnknown (0-2), 8 and 75 (queue | 62 | // True for slots the proxy handles itself rather than forwarding verbatim: IUnknown (0-2), 8 and 75 (queue |
| 60 | // proxies), 14, 31/34/35/45/46/50 (proxies unwrapped), 32 and 36 (fence proxies), 62, 67 and 76. | 63 | // proxies), 9 (allocator proxies), 14, 31/34/35/45/46/50 (proxies unwrapped), 32 and 36 (fence proxies), 62, 67 |
| 61 | // Slots 9 and 10 are intentionally false; the handle conversion is on the heap proxy. | 64 | // and 76. Slot 10 is intentionally false: the measured 9/10 handle conversion is on the heap proxy, and device |
| 65 | // slot 9 is CreateCommandAllocator, which the proxy handles for the allocator proxy. | ||
| 62 | bool device_slot_overridden(unsigned slot); | 66 | bool device_slot_overridden(unsigned slot); |
| 63 | 67 | ||
| 64 | // Queue and fence proxies created by device slots 8/75 and 36. The real_* accessors return the wrapped object | 68 | // Queue and fence proxies created by device slots 8/75 and 36. The real_* accessors return the wrapped object |
| @@ -72,7 +76,7 @@ unsigned queue_proxy_slot_count(const void* queue); | |||
| 72 | unsigned fence_proxy_slot_count(const void* fence); | 76 | unsigned fence_proxy_slot_count(const void* fence); |
| 73 | unsigned queue_proxy_table_size(); | 77 | unsigned queue_proxy_table_size(); |
| 74 | unsigned fence_proxy_table_size(); | 78 | unsigned fence_proxy_table_size(); |
| 75 | // Live references on a queue or fence proxy (0 for anything else). Test helper. | 79 | // Live references on a queue, fence or allocator proxy (0 for anything else). Test helper. |
| 76 | unsigned long command_object_proxy_ref_count(const void* object); | 80 | unsigned long command_object_proxy_ref_count(const void* object); |
| 77 | // Per-slot call counters and first-call flags, shared by all queue proxies and all fence proxies. | 81 | // Per-slot call counters and first-call flags, shared by all queue proxies and all fence proxies. |
| 78 | std::uint64_t queue_slot_hits(unsigned slot); | 82 | std::uint64_t queue_slot_hits(unsigned slot); |
| @@ -82,8 +86,28 @@ bool fence_slot_first_call_seen(unsigned slot); | |||
| 82 | // Vtable reads past a queue or fence proxy table that faulted in its guard region (counted by the fault logger). | 86 | // Vtable reads past a queue or fence proxy table that faulted in its guard region (counted by the fault logger). |
| 83 | std::uint64_t queue_table_overruns(); | 87 | std::uint64_t queue_table_overruns(); |
| 84 | std::uint64_t fence_table_overruns(); | 88 | std::uint64_t fence_table_overruns(); |
| 85 | // True when both tables sit in front of their guard region (false only if the reservation failed). | 89 | // True when the queue, fence and allocator tables sit in front of their guard regions (false only if a reservation |
| 90 | // or the fault logger failed). | ||
| 86 | bool command_object_tables_guarded(); | 91 | bool command_object_tables_guarded(); |
| 92 | |||
| 93 | // Command allocator proxies (device slot 9): the public chain (9 slots: the base chain and Reset) is forwarded, a | ||
| 94 | // slot past it up to the end of the table (64 slots) is logged and refused with E_NOTIMPL, and a read past the | ||
| 95 | // table faults in a guard region, as for queues and fences. The console allocator's extra methods are not | ||
| 96 | // measured and not guessed. Slot 9 wraps only an allocator that answers kLeonidaCommandAllocatorTag, Leonida's | ||
| 97 | // own Vulkan-layer allocator: its command lists resolve the proxy (CreateCommandList, Reset). A PC runtime | ||
| 98 | // allocator goes back unchanged, because the PC runtime's lists would take a proxy for their own allocator; a | ||
| 99 | // command-list proxy that unwraps at Reset is what lets the host backend wrap allocators too. | ||
| 100 | // {7d0e6b51-34a2-4f0c-9a61-0c5b2e8f4a10}: the Vulkan layer's CommandAllocator answers it with its implementation. | ||
| 101 | inline constexpr GUID kLeonidaCommandAllocatorTag{ | ||
| 102 | 0x7d0e6b51, 0x34a2, 0x4f0c, {0x9a, 0x61, 0x0c, 0x5b, 0x2e, 0x8f, 0x4a, 0x10}}; | ||
| 103 | bool is_allocator_proxy(const void* allocator); | ||
| 104 | // The wrapped allocator (no reference added), or null when `allocator` is not an allocator proxy. | ||
| 105 | ID3D12CommandAllocator* allocator_proxy_real_allocator(const void* allocator); | ||
| 106 | unsigned allocator_proxy_slot_count(const void* allocator); | ||
| 107 | unsigned allocator_proxy_table_size(); | ||
| 108 | std::uint64_t allocator_slot_hits(unsigned slot); | ||
| 109 | bool allocator_slot_first_call_seen(unsigned slot); | ||
| 110 | std::uint64_t allocator_table_overruns(); | ||
| 87 | // Heap slots 0-2, 7 (GetDevice -> device proxy) and 9/10 (handle conversion). | 111 | // Heap slots 0-2, 7 (GetDevice -> device proxy) and 9/10 (handle conversion). |
| 88 | bool heap_slot_overridden(unsigned slot); | 112 | bool heap_slot_overridden(unsigned slot); |
| 89 | 113 | ||
diff --git a/runtime/shims/dxgi_com.cpp b/runtime/shims/dxgi_com.cpp index 17449fefc..caf09cee7 100644 --- a/runtime/shims/dxgi_com.cpp +++ b/runtime/shims/dxgi_com.cpp | |||
| @@ -22,12 +22,14 @@ void stub(const char* method) { | |||
| 22 | if (seen.insert(method).second) std::fprintf(stderr, "[rt] dxgi: unimplemented %s\n", method); | 22 | if (seen.insert(method).second) std::fprintf(stderr, "[rt] dxgi: unimplemented %s\n", method); |
| 23 | } | 23 | } |
| 24 | 24 | ||
| 25 | bool valid_flip_buffer_count(UINT count) { | ||
| 26 | return count >= 2 && count <= DXGI_MAX_SWAP_CHAIN_BUFFERS; | ||
| 27 | } | ||
| 28 | |||
| 25 | VkFormat dxgi_to_vk_format(DXGI_FORMAT fmt) { | 29 | VkFormat dxgi_to_vk_format(DXGI_FORMAT fmt) { |
| 26 | switch (fmt) { | 30 | switch (fmt) { |
| 27 | case DXGI_FORMAT_B8G8R8A8_UNORM: return VK_FORMAT_B8G8R8A8_UNORM; | 31 | case DXGI_FORMAT_B8G8R8A8_UNORM: return VK_FORMAT_B8G8R8A8_UNORM; |
| 28 | case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB: return VK_FORMAT_B8G8R8A8_SRGB; | ||
| 29 | case DXGI_FORMAT_R8G8B8A8_UNORM: return VK_FORMAT_R8G8B8A8_UNORM; | 32 | case DXGI_FORMAT_R8G8B8A8_UNORM: return VK_FORMAT_R8G8B8A8_UNORM; |
| 30 | case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB: return VK_FORMAT_R8G8B8A8_SRGB; | ||
| 31 | case DXGI_FORMAT_R10G10B10A2_UNORM: return VK_FORMAT_A2B10G10R10_UNORM_PACK32; | 33 | case DXGI_FORMAT_R10G10B10A2_UNORM: return VK_FORMAT_A2B10G10R10_UNORM_PACK32; |
| 32 | case DXGI_FORMAT_R16G16B16A16_FLOAT: return VK_FORMAT_R16G16B16A16_SFLOAT; | 34 | case DXGI_FORMAT_R16G16B16A16_FLOAT: return VK_FORMAT_R16G16B16A16_SFLOAT; |
| 33 | default: return VK_FORMAT_UNDEFINED; | 35 | default: return VK_FORMAT_UNDEFINED; |
| @@ -122,20 +124,14 @@ public: | |||
| 122 | if (parent_) parent_->Release(); | 124 | if (parent_) parent_->Release(); |
| 123 | } | 125 | } |
| 124 | 126 | ||
| 125 | bool init(HWND hwnd, const DXGI_SWAP_CHAIN_DESC1& desc) { | 127 | bool init(HWND hwnd, const DXGI_SWAP_CHAIN_DESC1& desc, VkFormat vk_fmt) { |
| 126 | hwnd_ = hwnd; | 128 | hwnd_ = hwnd; |
| 127 | flags_ = desc.Flags; | 129 | flags_ = desc.Flags; |
| 128 | const VkExtent2D size = size_or_client(desc.Width, desc.Height, {256u, 256u}); | 130 | const VkExtent2D size = size_or_client(desc.Width, desc.Height, {256u, 256u}); |
| 129 | const std::uint32_t w = size.width; | 131 | const std::uint32_t w = size.width; |
| 130 | const std::uint32_t h = size.height; | 132 | const std::uint32_t h = size.height; |
| 131 | const std::uint32_t count = desc.BufferCount ? desc.BufferCount : 2u; | ||
| 132 | VkFormat vk_fmt = VK_FORMAT_UNDEFINED; | ||
| 133 | if (desc.Format != DXGI_FORMAT_UNKNOWN) { | ||
| 134 | vk_fmt = dxgi_to_vk_format(desc.Format); | ||
| 135 | if (vk_fmt == VK_FORMAT_UNDEFINED) return false; | ||
| 136 | } | ||
| 137 | const bool allow_tearing = (flags_ & DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING) != 0; | 133 | const bool allow_tearing = (flags_ & DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING) != 0; |
| 138 | if (!swapchain_.create(hwnd, w, h, vk_fmt, count, allow_tearing)) return false; | 134 | if (!swapchain_.create(hwnd, w, h, vk_fmt, desc.BufferCount, allow_tearing)) return false; |
| 139 | if (flags_ & DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT) { | 135 | if (flags_ & DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT) { |
| 140 | // DXGI: waitable swapchains default to maximum frame latency 1. | 136 | // DXGI: waitable swapchains default to maximum frame latency 1. |
| 141 | max_frame_latency_.store(1, std::memory_order_relaxed); | 137 | max_frame_latency_.store(1, std::memory_order_relaxed); |
| @@ -234,11 +230,15 @@ public: | |||
| 234 | } | 230 | } |
| 235 | 231 | ||
| 236 | HRESULT STDMETHODCALLTYPE ResizeBuffers(UINT count, UINT width, UINT height, DXGI_FORMAT fmt, UINT flags) override { | 232 | HRESULT STDMETHODCALLTYPE ResizeBuffers(UINT count, UINT width, UINT height, DXGI_FORMAT fmt, UINT flags) override { |
| 233 | if (count != 0 && !valid_flip_buffer_count(count)) return E_INVALIDARG; | ||
| 237 | VkFormat vk_fmt = VK_FORMAT_UNDEFINED; | 234 | VkFormat vk_fmt = VK_FORMAT_UNDEFINED; |
| 238 | if (fmt != DXGI_FORMAT_UNKNOWN) { | 235 | if (fmt != DXGI_FORMAT_UNKNOWN) { |
| 239 | vk_fmt = dxgi_to_vk_format(fmt); | 236 | vk_fmt = dxgi_to_vk_format(fmt); |
| 240 | if (vk_fmt == VK_FORMAT_UNDEFINED) return DXGI_ERROR_UNSUPPORTED; | 237 | if (vk_fmt == VK_FORMAT_UNDEFINED) return E_INVALIDARG; |
| 241 | } | 238 | } |
| 239 | constexpr UINT creation_only_flags = DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT | | ||
| 240 | DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING; | ||
| 241 | if ((flags & creation_only_flags) != (flags_ & creation_only_flags)) return E_INVALIDARG; | ||
| 242 | // DXGI refuses to resize while the app still holds a back buffer reference. | 242 | // DXGI refuses to resize while the app still holds a back buffer reference. |
| 243 | for (auto* bb : buffers_) | 243 | for (auto* bb : buffers_) |
| 244 | if (bb->held_by_app()) return DXGI_ERROR_INVALID_CALL; | 244 | if (bb->held_by_app()) return DXGI_ERROR_INVALID_CALL; |
| @@ -246,8 +246,7 @@ public: | |||
| 246 | const VkExtent2D size = size_or_client(width, height, swapchain_.extent()); | 246 | const VkExtent2D size = size_or_client(width, height, swapchain_.extent()); |
| 247 | const std::uint32_t w = size.width; | 247 | const std::uint32_t w = size.width; |
| 248 | const std::uint32_t h = size.height; | 248 | const std::uint32_t h = size.height; |
| 249 | const UINT waitable_bit = flags_ & DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT; | 249 | const UINT next_flags = flags ? flags : flags_; |
| 250 | const UINT next_flags = (flags ? flags : flags_) | waitable_bit; | ||
| 251 | const bool allow_tearing = (next_flags & DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING) != 0; | 250 | const bool allow_tearing = (next_flags & DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING) != 0; |
| 252 | if (!swapchain_.resize(w, h, vk_fmt, count, allow_tearing)) return E_FAIL; | 251 | if (!swapchain_.resize(w, h, vk_fmt, count, allow_tearing)) return E_FAIL; |
| 253 | statistics_disjoint_.store(true, std::memory_order_relaxed); | 252 | statistics_disjoint_.store(true, std::memory_order_relaxed); |
| @@ -782,24 +781,57 @@ public: | |||
| 782 | if (!out) return E_POINTER; | 781 | if (!out) return E_POINTER; |
| 783 | *out = nullptr; | 782 | *out = nullptr; |
| 784 | if (!hwnd || !desc) return E_INVALIDARG; | 783 | if (!hwnd || !desc) return E_INVALIDARG; |
| 784 | if (!valid_flip_buffer_count(desc->BufferCount)) return DXGI_ERROR_INVALID_CALL; | ||
| 785 | const VkFormat vk_fmt = dxgi_to_vk_format(desc->Format); | ||
| 786 | if (vk_fmt == VK_FORMAT_UNDEFINED) return DXGI_ERROR_INVALID_CALL; | ||
| 785 | auto* sc = new SwapChain(this, device, context_, gipa_, instance_, physical_, gdpa_, queue_, queue_family_); | 787 | auto* sc = new SwapChain(this, device, context_, gipa_, instance_, physical_, gdpa_, queue_, queue_family_); |
| 786 | if (!sc->init(hwnd, *desc)) { | 788 | if (!sc->init(hwnd, *desc, vk_fmt)) { |
| 787 | sc->Release(); | 789 | sc->Release(); |
| 788 | return E_FAIL; | 790 | return E_FAIL; |
| 789 | } | 791 | } |
| 790 | *out = static_cast<IDXGISwapChain1*>(sc); | 792 | *out = static_cast<IDXGISwapChain1*>(sc); |
| 791 | return S_OK; | 793 | return S_OK; |
| 792 | } | 794 | } |
| 793 | HRESULT STDMETHODCALLTYPE CreateSwapChainForCoreWindow(IUnknown*, IUnknown*, const DXGI_SWAP_CHAIN_DESC1*, | 795 | HRESULT STDMETHODCALLTYPE CreateSwapChainForCoreWindow(IUnknown* device, IUnknown* window, |
| 794 | IDXGIOutput*, IDXGISwapChain1**) override { | 796 | const DXGI_SWAP_CHAIN_DESC1* desc, |
| 795 | return E_NOTIMPL; | 797 | IDXGIOutput* restrict_to_output, |
| 798 | IDXGISwapChain1** out) override { | ||
| 799 | if (!out) return E_POINTER; | ||
| 800 | *out = nullptr; | ||
| 801 | if (!device || !window || !desc) return E_INVALIDARG; | ||
| 802 | // UWP / Game Core Scarlett titles present to an ICoreWindow. Extract the underlying | ||
| 803 | // Win32 HWND via ICoreWindowInterop. | ||
| 804 | static constexpr GUID kIID_ICoreWindowInterop = { | ||
| 805 | 0x45D64A29, 0xA63E, 0x4CB6, {0xB4, 0x98, 0x57, 0x81, 0xD2, 0x98, 0xCB, 0x4F}}; | ||
| 806 | struct ICoreWindowInterop : public IUnknown { | ||
| 807 | virtual HRESULT STDMETHODCALLTYPE get_WindowHandle(HWND* hwnd) = 0; | ||
| 808 | virtual HRESULT STDMETHODCALLTYPE put_MessageHandled(unsigned char value) = 0; | ||
| 809 | }; | ||
| 810 | ICoreWindowInterop* interop = nullptr; | ||
| 811 | if (FAILED(window->QueryInterface(kIID_ICoreWindowInterop, reinterpret_cast<void**>(&interop))) || !interop) { | ||
| 812 | return DXGI_ERROR_INVALID_CALL; | ||
| 813 | } | ||
| 814 | HWND hwnd = nullptr; | ||
| 815 | const HRESULT hr = interop->get_WindowHandle(&hwnd); | ||
| 816 | interop->Release(); | ||
| 817 | if (FAILED(hr) || !hwnd) return DXGI_ERROR_INVALID_CALL; | ||
| 818 | return CreateSwapChainForHwnd(device, hwnd, desc, nullptr, restrict_to_output, out); | ||
| 796 | } | 819 | } |
| 797 | HRESULT STDMETHODCALLTYPE GetSharedResourceAdapterLuid(HANDLE, LUID*) override { return E_NOTIMPL; } | 820 | HRESULT STDMETHODCALLTYPE GetSharedResourceAdapterLuid(HANDLE, LUID*) override { return E_NOTIMPL; } |
| 798 | HRESULT STDMETHODCALLTYPE RegisterStereoStatusWindow(HWND, UINT, DWORD*) override { return E_NOTIMPL; } | 821 | HRESULT STDMETHODCALLTYPE RegisterStereoStatusWindow(HWND, UINT, DWORD*) override { return E_NOTIMPL; } |
| 799 | HRESULT STDMETHODCALLTYPE RegisterStereoStatusEvent(HANDLE, DWORD*) override { return E_NOTIMPL; } | 822 | HRESULT STDMETHODCALLTYPE RegisterStereoStatusEvent(HANDLE, DWORD*) override { return E_NOTIMPL; } |
| 800 | void STDMETHODCALLTYPE UnregisterStereoStatus(DWORD) override {} | 823 | void STDMETHODCALLTYPE UnregisterStereoStatus(DWORD) override {} |
| 801 | HRESULT STDMETHODCALLTYPE RegisterOcclusionStatusWindow(HWND, UINT, DWORD*) override { return E_NOTIMPL; } | 824 | HRESULT STDMETHODCALLTYPE RegisterOcclusionStatusWindow(HWND hwnd, UINT msg, DWORD* cookie) override { |
| 802 | HRESULT STDMETHODCALLTYPE RegisterOcclusionStatusEvent(HANDLE, DWORD*) override { return E_NOTIMPL; } | 825 | (void)msg; |
| 826 | if (!hwnd || !cookie) return DXGI_ERROR_INVALID_CALL; | ||
| 827 | *cookie = next_occlusion_cookie_.fetch_add(1, std::memory_order_relaxed); | ||
| 828 | return S_OK; | ||
| 829 | } | ||
| 830 | HRESULT STDMETHODCALLTYPE RegisterOcclusionStatusEvent(HANDLE event, DWORD* cookie) override { | ||
| 831 | if (!event || !cookie) return DXGI_ERROR_INVALID_CALL; | ||
| 832 | *cookie = next_occlusion_cookie_.fetch_add(1, std::memory_order_relaxed); | ||
| 833 | return S_OK; | ||
| 834 | } | ||
| 803 | void STDMETHODCALLTYPE UnregisterOcclusionStatus(DWORD) override {} | 835 | void STDMETHODCALLTYPE UnregisterOcclusionStatus(DWORD) override {} |
| 804 | HRESULT STDMETHODCALLTYPE CreateSwapChainForComposition(IUnknown*, const DXGI_SWAP_CHAIN_DESC1*, IDXGIOutput*, | 836 | HRESULT STDMETHODCALLTYPE CreateSwapChainForComposition(IUnknown*, const DXGI_SWAP_CHAIN_DESC1*, IDXGIOutput*, |
| 805 | IDXGISwapChain1**) override { | 837 | IDXGISwapChain1**) override { |
| @@ -885,6 +917,7 @@ private: | |||
| 885 | HWND assoc_hwnd_ = nullptr; | 917 | HWND assoc_hwnd_ = nullptr; |
| 886 | mutable std::once_flag tearing_once_; | 918 | mutable std::once_flag tearing_once_; |
| 887 | bool tearing_supported_ = false; | 919 | bool tearing_supported_ = false; |
| 920 | std::atomic<DWORD> next_occlusion_cookie_{1}; | ||
| 888 | }; | 921 | }; |
| 889 | 922 | ||
| 890 | } // namespace | 923 | } // namespace |
diff --git a/runtime/shims/file_system.cpp b/runtime/shims/file_system.cpp index 38c3194fe..f0ae08811 100644 --- a/runtime/shims/file_system.cpp +++ b/runtime/shims/file_system.cpp | |||
| @@ -142,7 +142,9 @@ std::filesystem::path marker(const std::filesystem::path& overlay, const std::ve | |||
| 142 | bool deleted(const std::filesystem::path& overlay, const std::vector<std::wstring>& parts) { | 142 | bool deleted(const std::filesystem::path& overlay, const std::vector<std::wstring>& parts) { |
| 143 | if (overlay.empty() || parts.empty()) return false; | 143 | if (overlay.empty() || parts.empty()) return false; |
| 144 | std::error_code ec; | 144 | std::error_code ec; |
| 145 | return std::filesystem::exists(marker(overlay, parts), ec); | 145 | // Only regular files are deletion markers; parent directories inside .gta6rt-deleted/ exist only to hold markers |
| 146 | // for nested deleted files and must not hide the corresponding ancestor directories in the package. | ||
| 147 | return std::filesystem::is_regular_file(marker(overlay, parts), ec); | ||
| 146 | } | 148 | } |
| 147 | 149 | ||
| 148 | Target read_target(const std::wstring& path) { | 150 | Target read_target(const std::wstring& path) { |
diff --git a/runtime/shims/process.cpp b/runtime/shims/process.cpp index c0070782f..d3f76a684 100644 --- a/runtime/shims/process.cpp +++ b/runtime/shims/process.cpp | |||
| @@ -9,6 +9,10 @@ | |||
| 9 | // process-wide atexit table also holds gta6rt's own). | 9 | // process-wide atexit table also holds gta6rt's own). |
| 10 | // Covered CRTs: the Universal CRT (api-ms-win-crt-runtime-l1-1-0.dll / ucrtbase.dll, what MSVC links; ucrtbased.dll in Debug) and | 10 | // Covered CRTs: the Universal CRT (api-ms-win-crt-runtime-l1-1-0.dll / ucrtbase.dll, what MSVC links; ucrtbased.dll in Debug) and |
| 11 | // msvcrt.dll (MinGW). Calls made inside host DLLs, not through the game's imports, are not seen here. | 11 | // msvcrt.dll (MinGW). Calls made inside host DLLs, not through the game's imports, are not seen here. |
| 12 | // The loader matches imports by exact DLL name, so GetCommandLineA/W and ExitProcess are served under every name a | ||
| 13 | // title can import them by: kernel32.dll (the classic import libraries), kernelbase.dll, and the API sets that the | ||
| 14 | // umbrella libraries a GDK title links (OneCore_apiset.lib, mincore.lib) bind them to. The retail package's own DLLs | ||
| 15 | // import ExitProcess from api-ms-win-core-processthreads-l1-1-0.dll. | ||
| 12 | #include <windows.h> | 16 | #include <windows.h> |
| 13 | 17 | ||
| 14 | #include <atomic> | 18 | #include <atomic> |
| @@ -16,6 +20,7 @@ | |||
| 16 | #include <cstdlib> | 20 | #include <cstdlib> |
| 17 | #include <cstring> | 21 | #include <cstring> |
| 18 | #include <string> | 22 | #include <string> |
| 23 | #include <type_traits> | ||
| 19 | #include <vector> | 24 | #include <vector> |
| 20 | 25 | ||
| 21 | #include "process_shim.h" | 26 | #include "process_shim.h" |
| @@ -107,6 +112,24 @@ wchar_t** __cdecl game_p_wcmdln_storage() { | |||
| 107 | return &p; | 112 | return &p; |
| 108 | } | 113 | } |
| 109 | 114 | ||
| 115 | // What the UCRT's _get_narrow/_get_wide_winmain_command_line return, and the CRT's WinMain startup passes as | ||
| 116 | // lpCmdLine: the command line after the program name and the blanks that follow it. The program name ends at the | ||
| 117 | // first character up to ' ' outside quotes, the UCRT's own scan. The comparison is unsigned, so a non-ASCII byte of | ||
| 118 | // the narrow line is part of the name; a DBCS trail byte is never '"' or a blank, so it needs no lead-byte step. | ||
| 119 | template <typename C> | ||
| 120 | C* after_program_name(C* p) { | ||
| 121 | using U = std::make_unsigned_t<C>; | ||
| 122 | bool quoted = false; | ||
| 123 | while (U(*p) > U(' ') || (*p && quoted)) { | ||
| 124 | if (*p == C('"')) quoted = !quoted; | ||
| 125 | ++p; | ||
| 126 | } | ||
| 127 | while (*p && U(*p) <= U(' ')) ++p; | ||
| 128 | return p; | ||
| 129 | } | ||
| 130 | char* __cdecl game_get_narrow_winmain_command_line() { return after_program_name(g_cmdline.data()); } | ||
| 131 | wchar_t* __cdecl game_get_wide_winmain_command_line() { return after_program_name(g_wcmdline.data()); } | ||
| 132 | |||
| 110 | // msvcrt.dll: int __getmainargs(int* argc, char*** argv, char*** env, int expand, void* startinfo) | 133 | // msvcrt.dll: int __getmainargs(int* argc, char*** argv, char*** env, int expand, void* startinfo) |
| 111 | int __cdecl game_getmainargs(int* argc, char*** argv, char*** env, int, void*) { | 134 | int __cdecl game_getmainargs(int* argc, char*** argv, char*** env, int, void*) { |
| 112 | *argc = g_argc; | 135 | *argc = g_argc; |
| @@ -197,7 +220,13 @@ using namespace rt::process; | |||
| 197 | {dll, "_configure_narrow_argv", reinterpret_cast<void*>(&game_configure_argv)}, \ | 220 | {dll, "_configure_narrow_argv", reinterpret_cast<void*>(&game_configure_argv)}, \ |
| 198 | {dll, "_configure_wide_argv", reinterpret_cast<void*>(&game_configure_argv)}, \ | 221 | {dll, "_configure_wide_argv", reinterpret_cast<void*>(&game_configure_argv)}, \ |
| 199 | {dll, "__p__acmdln", reinterpret_cast<void*>(&game_p_acmdln_storage)}, \ | 222 | {dll, "__p__acmdln", reinterpret_cast<void*>(&game_p_acmdln_storage)}, \ |
| 200 | {dll, "__p__wcmdln", reinterpret_cast<void*>(&game_p_wcmdln_storage)} | 223 | {dll, "__p__wcmdln", reinterpret_cast<void*>(&game_p_wcmdln_storage)}, \ |
| 224 | {dll, "_get_narrow_winmain_command_line", reinterpret_cast<void*>(&game_get_narrow_winmain_command_line)}, \ | ||
| 225 | {dll, "_get_wide_winmain_command_line", reinterpret_cast<void*>(&game_get_wide_winmain_command_line)} | ||
| 226 | #define EXIT_PROCESS(dll) {dll, "ExitProcess", reinterpret_cast<void*>(&game_exit_process)} | ||
| 227 | #define COMMAND_LINE(dll) \ | ||
| 228 | {dll, "GetCommandLineA", reinterpret_cast<void*>(&game_get_command_line_a)}, \ | ||
| 229 | {dll, "GetCommandLineW", reinterpret_cast<void*>(&game_get_command_line_w)} | ||
| 201 | } // namespace | 230 | } // namespace |
| 202 | 231 | ||
| 203 | SHIM_TABLE(process, | 232 | SHIM_TABLE(process, |
| @@ -209,7 +238,10 @@ SHIM_TABLE(process, | |||
| 209 | {"msvcrt.dll", "abort", reinterpret_cast<void*>(&game_abort)}, | 238 | {"msvcrt.dll", "abort", reinterpret_cast<void*>(&game_abort)}, |
| 210 | {"msvcrt.dll", "__getmainargs", reinterpret_cast<void*>(&game_getmainargs)}, | 239 | {"msvcrt.dll", "__getmainargs", reinterpret_cast<void*>(&game_getmainargs)}, |
| 211 | {"msvcrt.dll", "__wgetmainargs", reinterpret_cast<void*>(&game_wgetmainargs)}, | 240 | {"msvcrt.dll", "__wgetmainargs", reinterpret_cast<void*>(&game_wgetmainargs)}, |
| 212 | {"kernel32.dll", "ExitProcess", reinterpret_cast<void*>(&game_exit_process)}, | 241 | EXIT_PROCESS("kernel32.dll"), |
| 213 | {"kernel32.dll", "GetCommandLineA", reinterpret_cast<void*>(&game_get_command_line_a)}, | 242 | EXIT_PROCESS("kernelbase.dll"), |
| 214 | {"kernel32.dll", "GetCommandLineW", reinterpret_cast<void*>(&game_get_command_line_w)}, | 243 | EXIT_PROCESS("api-ms-win-core-processthreads-l1-1-0.dll"), |
| 244 | COMMAND_LINE("kernel32.dll"), | ||
| 245 | COMMAND_LINE("kernelbase.dll"), | ||
| 246 | COMMAND_LINE("api-ms-win-core-processenvironment-l1-1-0.dll"), | ||
| 215 | ); | 247 | ); |
diff --git a/runtime/shims/xgameruntime.cpp b/runtime/shims/xgameruntime.cpp index 8135589b9..46aec5af7 100644 --- a/runtime/shims/xgameruntime.cpp +++ b/runtime/shims/xgameruntime.cpp | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <cstdio> | 16 | #include <cstdio> |
| 17 | #include <cstdlib> | 17 | #include <cstdlib> |
| 18 | #include <cstring> | 18 | #include <cstring> |
| 19 | #include <iterator> | ||
| 19 | 20 | ||
| 20 | #include <XAsync.h> | 21 | #include <XAsync.h> |
| 21 | #include <XAsyncProvider.h> | 22 | #include <XAsyncProvider.h> |
| @@ -35,9 +36,9 @@ std::atomic<int> g_runtime_refs{0}; | |||
| 35 | // "xgameruntime.dll" and GetProcAddress these five names (measured in the package's libHttpClient.GDK.dll and | 36 | // "xgameruntime.dll" and GetProcAddress these five names (measured in the package's libHttpClient.GDK.dll and |
| 36 | // XCurl.dll, docs/runtime_imports.md). Signatures, the options struct and the error for an unknown class follow | 37 | // XCurl.dll, docs/runtime_imports.md). Signatures, the options struct and the error for an unknown class follow |
| 37 | // xodus-gaming/xgameruntime-docs (GPL-3.0; facts only, nothing copied): InitializeApiImplEx2 is the one | 38 | // xodus-gaming/xgameruntime-docs (GPL-3.0; facts only, nothing copied): InitializeApiImplEx2 is the one |
| 38 | // XGameRuntimeInitialize[WithOptions] calls, and QueryApiImpl hands out the runtime's COM classes. The classes' | 39 | // XGameRuntimeInitialize[WithOptions] calls, and QueryApiImpl hands out the runtime's COM classes. XThreadingImpl and |
| 39 | // method layouts are not known yet, so QueryApiImpl logs each class and interface id it is asked for and refuses | 40 | // XErrorImpl are served (their layouts are measured, below); for any other class QueryApiImpl logs the class and |
| 40 | // them; the first boot with the executable then lists the interfaces to implement. | 41 | // interface id and refuses it, so the first boot with the executable lists the interfaces to implement next. |
| 41 | 42 | ||
| 42 | struct ApiImplOptions { // InitializeApiImplEx2's fourth argument | 43 | struct ApiImplOptions { // InitializeApiImplEx2's fourth argument |
| 43 | uint32_t unknown; // documented as always 1 | 44 | uint32_t unknown; // documented as always 1 |
| @@ -85,8 +86,149 @@ void print_guid(char (&out)[40], const GUID* g) { | |||
| 85 | g->Data4[6], g->Data4[7]); | 86 | g->Data4[6], g->Data4[7]); |
| 86 | } | 87 | } |
| 87 | 88 | ||
| 89 | // ---- The runtime classes QueryApiImpl hands out ---- | ||
| 90 | // | ||
| 91 | // xgameruntime.lib's thunk for each function asks QueryApiImpl for the class (passing the class id as the interface | ||
| 92 | // id too), calls one slot of the object's vtable with the function's own arguments after `this`, and Releases it. | ||
| 93 | // The slot order is xgameruntime-docs' "Layout" list after IUnknown's three slots, and it is measured: the thunks | ||
| 94 | // statically linked into the package's libHttpClient.GDK.dll and XCurl.dll (disassembled, their code not run) | ||
| 95 | // call IXThreadingImpl slots 3-7 and 9-30, each with the argument shape of the documented function in that | ||
| 96 | // position (XAsyncBegin's five arguments at slot 7, XTaskQueueCreate's two modes and a handle pointer at 12, | ||
| 97 | // XTaskQueueTerminate's bool at 22, XThreadSetTimeSensitive's bool at 27, ...), and IXErrorImpl slot 3 with an | ||
| 98 | // HRESULT and a pointer. docs/runtime_imports.md has the table. Each function is served by the implementation the | ||
| 99 | // named export already uses (third_party/xtaskqueue), so the two ways in behave the same. | ||
| 100 | |||
| 101 | constexpr GUID kThreadingClass = {0x073b7dcb, 0x1fcf, 0x4030, {0x94, 0xbe, 0xe3, 0xc9, 0xeb, 0x62, 0x34, 0x28}}; | ||
| 102 | constexpr GUID kErrorClass = {0x8ca467f7, 0x22e8, 0x4096, {0x84, 0x56, 0xbb, 0x8a, 0xa1, 0x3f, 0x79, 0xd8}}; | ||
| 103 | |||
| 104 | // A function's arguments after `this`, forwarded unchanged (x64 has one calling convention). | ||
| 105 | // Specialised on the function's exact type, so a noexcept function matches only one form. | ||
| 106 | template <auto F, class T = decltype(F)> struct Method; | ||
| 107 | template <auto F, class R, class... A> struct Method<F, R (*)(A...)> { | ||
| 108 | static R STDMETHODCALLTYPE call(void*, A... a) { return F(a...); } | ||
| 109 | }; | ||
| 110 | template <auto F, class R, class... A> struct Method<F, R (*)(A...) noexcept> { | ||
| 111 | static R STDMETHODCALLTYPE call(void*, A... a) noexcept { return F(a...); } | ||
| 112 | }; | ||
| 113 | |||
| 114 | constexpr GUID kIUnknown = {0x00000000, 0x0000, 0x0000, {0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}}; | ||
| 115 | |||
| 116 | // The runtime's objects are process-wide singletons: AddRef/Release count but never free. | ||
| 117 | struct RuntimeObject { | ||
| 118 | const void* const* vtable; | ||
| 119 | const GUID* class_id; | ||
| 120 | std::atomic<long> refs{1}; | ||
| 121 | }; | ||
| 122 | |||
| 123 | HRESULT STDMETHODCALLTYPE object_query_interface(void* self, REFIID iid, void** out) { | ||
| 124 | if (!out) return E_POINTER; | ||
| 125 | auto* o = static_cast<RuntimeObject*>(self); | ||
| 126 | if (iid == kIUnknown || iid == *o->class_id) { | ||
| 127 | o->refs.fetch_add(1); | ||
| 128 | *out = self; | ||
| 129 | return S_OK; | ||
| 130 | } | ||
| 131 | *out = nullptr; | ||
| 132 | return E_NOINTERFACE; | ||
| 133 | } | ||
| 134 | ULONG STDMETHODCALLTYPE object_add_ref(void* self) { return static_cast<ULONG>(static_cast<RuntimeObject*>(self)->refs.fetch_add(1) + 1); } | ||
| 135 | ULONG STDMETHODCALLTYPE object_release(void* self) { | ||
| 136 | long prev = static_cast<RuntimeObject*>(self)->refs.load(); | ||
| 137 | while (prev > 1 && !static_cast<RuntimeObject*>(self)->refs.compare_exchange_weak(prev, prev - 1)) {} | ||
| 138 | return static_cast<ULONG>(prev > 1 ? prev - 1 : 1); // the singleton's own reference stays | ||
| 139 | } | ||
| 140 | |||
| 141 | // A private slot whose signature isn't public: logged once, answers 0 (S_OK / false / nothing to do). | ||
| 142 | template <int Slot> uint64_t STDMETHODCALLTYPE private_slot(void*) { | ||
| 143 | static std::atomic<bool> s_logged{false}; | ||
| 144 | if (!s_logged.exchange(true)) | ||
| 145 | std::fprintf(stderr, "[rt] xgameruntime: XThreadingImpl private slot %d called; answering 0\n", Slot); | ||
| 146 | return 0; | ||
| 147 | } | ||
| 148 | |||
| 149 | // XThreadSetTimeSensitive / XThreadIsTimeSensitive / XThreadAssertNotTimeSensitive. The flag is per thread, as in | ||
| 150 | // the GDK; nothing is enforced offline (a time-sensitive thread may still block). | ||
| 151 | thread_local bool t_time_sensitive = false; | ||
| 152 | HRESULT STDMETHODCALLTYPE thread_set_time_sensitive(void*, bool value) { | ||
| 153 | t_time_sensitive = value; | ||
| 154 | return S_OK; | ||
| 155 | } | ||
| 156 | void STDMETHODCALLTYPE thread_assert_not_time_sensitive(void*) {} | ||
| 157 | bool STDMETHODCALLTYPE thread_is_time_sensitive(void*) { return t_time_sensitive; } | ||
| 158 | |||
| 159 | #define XM(fn) reinterpret_cast<const void*>(&Method<&fn>::call) | ||
| 160 | const void* const kThreadingVtable[] = { | ||
| 161 | reinterpret_cast<const void*>(&object_query_interface), reinterpret_cast<const void*>(&object_add_ref), | ||
| 162 | reinterpret_cast<const void*>(&object_release), | ||
| 163 | XM(XAsyncGetStatus), // 3 | ||
| 164 | XM(XAsyncGetResultSize), // 4 | ||
| 165 | XM(XAsyncCancel), // 5 | ||
| 166 | XM(XAsyncRun), // 6 | ||
| 167 | XM(XAsyncBegin), // 7 | ||
| 168 | reinterpret_cast<const void*>(&private_slot<8>), // 8 XAsyncBeginAlloc (private, not called by the package) | ||
| 169 | XM(XAsyncSchedule), // 9 | ||
| 170 | XM(XAsyncComplete), // 10 | ||
| 171 | XM(XAsyncGetResult), // 11 | ||
| 172 | XM(XTaskQueueCreate), // 12 | ||
| 173 | XM(XTaskQueueCreateComposite), // 13 | ||
| 174 | XM(XTaskQueueGetPort), // 14 | ||
| 175 | XM(XTaskQueueDuplicateHandle), // 15 | ||
| 176 | XM(XTaskQueueDispatch), // 16 | ||
| 177 | XM(XTaskQueueCloseHandle), // 17 | ||
| 178 | XM(XTaskQueueSubmitCallback), // 18 | ||
| 179 | XM(XTaskQueueSubmitDelayedCallback), // 19 | ||
| 180 | XM(XTaskQueueRegisterWaiter), // 20 | ||
| 181 | XM(XTaskQueueUnregisterWaiter), // 21 | ||
| 182 | XM(XTaskQueueTerminate), // 22 | ||
| 183 | XM(XTaskQueueRegisterMonitor), // 23 | ||
| 184 | XM(XTaskQueueUnregisterMonitor), // 24 | ||
| 185 | XM(XTaskQueueGetCurrentProcessTaskQueue), // 25 | ||
| 186 | XM(XTaskQueueSetCurrentProcessTaskQueue), // 26 | ||
| 187 | reinterpret_cast<const void*>(&thread_set_time_sensitive), // 27 | ||
| 188 | reinterpret_cast<const void*>(&private_slot<28>), // 28 XTaskQueueIsEmpty (private; no arguments) | ||
| 189 | reinterpret_cast<const void*>(&thread_assert_not_time_sensitive), // 29 | ||
| 190 | reinterpret_cast<const void*>(&thread_is_time_sensitive), // 30 | ||
| 191 | }; | ||
| 192 | #undef XM | ||
| 193 | static_assert(std::size(kThreadingVtable) == 31, "IUnknown + IXThreadingImpl's 28 methods"); | ||
| 194 | |||
| 195 | // IXErrorImpl: XErrorReport(HRESULT, const char*) at slot 3 (the docs' "_unknown_"; XCurl calls it with an HRESULT | ||
| 196 | // and a string), XErrorSetCallback(XErrorCallback*, void*) and XErrorSetOptions(options, options). Offline, a report | ||
| 197 | // is logged and handed to the callback the title set, if any. | ||
| 198 | using XErrorCallback = bool(CALLBACK*)(HRESULT hr, const char* message, void* context); | ||
| 199 | std::atomic<XErrorCallback> g_error_callback{nullptr}; | ||
| 200 | std::atomic<void*> g_error_context{nullptr}; | ||
| 201 | |||
| 202 | void STDMETHODCALLTYPE error_report(void*, HRESULT hr, const char* message) { | ||
| 203 | static std::atomic<int> s_logged{0}; | ||
| 204 | if (s_logged.fetch_add(1) < 64) | ||
| 205 | std::fprintf(stderr, "[rt] xgameruntime: XErrorReport(0x%08lx, %s)\n", static_cast<unsigned long>(hr), | ||
| 206 | message ? message : "(null)"); | ||
| 207 | if (XErrorCallback cb = g_error_callback.load()) cb(hr, message, g_error_context.load()); | ||
| 208 | } | ||
| 209 | void STDMETHODCALLTYPE error_set_callback(void*, XErrorCallback callback, void* context) { | ||
| 210 | g_error_context = context; | ||
| 211 | g_error_callback = callback; | ||
| 212 | } | ||
| 213 | HRESULT STDMETHODCALLTYPE error_set_options(void*, uint32_t, uint32_t) { return S_OK; } | ||
| 214 | |||
| 215 | const void* const kErrorVtable[] = { | ||
| 216 | reinterpret_cast<const void*>(&object_query_interface), reinterpret_cast<const void*>(&object_add_ref), | ||
| 217 | reinterpret_cast<const void*>(&object_release), | ||
| 218 | reinterpret_cast<const void*>(&error_report), // 3 | ||
| 219 | reinterpret_cast<const void*>(&error_set_callback), // 4 | ||
| 220 | reinterpret_cast<const void*>(&error_set_options), // 5 | ||
| 221 | }; | ||
| 222 | |||
| 223 | RuntimeObject g_threading{kThreadingVtable, &kThreadingClass}; | ||
| 224 | RuntimeObject g_error{kErrorVtable, &kErrorClass}; | ||
| 225 | |||
| 88 | HRESULT WINAPI QueryApiImpl(const GUID* class_id, REFIID interface_id, void** out) { | 226 | HRESULT WINAPI QueryApiImpl(const GUID* class_id, REFIID interface_id, void** out) { |
| 89 | if (out) *out = nullptr; | 227 | if (out) *out = nullptr; |
| 228 | if (class_id && out) { | ||
| 229 | for (RuntimeObject* o : {&g_threading, &g_error}) | ||
| 230 | if (*class_id == *o->class_id) return object_query_interface(o, interface_id, out); | ||
| 231 | } | ||
| 90 | char cls[40], iid[40]; | 232 | char cls[40], iid[40]; |
| 91 | print_guid(cls, class_id); | 233 | print_guid(cls, class_id); |
| 92 | print_guid(iid, &interface_id); | 234 | print_guid(iid, &interface_id); |
| @@ -156,6 +298,115 @@ uint64_t __stdcall XSystemGetAppMemoryUsage() { | |||
| 156 | return 0; | 298 | return 0; |
| 157 | } | 299 | } |
| 158 | 300 | ||
| 301 | // XVersion: 4-part version structure from GDK XGameRuntimeTypes.h (8 bytes) | ||
| 302 | struct XVersion { | ||
| 303 | union { | ||
| 304 | struct { | ||
| 305 | uint16_t major; | ||
| 306 | uint16_t minor; | ||
| 307 | uint16_t build; | ||
| 308 | uint16_t revision; | ||
| 309 | }; | ||
| 310 | uint64_t Value; | ||
| 311 | }; | ||
| 312 | }; | ||
| 313 | static_assert(sizeof(XVersion) == 8, "XVersion must be 8 bytes"); | ||
| 314 | |||
| 315 | // XSystemAnalyticsInfo: hardware and OS version telemetry (144 bytes) | ||
| 316 | struct XSystemAnalyticsInfo { | ||
| 317 | XVersion osVersion; | ||
| 318 | XVersion hostingOsVersion; | ||
| 319 | char family[64]; | ||
| 320 | char form[64]; | ||
| 321 | }; | ||
| 322 | static_assert(sizeof(XSystemAnalyticsInfo) == 144, "XSystemAnalyticsInfo must be 144 bytes"); | ||
| 323 | |||
| 324 | // XSystemAnalyticsInfo XSystemGetAnalyticsInfo() | ||
| 325 | // Returned by value per Microsoft GDK specification. | ||
| 326 | XSystemAnalyticsInfo __stdcall XSystemGetAnalyticsInfo() { | ||
| 327 | XSystemAnalyticsInfo info{}; | ||
| 328 | info.osVersion = {10, 0, 22000, 0}; | ||
| 329 | info.hostingOsVersion = {10, 0, 22000, 0}; | ||
| 330 | std::strncpy(info.family, "Xbox", sizeof(info.family) - 1); | ||
| 331 | |||
| 332 | const uint32_t dt = XSystemGetDeviceType(); | ||
| 333 | if (dt == static_cast<uint32_t>(XSystemDeviceType::XboxScarlettLockhart)) { | ||
| 334 | std::strncpy(info.form, "Xbox Series S", sizeof(info.form) - 1); | ||
| 335 | } else { | ||
| 336 | std::strncpy(info.form, "Xbox Series X", sizeof(info.form) - 1); | ||
| 337 | } | ||
| 338 | |||
| 339 | char form_override[64]; | ||
| 340 | const DWORD n = GetEnvironmentVariableA("LEONIDA_ANALYTICS_FORM", form_override, sizeof(form_override)); | ||
| 341 | if (n > 0 && n < sizeof(form_override)) { | ||
| 342 | std::strncpy(info.form, form_override, sizeof(info.form) - 1); | ||
| 343 | } | ||
| 344 | return info; | ||
| 345 | } | ||
| 346 | |||
| 347 | // ---- XPackage ---- | ||
| 348 | |||
| 349 | constexpr size_t XPACKAGE_IDENTIFIER_MAX_LENGTH = 33; | ||
| 350 | constexpr char kDefaultPackageIdentifier[XPACKAGE_IDENTIFIER_MAX_LENGTH] = "LeonidaPackageIdentifier00000000"; | ||
| 351 | static_assert(sizeof(kDefaultPackageIdentifier) == XPACKAGE_IDENTIFIER_MAX_LENGTH, | ||
| 352 | "default package identifier must match XPACKAGE_IDENTIFIER_MAX_LENGTH"); | ||
| 353 | |||
| 354 | // HRESULT XPackageGetCurrentProcessPackageIdentifier(size_t bufferSize, char* buffer). | ||
| 355 | // Retrieves the package identifier string for the current process. | ||
| 356 | HRESULT __stdcall XPackageGetCurrentProcessPackageIdentifier(size_t bufferSize, char* buffer) { | ||
| 357 | if (!buffer || bufferSize == 0) return E_INVALIDARG; | ||
| 358 | |||
| 359 | char id[XPACKAGE_IDENTIFIER_MAX_LENGTH] = {}; | ||
| 360 | const DWORD n = GetEnvironmentVariableA("LEONIDA_PACKAGE_ID", id, sizeof(id)); | ||
| 361 | const char* selected = (n > 0 && n < sizeof(id)) ? id : kDefaultPackageIdentifier; | ||
| 362 | const size_t len = std::strlen(selected); | ||
| 363 | |||
| 364 | if (bufferSize < len + 1) return HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); | ||
| 365 | std::memcpy(buffer, selected, len + 1); | ||
| 366 | return S_OK; | ||
| 367 | } | ||
| 368 | |||
| 369 | // HRESULT XPackageGetMountPath(XPackageMountHandle mount, size_t pathSize, char* path). | ||
| 370 | // Retrieves the installed filesystem path for the mounted package. | ||
| 371 | // Reads LEONIDA_GAME_DIR when set, otherwise falls back to the current module's directory. | ||
| 372 | HRESULT __stdcall XPackageGetMountPath(void* /*mount*/, size_t pathSize, char* path) { | ||
| 373 | if (!path || pathSize == 0) return E_INVALIDARG; | ||
| 374 | |||
| 375 | char buf[MAX_PATH] = {}; | ||
| 376 | const DWORD n = GetEnvironmentVariableA("LEONIDA_GAME_DIR", buf, sizeof(buf)); | ||
| 377 | if (n == 0 || n >= sizeof(buf)) { | ||
| 378 | const DWORD mod_len = GetModuleFileNameA(nullptr, buf, sizeof(buf)); | ||
| 379 | if (mod_len > 0 && mod_len < sizeof(buf)) { | ||
| 380 | char* slash = std::strrchr(buf, '\\'); | ||
| 381 | char* fslash = std::strrchr(buf, '/'); | ||
| 382 | char* last = slash > fslash ? slash : fslash; | ||
| 383 | if (last) { | ||
| 384 | *last = '\0'; | ||
| 385 | } else { | ||
| 386 | return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); | ||
| 387 | } | ||
| 388 | } else { | ||
| 389 | return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); | ||
| 390 | } | ||
| 391 | } | ||
| 392 | |||
| 393 | const size_t len = std::strlen(buf); | ||
| 394 | if (pathSize < len + 1) return HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); | ||
| 395 | std::memcpy(path, buf, len + 1); | ||
| 396 | return S_OK; | ||
| 397 | } | ||
| 398 | |||
| 399 | // bool XPackageIsPackagedProcess(). | ||
| 400 | // Returns true on Xbox Series console. LEONIDA_PACKAGED=0 overrides it. | ||
| 401 | bool __stdcall XPackageIsPackagedProcess() { | ||
| 402 | char s[16]; | ||
| 403 | const DWORD n = GetEnvironmentVariableA("LEONIDA_PACKAGED", s, sizeof(s)); | ||
| 404 | if (n > 0 && n < sizeof(s)) { | ||
| 405 | if (std::atoi(s) == 0) return false; | ||
| 406 | } | ||
| 407 | return true; | ||
| 408 | } | ||
| 409 | |||
| 159 | #define XGR(name) {"xgameruntime.dll", #name, reinterpret_cast<void*>(&name)} | 410 | #define XGR(name) {"xgameruntime.dll", #name, reinterpret_cast<void*>(&name)} |
| 160 | 411 | ||
| 161 | } // namespace | 412 | } // namespace |
| @@ -173,6 +424,10 @@ SHIM_TABLE(xgameruntime, | |||
| 173 | XGR(XSystemGetConsoleId), | 424 | XGR(XSystemGetConsoleId), |
| 174 | XGR(XSystemGetAppMemoryUsageLimit), | 425 | XGR(XSystemGetAppMemoryUsageLimit), |
| 175 | XGR(XSystemGetAppMemoryUsage), | 426 | XGR(XSystemGetAppMemoryUsage), |
| 427 | XGR(XSystemGetAnalyticsInfo), | ||
| 428 | XGR(XPackageGetCurrentProcessPackageIdentifier), | ||
| 429 | XGR(XPackageGetMountPath), | ||
| 430 | XGR(XPackageIsPackagedProcess), | ||
| 176 | // XTaskQueue (third_party/xtaskqueue) | 431 | // XTaskQueue (third_party/xtaskqueue) |
| 177 | XGR(XTaskQueueCreate), | 432 | XGR(XTaskQueueCreate), |
| 178 | XGR(XTaskQueueCreateComposite), | 433 | XGR(XTaskQueueCreateComposite), |
diff --git a/runtime/src/base_reservation.h b/runtime/src/base_reservation.h new file mode 100644 index 000000000..bf4946895 --- /dev/null +++ b/runtime/src/base_reservation.h | |||
| @@ -0,0 +1,151 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | // Keeping a relocation-less game image's preferred range free until the loader maps it there. | ||
| 4 | // | ||
| 5 | // An EXE without a .reloc directory can only run at its ImageBase (0x140000000 by default). Windows and x86-64 Wine | ||
| 6 | // leave that range alone, but arm64 Wine on macOS (CrossOver's arm64 bottles, whose x86-64 code runs under FEX) puts | ||
| 7 | // its own start-up allocations at 0x100000000 and up, over that range, before gta6rt's first line runs. So gta6rt | ||
| 8 | // starts itself again, suspended, reserves [ImageBase, ImageBase + SizeOfImage) in that child before any of its code | ||
| 9 | // runs, and resumes it; the child's loader then commits the image inside the reservation (commit_reserved), so | ||
| 10 | // nothing else can take the range in between. The child is told by LEONIDA_BASE_RESERVED=<base>:<size> (hex), which | ||
| 11 | // also stops it from starting itself again. Measured on CrossOver Preview 20260821 (arm64 bottle, M2 Max): in a | ||
| 12 | // suspended child 0x140000000-0x170000000 is free and reservable; macOS maps its own regions above that (the arm64 | ||
| 13 | // shared region starts at 0x180000000), so a range there can't be had either way. | ||
| 14 | // | ||
| 15 | // Nothing changes where the range is free at start-up (Windows, x86-64 Wine) or where the image has relocations. | ||
| 16 | |||
| 17 | #include <windows.h> | ||
| 18 | |||
| 19 | #include <cstdint> | ||
| 20 | #include <cstdio> | ||
| 21 | #include <cstdlib> | ||
| 22 | #include <cwchar> | ||
| 23 | #include <filesystem> | ||
| 24 | #include <fstream> | ||
| 25 | #include <optional> | ||
| 26 | #include <string> | ||
| 27 | #include <vector> | ||
| 28 | |||
| 29 | namespace rt::base_reservation { | ||
| 30 | |||
| 31 | inline constexpr wchar_t kVariable[] = L"LEONIDA_BASE_RESERVED"; | ||
| 32 | |||
| 33 | struct Range { | ||
| 34 | std::uint64_t base = 0; | ||
| 35 | std::uint64_t size = 0; | ||
| 36 | }; | ||
| 37 | |||
| 38 | // The range this process was started with (LEONIDA_BASE_RESERVED), if any. | ||
| 39 | inline std::optional<Range> inherited() { | ||
| 40 | wchar_t value[64] = {}; | ||
| 41 | const DWORD length = GetEnvironmentVariableW(kVariable, value, 64); | ||
| 42 | if (!length || length >= 64) return std::nullopt; | ||
| 43 | Range r{}; | ||
| 44 | if (std::swscanf(value, L"%llx:%llx", reinterpret_cast<unsigned long long*>(&r.base), | ||
| 45 | reinterpret_cast<unsigned long long*>(&r.size)) != 2 || | ||
| 46 | !r.size) | ||
| 47 | return std::nullopt; | ||
| 48 | return r; | ||
| 49 | } | ||
| 50 | |||
| 51 | // Commits [base, base + size) for the loader when it lies inside the reservation this process was started with and | ||
| 52 | // that reservation is still in place; returns null otherwise (the caller then allocates as usual). The reservation | ||
| 53 | // is the allocation, so VirtualFree(base, 0, MEM_RELEASE) frees it as it frees any image. | ||
| 54 | inline void* commit_reserved(std::uint64_t base, std::uint64_t size) { | ||
| 55 | const auto r = inherited(); | ||
| 56 | if (!r || base != r->base || size > r->size) return nullptr; | ||
| 57 | MEMORY_BASIC_INFORMATION info{}; | ||
| 58 | if (!VirtualQuery(reinterpret_cast<void*>(base), &info, sizeof info) || info.State != MEM_RESERVE || | ||
| 59 | reinterpret_cast<std::uint64_t>(info.AllocationBase) != base) | ||
| 60 | return nullptr; | ||
| 61 | return VirtualAlloc(reinterpret_cast<void*>(base), static_cast<SIZE_T>(size), MEM_COMMIT, PAGE_READWRITE); | ||
| 62 | } | ||
| 63 | |||
| 64 | // The preferred range of `image` when it has no relocations and that range is not free in this process; nullopt | ||
| 65 | // when the image can be mapped as it is (or is not a readable PE32+, which the loader reports itself). | ||
| 66 | inline std::optional<Range> needed(const std::filesystem::path& image) { | ||
| 67 | std::ifstream file(image, std::ios::binary); | ||
| 68 | IMAGE_DOS_HEADER dos{}; | ||
| 69 | if (!file.read(reinterpret_cast<char*>(&dos), sizeof dos) || dos.e_magic != IMAGE_DOS_SIGNATURE || dos.e_lfanew < 0) | ||
| 70 | return std::nullopt; | ||
| 71 | IMAGE_NT_HEADERS64 nt{}; | ||
| 72 | if (!file.seekg(dos.e_lfanew) || !file.read(reinterpret_cast<char*>(&nt), sizeof nt) || | ||
| 73 | nt.Signature != IMAGE_NT_SIGNATURE || nt.OptionalHeader.Magic != IMAGE_NT_OPTIONAL_HDR64_MAGIC || | ||
| 74 | !nt.OptionalHeader.SizeOfImage) | ||
| 75 | return std::nullopt; | ||
| 76 | const auto& oh = nt.OptionalHeader; | ||
| 77 | if (oh.NumberOfRvaAndSizes > IMAGE_DIRECTORY_ENTRY_BASERELOC && | ||
| 78 | oh.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].Size) | ||
| 79 | return std::nullopt; // relocatable: the loader moves it if the base is taken | ||
| 80 | const Range r{oh.ImageBase, (static_cast<std::uint64_t>(oh.SizeOfImage) + 0xffff) & ~std::uint64_t{0xffff}}; | ||
| 81 | for (std::uint64_t at = r.base; at < r.base + r.size;) { | ||
| 82 | MEMORY_BASIC_INFORMATION info{}; | ||
| 83 | if (!VirtualQuery(reinterpret_cast<void*>(at), &info, sizeof info)) return r; | ||
| 84 | if (info.State != MEM_FREE) return r; | ||
| 85 | at = reinterpret_cast<std::uint64_t>(info.BaseAddress) + info.RegionSize; | ||
| 86 | } | ||
| 87 | return std::nullopt; | ||
| 88 | } | ||
| 89 | |||
| 90 | // Runs this program again with the same command line, suspended, reserves `r` in the new process, resumes it and | ||
| 91 | // returns its exit code. On failure prints why and returns 1 (the child, if any, is ended unrun). | ||
| 92 | inline int relaunch(const Range& r) { | ||
| 93 | wchar_t self[MAX_PATH * 4] = {}; | ||
| 94 | if (!GetModuleFileNameW(nullptr, self, MAX_PATH * 4)) { | ||
| 95 | std::fprintf(stderr, "error: GetModuleFileName failed (%lu)\n", GetLastError()); | ||
| 96 | return 1; | ||
| 97 | } | ||
| 98 | wchar_t marker[64]; | ||
| 99 | std::swprintf(marker, 64, L"%llx:%llx", static_cast<unsigned long long>(r.base), | ||
| 100 | static_cast<unsigned long long>(r.size)); | ||
| 101 | // Inherited by the child: it tells it to commit inside the reservation and not to relaunch again. | ||
| 102 | if (!SetEnvironmentVariableW(kVariable, marker)) { | ||
| 103 | std::fprintf(stderr, "error: setting %ls failed (%lu)\n", kVariable, GetLastError()); | ||
| 104 | return 1; | ||
| 105 | } | ||
| 106 | std::wstring command_line = GetCommandLineW(); | ||
| 107 | STARTUPINFOW startup{sizeof startup}; | ||
| 108 | startup.dwFlags = STARTF_USESTDHANDLES; | ||
| 109 | startup.hStdInput = GetStdHandle(STD_INPUT_HANDLE); | ||
| 110 | startup.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); | ||
| 111 | startup.hStdError = GetStdHandle(STD_ERROR_HANDLE); | ||
| 112 | for (HANDLE h : {startup.hStdInput, startup.hStdOutput, startup.hStdError}) | ||
| 113 | if (h && h != INVALID_HANDLE_VALUE) SetHandleInformation(h, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT); | ||
| 114 | PROCESS_INFORMATION process{}; | ||
| 115 | std::fflush(stdout); | ||
| 116 | std::fflush(stderr); | ||
| 117 | if (!CreateProcessW(self, command_line.data(), nullptr, nullptr, TRUE, CREATE_SUSPENDED, nullptr, nullptr, | ||
| 118 | &startup, &process)) { | ||
| 119 | std::fprintf(stderr, "error: starting gta6rt again to reserve the image range failed (%lu)\n", GetLastError()); | ||
| 120 | return 1; | ||
| 121 | } | ||
| 122 | const auto abandon = [&process] { // the child never ran: end it and release its handles | ||
| 123 | TerminateProcess(process.hProcess, 1); | ||
| 124 | CloseHandle(process.hThread); | ||
| 125 | CloseHandle(process.hProcess); | ||
| 126 | }; | ||
| 127 | if (!VirtualAllocEx(process.hProcess, reinterpret_cast<void*>(r.base), static_cast<SIZE_T>(r.size), MEM_RESERVE, | ||
| 128 | PAGE_NOACCESS)) { | ||
| 129 | const DWORD error = GetLastError(); | ||
| 130 | abandon(); | ||
| 131 | std::fprintf(stderr, | ||
| 132 | "error: the image has no relocations and its range %#llx-%#llx is taken, also in a new " | ||
| 133 | "process (VirtualAllocEx %lu)\n", | ||
| 134 | static_cast<unsigned long long>(r.base), static_cast<unsigned long long>(r.base + r.size), error); | ||
| 135 | return 1; | ||
| 136 | } | ||
| 137 | if (ResumeThread(process.hThread) == static_cast<DWORD>(-1)) { // still suspended: the wait would never end | ||
| 138 | const DWORD error = GetLastError(); | ||
| 139 | abandon(); | ||
| 140 | std::fprintf(stderr, "error: resuming the relaunched gta6rt failed (%lu)\n", error); | ||
| 141 | return 1; | ||
| 142 | } | ||
| 143 | WaitForSingleObject(process.hProcess, INFINITE); | ||
| 144 | DWORD code = 1; | ||
| 145 | GetExitCodeProcess(process.hProcess, &code); | ||
| 146 | CloseHandle(process.hThread); | ||
| 147 | CloseHandle(process.hProcess); | ||
| 148 | return static_cast<int>(code); | ||
| 149 | } | ||
| 150 | |||
| 151 | } // namespace rt::base_reservation | ||
diff --git a/runtime/src/command_list.h b/runtime/src/command_list.h index 9c74994e1..07520c2e3 100644 --- a/runtime/src/command_list.h +++ b/runtime/src/command_list.h | |||
| @@ -565,6 +565,11 @@ struct ExecuteIndirect { | |||
| 565 | std::uint64_t argument_offset = 0; | 565 | std::uint64_t argument_offset = 0; |
| 566 | ResourceId count_buffer = 0; // 0: fixed max_count; non-zero: vkCmdDraw*IndirectCount | 566 | ResourceId count_buffer = 0; // 0: fixed max_count; non-zero: vkCmdDraw*IndirectCount |
| 567 | std::uint64_t count_offset = 0; | 567 | std::uint64_t count_offset = 0; |
| 568 | // kind == dispatch: the compute pipeline and root arguments in effect, as Dispatch records them, so the dispatches | ||
| 569 | // run that pipeline with those arguments whatever the command buffer had bound. A pipeline of 0 leaves the binding | ||
| 570 | // as it is. | ||
| 571 | std::uintptr_t pipeline = 0; | ||
| 572 | std::array<std::uint32_t, 32> user_data{}; | ||
| 568 | }; | 573 | }; |
| 569 | 574 | ||
| 570 | // Triangle geometry descriptor for a BLAS build (ID3D12GraphicsCommandList4::BuildRaytracingAccelerationStructure). | 575 | // Triangle geometry descriptor for a BLAS build (ID3D12GraphicsCommandList4::BuildRaytracingAccelerationStructure). |
| @@ -594,11 +599,29 @@ struct BuildAccelerationStructure { | |||
| 594 | std::vector<RtTriangleGeometry> triangles; | 599 | std::vector<RtTriangleGeometry> triangles; |
| 595 | }; | 600 | }; |
| 596 | 601 | ||
| 602 | // CopyRaytracingAccelerationStructure. `mode` is D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE; replay supports | ||
| 603 | // CLONE (0) and COMPACT (1) for XDXR structures. | ||
| 604 | struct CopyAccelerationStructure { | ||
| 605 | std::uint64_t dst_va = 0; | ||
| 606 | std::uint64_t src_va = 0; | ||
| 607 | std::uint32_t mode = 0; | ||
| 608 | }; | ||
| 609 | |||
| 610 | // EmitRaytracingAccelerationStructurePostbuildInfo, and each postbuild desc of BuildRaytracingAccelerationStructure: | ||
| 611 | // one value per source, consecutively from `dest_va`. `type` is D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TYPE; | ||
| 612 | // replay supports COMPACTED_SIZE (0) and CURRENT_SIZE (3), 8 bytes each. | ||
| 613 | struct AccelerationStructurePostbuild { | ||
| 614 | std::uint64_t dest_va = 0; | ||
| 615 | std::uint32_t type = 0; | ||
| 616 | std::vector<std::uint64_t> sources; | ||
| 617 | }; | ||
| 618 | |||
| 597 | using Command = std::variant<TransitionBarrier, UavBarrier, AliasingBarrier, GlobalBarrier, BufferBarrier, | 619 | using Command = std::variant<TransitionBarrier, UavBarrier, AliasingBarrier, GlobalBarrier, BufferBarrier, |
| 598 | TextureBarrier, ClearRenderTarget, ClearDepthStencil, CopyBuffer, CopyTexture, | 620 | TextureBarrier, ClearRenderTarget, ClearDepthStencil, CopyBuffer, CopyTexture, |
| 599 | CopyResource, ResolveSubresource, Predication, ClearUnorderedAccess, DiscardResource, | 621 | CopyResource, ResolveSubresource, Predication, ClearUnorderedAccess, DiscardResource, |
| 600 | WriteImmediate, AtomicCopyBuffer, BeginQuery, EndQuery, ResolveQueries, DebugMarker, | 622 | WriteImmediate, AtomicCopyBuffer, BeginQuery, EndQuery, ResolveQueries, DebugMarker, |
| 601 | ExecuteIndirect, BuildAccelerationStructure, Dispatch, Draw>; | 623 | ExecuteIndirect, BuildAccelerationStructure, Dispatch, Draw, CopyAccelerationStructure, |
| 624 | AccelerationStructurePostbuild>; | ||
| 602 | 625 | ||
| 603 | class CommandList { | 626 | class CommandList { |
| 604 | public: | 627 | public: |
| @@ -809,6 +832,17 @@ public: | |||
| 809 | if (!build.dst_va || !build.scratch_va) return false; | 832 | if (!build.dst_va || !build.scratch_va) return false; |
| 810 | return append(std::move(build)); | 833 | return append(std::move(build)); |
| 811 | } | 834 | } |
| 835 | // D3D12: acceleration structures are 256-byte aligned, postbuild destinations 8-byte aligned. | ||
| 836 | bool copy_acceleration_structure(CopyAccelerationStructure copy) { | ||
| 837 | if (!copy.dst_va || !copy.src_va || copy.dst_va % 256 || copy.src_va % 256) return false; | ||
| 838 | return append(copy); | ||
| 839 | } | ||
| 840 | bool acceleration_structure_postbuild(AccelerationStructurePostbuild info) { | ||
| 841 | if (!info.dest_va || info.dest_va % 8 || info.sources.empty()) return false; | ||
| 842 | for (const auto va : info.sources) | ||
| 843 | if (!va || va % 256) return false; | ||
| 844 | return append(std::move(info)); | ||
| 845 | } | ||
| 812 | bool close() { | 846 | bool close() { |
| 813 | if (closed_) return false; | 847 | if (closed_) return false; |
| 814 | closed_ = true; | 848 | closed_ = true; |
diff --git a/runtime/src/descriptor_table.h b/runtime/src/descriptor_table.h index 59f96fd4f..2b5b111f7 100644 --- a/runtime/src/descriptor_table.h +++ b/runtime/src/descriptor_table.h | |||
| @@ -129,7 +129,10 @@ public: | |||
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | // Erases a key from the table. Returns true if the key was found and erased, false otherwise. | 131 | // Erases a key from the table. Returns true if the key was found and erased, false otherwise. |
| 132 | // Backward-shifts downstream entries in the probe cluster so probe chains remain intact and compact. | 132 | // Only the key's own slot changes (it becomes empty): no other entry moves. Every lookup, here and in the |
| 133 | // shaders (rdna2spirv.py desc_probe), compares all kDescriptorProbes slots and never stops at an empty one, so | ||
| 134 | // a hole breaks no probe chain and inserts reuse it. Keeping the other entries in place is what lets the GPU | ||
| 135 | // copy of the table take an erase while shaders still probe it (BindlessSet::flush_needs_idle). | ||
| 133 | bool erase(const std::uint32_t key[8]) { | 136 | bool erase(const std::uint32_t key[8]) { |
| 134 | std::lock_guard lock(mutex_); | 137 | std::lock_guard lock(mutex_); |
| 135 | return erase_locked(key); | 138 | return erase_locked(key); |
| @@ -321,24 +324,9 @@ private: | |||
| 321 | } | 324 | } |
| 322 | if (!found) return false; | 325 | if (!found) return false; |
| 323 | 326 | ||
| 324 | // Backward-shift entries in the probe cluster to maintain probe chains | 327 | // No backward shift: see erase(). |
| 325 | std::uint32_t i = found_slot; | 328 | entries_[found_slot] = DescriptorEntry{}; |
| 326 | std::uint32_t j = i; | ||
| 327 | mark(found_slot); | 329 | mark(found_slot); |
| 328 | while (true) { | ||
| 329 | j = (j + 1) & mask_; | ||
| 330 | if (entries_[j].pad != kSlotOccupiedMarker) break; | ||
| 331 | const std::uint32_t r = hash_descriptor_key(entries_[j].key); | ||
| 332 | const std::uint32_t dist_r_to_i = (i - r) & mask_; | ||
| 333 | const std::uint32_t dist_r_to_j = (j - r) & mask_; | ||
| 334 | if (dist_r_to_i < dist_r_to_j && dist_r_to_i < kDescriptorProbes) { | ||
| 335 | entries_[i] = entries_[j]; | ||
| 336 | mark(i); | ||
| 337 | i = j; | ||
| 338 | } | ||
| 339 | } | ||
| 340 | entries_[i] = DescriptorEntry{}; | ||
| 341 | mark(i); | ||
| 342 | --occupied_count_; | 330 | --occupied_count_; |
| 343 | return true; | 331 | return true; |
| 344 | } | 332 | } |
diff --git a/runtime/src/main.cpp b/runtime/src/main.cpp index 7d3491653..560f68349 100644 --- a/runtime/src/main.cpp +++ b/runtime/src/main.cpp | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include <string> | 23 | #include <string> |
| 24 | #include <vector> | 24 | #include <vector> |
| 25 | 25 | ||
| 26 | #include "base_reservation.h" | ||
| 26 | #include "pe_loader.h" | 27 | #include "pe_loader.h" |
| 27 | #include "../shims/d3d12_trace.h" | 28 | #include "../shims/d3d12_trace.h" |
| 28 | #include "../shims/file_system.h" | 29 | #include "../shims/file_system.h" |
| @@ -73,6 +74,10 @@ int wmain(int argc, wchar_t** argv) { | |||
| 73 | // Exactly one mode: --dry-run --run would otherwise initialise the modules and call the entry point. | 74 | // Exactly one mode: --dry-run --run would otherwise initialise the modules and call the entry point. |
| 74 | if (dry_run + init + run != 1) return usage(); | 75 | if (dry_run + init + run != 1) return usage(); |
| 75 | if (game_dir.empty()) game_dir = image.parent_path(); | 76 | if (game_dir.empty()) game_dir = image.parent_path(); |
| 77 | // An image without relocations whose range this process already uses (arm64 Wine on macOS) runs in a new | ||
| 78 | // process that has the range reserved from the start (base_reservation.h); that process does not do this again. | ||
| 79 | if (!rt::base_reservation::inherited()) | ||
| 80 | if (const auto range = rt::base_reservation::needed(image)) return rt::base_reservation::relaunch(*range); | ||
| 76 | // GAME: paths read under --game-dir; whatever a title writes lands in the overlay, never in the package. | 81 | // GAME: paths read under --game-dir; whatever a title writes lands in the overlay, never in the package. |
| 77 | if (overlay_dir.empty()) overlay_dir = game_dir / "overlay"; | 82 | if (overlay_dir.empty()) overlay_dir = game_dir / "overlay"; |
| 78 | rt::fs::configure(game_dir, overlay_dir); | 83 | rt::fs::configure(game_dir, overlay_dir); |
diff --git a/runtime/src/pe_loader.cpp b/runtime/src/pe_loader.cpp index 1ab9c7801..387051756 100644 --- a/runtime/src/pe_loader.cpp +++ b/runtime/src/pe_loader.cpp | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <vector> | 14 | #include <vector> |
| 15 | 15 | ||
| 16 | #include "../shims/shims.h" | 16 | #include "../shims/shims.h" |
| 17 | #include "base_reservation.h" | ||
| 17 | 18 | ||
| 18 | namespace rt { | 19 | namespace rt { |
| 19 | 20 | ||
| @@ -506,8 +507,11 @@ Module& Loader::map_image(const std::filesystem::path& path) { | |||
| 506 | by_name_[lower(m->name)] = m; | 507 | by_name_[lower(m->name)] = m; |
| 507 | order_.push_back(m); | 508 | order_.push_back(m); |
| 508 | 509 | ||
| 509 | m->base = static_cast<uint8_t*>( | 510 | // Inside the range gta6rt reserved for this image before the process started (base_reservation.h), else as usual. |
| 510 | VirtualAlloc(reinterpret_cast<void*>(oh.ImageBase), oh.SizeOfImage, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE)); | 511 | m->base = static_cast<uint8_t*>(base_reservation::commit_reserved(oh.ImageBase, oh.SizeOfImage)); |
| 512 | if (!m->base) | ||
| 513 | m->base = static_cast<uint8_t*>(VirtualAlloc(reinterpret_cast<void*>(oh.ImageBase), oh.SizeOfImage, | ||
| 514 | MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE)); | ||
| 511 | if (!m->base) { | 515 | if (!m->base) { |
| 512 | const auto relocs = directory(nt, IMAGE_DIRECTORY_ENTRY_BASERELOC); | 516 | const auto relocs = directory(nt, IMAGE_DIRECTORY_ENTRY_BASERELOC); |
| 513 | if (!relocs.Size) | 517 | if (!relocs.Size) |
diff --git a/runtime/src/vulkan13_features.h b/runtime/src/vulkan13_features.h new file mode 100644 index 000000000..2057d953b --- /dev/null +++ b/runtime/src/vulkan13_features.h | |||
| @@ -0,0 +1,127 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | // dynamicRendering and synchronization2, the two Vulkan 1.3 features the D3D12 layer needs, on a Vulkan 1.3 device | ||
| 4 | // or on a Vulkan 1.2 device through VK_KHR_dynamic_rendering and VK_KHR_synchronization2. CrossOver's MoltenVK on | ||
| 5 | // macOS is such a 1.2 device (1.2.10: Vulkan 1.2 with both extensions); the extension structs, functions and | ||
| 6 | // behaviour are the core ones under another name, so the rest of the layer does not see the difference. | ||
| 7 | // | ||
| 8 | // leonida::Vulkan13Features v13; | ||
| 9 | // v13.query(physical, props.apiVersion, get_features2, enumerate_extensions); // per candidate | ||
| 10 | // if (!v13.usable()) continue; | ||
| 11 | // enable12.pNext = v13.enable(chain); // chain: what came after VkPhysicalDeviceVulkan13Features | ||
| 12 | // ... v13.next() is where later feature structs go (it used to be enable13.pNext) | ||
| 13 | // v13.add_extensions(device_extensions); | ||
| 14 | // fn = leonida::device_proc_or_khr(get_device_proc, device, "vkCmdPipelineBarrier2"); | ||
| 15 | |||
| 16 | #include <vulkan/vulkan.h> | ||
| 17 | |||
| 18 | #include <cstdint> | ||
| 19 | #include <cstring> | ||
| 20 | #include <string> | ||
| 21 | #include <vector> | ||
| 22 | |||
| 23 | namespace leonida { | ||
| 24 | |||
| 25 | class Vulkan13Features { | ||
| 26 | public: | ||
| 27 | Vulkan13Features() = default; | ||
| 28 | Vulkan13Features(const Vulkan13Features&) = delete; // enable() links pointers into this object | ||
| 29 | Vulkan13Features& operator=(const Vulkan13Features&) = delete; | ||
| 30 | |||
| 31 | bool core = false; // a Vulkan 1.3 device: the features are core | ||
| 32 | bool dynamic_rendering = false; // supported, as a core feature or through VK_KHR_dynamic_rendering | ||
| 33 | bool synchronization2 = false; // supported, as a core feature or through VK_KHR_synchronization2 | ||
| 34 | // Optional 1.3 core features, enabled where supported; on a 1.2 device they stay off (no required subgroup size). | ||
| 35 | bool subgroup_size_control = false; | ||
| 36 | bool compute_full_subgroups = false; | ||
| 37 | |||
| 38 | bool usable() const { return dynamic_rendering && synchronization2; } | ||
| 39 | |||
| 40 | // Fills the flags above for one physical device. A device older than 1.2 never qualifies. | ||
| 41 | void query(VkPhysicalDevice physical, std::uint32_t api_version, PFN_vkGetPhysicalDeviceFeatures2 features2, | ||
| 42 | PFN_vkEnumerateDeviceExtensionProperties enumerate_extensions) { | ||
| 43 | core = api_version >= VK_API_VERSION_1_3; | ||
| 44 | dynamic_rendering = synchronization2 = subgroup_size_control = compute_full_subgroups = false; | ||
| 45 | if (!features2) return; | ||
| 46 | if (core) { | ||
| 47 | VkPhysicalDeviceVulkan13Features f13{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES}; | ||
| 48 | VkPhysicalDeviceFeatures2 query{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, &f13}; | ||
| 49 | features2(physical, &query); | ||
| 50 | dynamic_rendering = f13.dynamicRendering == VK_TRUE; | ||
| 51 | synchronization2 = f13.synchronization2 == VK_TRUE; | ||
| 52 | subgroup_size_control = f13.subgroupSizeControl == VK_TRUE; | ||
| 53 | compute_full_subgroups = f13.computeFullSubgroups == VK_TRUE; | ||
| 54 | return; | ||
| 55 | } | ||
| 56 | if (api_version < VK_API_VERSION_1_2 || !enumerate_extensions) return; | ||
| 57 | std::uint32_t count = 0; | ||
| 58 | enumerate_extensions(physical, nullptr, &count, nullptr); | ||
| 59 | std::vector<VkExtensionProperties> extensions(count); | ||
| 60 | enumerate_extensions(physical, nullptr, &count, extensions.data()); | ||
| 61 | bool has_dynamic_rendering = false, has_synchronization2 = false; | ||
| 62 | for (const auto& e : extensions) { | ||
| 63 | has_dynamic_rendering |= std::strcmp(e.extensionName, VK_KHR_DYNAMIC_RENDERING_EXTENSION_NAME) == 0; | ||
| 64 | has_synchronization2 |= std::strcmp(e.extensionName, VK_KHR_SYNCHRONIZATION_2_EXTENSION_NAME) == 0; | ||
| 65 | } | ||
| 66 | if (!has_dynamic_rendering || !has_synchronization2) return; | ||
| 67 | VkPhysicalDeviceSynchronization2FeaturesKHR sync2{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR}; | ||
| 68 | VkPhysicalDeviceDynamicRenderingFeaturesKHR rendering{ | ||
| 69 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES_KHR, &sync2}; | ||
| 70 | VkPhysicalDeviceFeatures2 query{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, &rendering}; | ||
| 71 | features2(physical, &query); | ||
| 72 | dynamic_rendering = rendering.dynamicRendering == VK_TRUE; | ||
| 73 | synchronization2 = sync2.synchronization2 == VK_TRUE; | ||
| 74 | } | ||
| 75 | |||
| 76 | // Copies the flags of the device query() chose (a later query() for another candidate overwrites them). | ||
| 77 | void choose(const Vulkan13Features& from) { | ||
| 78 | core = from.core; | ||
| 79 | dynamic_rendering = from.dynamic_rendering; | ||
| 80 | synchronization2 = from.synchronization2; | ||
| 81 | subgroup_size_control = from.subgroup_size_control; | ||
| 82 | compute_full_subgroups = from.compute_full_subgroups; | ||
| 83 | } | ||
| 84 | |||
| 85 | // The structs that enable both features, ahead of `chain`; returns their head for VkPhysicalDeviceVulkan12Features' | ||
| 86 | // pNext. Call once, after query() or choose(). | ||
| 87 | void* enable(void* chain) { | ||
| 88 | if (core) { | ||
| 89 | enable13_.pNext = chain; | ||
| 90 | enable13_.dynamicRendering = VK_TRUE; | ||
| 91 | enable13_.synchronization2 = VK_TRUE; | ||
| 92 | enable13_.subgroupSizeControl = subgroup_size_control ? VK_TRUE : VK_FALSE; | ||
| 93 | enable13_.computeFullSubgroups = compute_full_subgroups ? VK_TRUE : VK_FALSE; | ||
| 94 | return &enable13_; | ||
| 95 | } | ||
| 96 | sync2_.pNext = chain; | ||
| 97 | sync2_.synchronization2 = VK_TRUE; | ||
| 98 | rendering_.pNext = &sync2_; | ||
| 99 | rendering_.dynamicRendering = VK_TRUE; | ||
| 100 | return &rendering_; | ||
| 101 | } | ||
| 102 | |||
| 103 | // Where a feature struct goes to follow these: insert with `s.pNext = *next(); *next() = &s;`. | ||
| 104 | void** next() { return core ? &enable13_.pNext : &sync2_.pNext; } | ||
| 105 | |||
| 106 | // The device extensions a 1.2 device needs for both features; none on 1.3. | ||
| 107 | void add_extensions(std::vector<const char*>& extensions) const { | ||
| 108 | if (core) return; | ||
| 109 | extensions.push_back(VK_KHR_DYNAMIC_RENDERING_EXTENSION_NAME); | ||
| 110 | extensions.push_back(VK_KHR_SYNCHRONIZATION_2_EXTENSION_NAME); | ||
| 111 | } | ||
| 112 | |||
| 113 | private: | ||
| 114 | VkPhysicalDeviceVulkan13Features enable13_{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES}; | ||
| 115 | VkPhysicalDeviceDynamicRenderingFeaturesKHR rendering_{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES_KHR}; | ||
| 116 | VkPhysicalDeviceSynchronization2FeaturesKHR sync2_{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR}; | ||
| 117 | }; | ||
| 118 | |||
| 119 | // A device function by its core name, or by its KHR name where the core one is null: a Vulkan 1.2 device returns | ||
| 120 | // null for Vulkan 1.3 core names (vkCmdPipelineBarrier2, vkCmdBeginRendering, ...) and serves the enabled | ||
| 121 | // extension's vkCmdPipelineBarrier2KHR and the like, which have the same signatures. | ||
| 122 | inline PFN_vkVoidFunction device_proc_or_khr(PFN_vkGetDeviceProcAddr get, VkDevice device, const char* name) { | ||
| 123 | if (const PFN_vkVoidFunction function = get(device, name)) return function; | ||
| 124 | return get(device, (std::string(name) + "KHR").c_str()); | ||
| 125 | } | ||
| 126 | |||
| 127 | } // namespace leonida | ||
diff --git a/runtime/src/vulkan_backend.h b/runtime/src/vulkan_backend.h index 73232109e..8683ae2de 100644 --- a/runtime/src/vulkan_backend.h +++ b/runtime/src/vulkan_backend.h | |||
| @@ -3,7 +3,8 @@ | |||
| 3 | // The execution side of the D3D12 layer, without COM: the per-device Vulkan context (resources, layout tracker, | 3 | // The execution side of the D3D12 layer, without COM: the per-device Vulkan context (resources, layout tracker, |
| 4 | // image views), queues that execute command lists, and timeline-semaphore fences. The COM objects in | 4 | // image views), queues that execute command lists, and timeline-semaphore fences. The COM objects in |
| 5 | // shims/d3d12_com.cpp are thin wrappers over these. Needs Vulkan 1.2 timeline semaphores; rectangle clears and | 5 | // shims/d3d12_com.cpp are thin wrappers over these. Needs Vulkan 1.2 timeline semaphores; rectangle clears and |
| 6 | // enhanced barriers need the Vulkan 1.3 functions (dynamicRendering, synchronization2) to be enabled. | 6 | // enhanced barriers need the Vulkan 1.3 functions (dynamicRendering, synchronization2) to be enabled, as core |
| 7 | // features or through their KHR extensions on a 1.2 device (vulkan13_features.h). | ||
| 7 | 8 | ||
| 8 | #ifndef VK_NO_PROTOTYPES | 9 | #ifndef VK_NO_PROTOTYPES |
| 9 | #define VK_NO_PROTOTYPES | 10 | #define VK_NO_PROTOTYPES |
| @@ -12,6 +13,7 @@ | |||
| 12 | #include "occlusion_sum_spirv.h" | 13 | #include "occlusion_sum_spirv.h" |
| 13 | #include "retire_tickets.h" | 14 | #include "retire_tickets.h" |
| 14 | #include "statistics_sum_spirv.h" | 15 | #include "statistics_sum_spirv.h" |
| 16 | #include "vulkan13_features.h" | ||
| 15 | #include "vulkan_depth24.h" | 17 | #include "vulkan_depth24.h" |
| 16 | #include "vulkan_scratch.h" | 18 | #include "vulkan_scratch.h" |
| 17 | #include "vulkan_replay.h" | 19 | #include "vulkan_replay.h" |
| @@ -27,6 +29,7 @@ | |||
| 27 | #include <map> | 29 | #include <map> |
| 28 | #include <memory> | 30 | #include <memory> |
| 29 | #include <mutex> | 31 | #include <mutex> |
| 32 | #include <unordered_set> | ||
| 30 | #include <shared_mutex> | 33 | #include <shared_mutex> |
| 31 | #include <span> | 34 | #include <span> |
| 32 | #include <thread> | 35 | #include <thread> |
| @@ -84,7 +87,7 @@ struct VulkanDeviceFunctions { | |||
| 84 | // extension is not enabled, and the query functions are optional (a list that uses queries without them is | 87 | // extension is not enabled, and the query functions are optional (a list that uses queries without them is |
| 85 | // unsupported). The compute and descriptor functions are needed for normalized or summed occlusion results. | 88 | // unsupported). The compute and descriptor functions are needed for normalized or summed occlusion results. |
| 86 | bool load(PFN_vkGetDeviceProcAddr get, VkDevice device) { | 89 | bool load(PFN_vkGetDeviceProcAddr get, VkDevice device) { |
| 87 | #define LEONIDA_VK_LOAD(name) name = reinterpret_cast<PFN_##name>(get(device, #name)); | 90 | #define LEONIDA_VK_LOAD(name) name = reinterpret_cast<PFN_##name>(leonida::device_proc_or_khr(get, device, #name)); |
| 88 | LEONIDA_VK_DEVICE_FUNCTIONS(LEONIDA_VK_LOAD) | 91 | LEONIDA_VK_DEVICE_FUNCTIONS(LEONIDA_VK_LOAD) |
| 89 | #undef LEONIDA_VK_LOAD | 92 | #undef LEONIDA_VK_LOAD |
| 90 | return vkCreateCommandPool && vkDestroyCommandPool && vkAllocateCommandBuffers && vkResetCommandBuffer && | 93 | return vkCreateCommandPool && vkDestroyCommandPool && vkAllocateCommandBuffers && vkResetCommandBuffer && |
| @@ -732,15 +735,26 @@ public: | |||
| 732 | const std::uint64_t base = replay_.heap_base; | 735 | const std::uint64_t base = replay_.heap_base; |
| 733 | XdxrLayout layout; | 736 | XdxrLayout layout; |
| 734 | layout.compute(xdxr_elements(b), b.is_tlas); | 737 | layout.compute(xdxr_elements(b), b.is_tlas); |
| 738 | // PERFORM_UPDATE refits the source (the destination itself when no source is given, as D3D12 | ||
| 739 | // allows for an in-place update); a full build otherwise. | ||
| 740 | const std::uint64_t from = b.update ? base + (b.src_va ? b.src_va : b.dst_va) : 0; | ||
| 735 | if (b.is_tlas) { | 741 | if (b.is_tlas) { |
| 736 | xdxr_->record_tlas(cb, layout, b.instances_va ? base + b.instances_va : 0, base + b.dst_va, | 742 | xdxr_->record_tlas(cb, layout, b.instances_va ? base + b.instances_va : 0, base + b.dst_va, |
| 737 | base + b.scratch_va, base); | 743 | base + b.scratch_va, base, from); |
| 738 | } else { | 744 | } else { |
| 739 | std::vector<XdxrTriangles> geometries; | 745 | std::vector<XdxrTriangles> geometries; |
| 740 | xdxr_inputs(b, &geometries, base); | 746 | xdxr_inputs(b, &geometries, base); |
| 741 | xdxr_->record_blas(cb, layout, geometries, base + b.dst_va, base + b.scratch_va); | 747 | xdxr_->record_blas(cb, layout, geometries, base + b.dst_va, base + b.scratch_va, from); |
| 742 | } | 748 | } |
| 743 | }; | 749 | }; |
| 750 | replay_.xdxr_copy = [this](VkCommandBuffer cb, std::uint64_t src, std::uint64_t dst, std::uint64_t bytes) { | ||
| 751 | const std::uint64_t base = replay_.heap_base; | ||
| 752 | xdxr_->record_copy(cb, base + src, base + dst, bytes); | ||
| 753 | }; | ||
| 754 | replay_.xdxr_postbuild = [this](VkCommandBuffer cb, std::uint64_t src, std::uint64_t dest) { | ||
| 755 | const std::uint64_t base = replay_.heap_base; | ||
| 756 | xdxr_->record_postbuild(cb, base + src, base + dest); | ||
| 757 | }; | ||
| 744 | } else { | 758 | } else { |
| 745 | xdxr_.reset(); | 759 | xdxr_.reset(); |
| 746 | } | 760 | } |
| @@ -814,6 +828,15 @@ public: | |||
| 814 | } | 828 | } |
| 815 | } | 829 | } |
| 816 | 830 | ||
| 831 | // An image that got a storage (unordered-access) view. A shader can write it before any command names it, so the | ||
| 832 | // layer would not know it was used and the first barrier or copy that does would zero-fill it (vulkan_replay.h, | ||
| 833 | // initialize). The next submission therefore moves each such image to GENERAL, the layout its descriptor names, | ||
| 834 | // zero-filled, ahead of its lists. An image already tracked beyond UNDEFINED is left as it is. | ||
| 835 | void note_storage_image(ResourceId id) { | ||
| 836 | std::lock_guard lock(storage_mutex_); | ||
| 837 | storage_pending_.insert(id); | ||
| 838 | } | ||
| 839 | |||
| 817 | void remove_resource(ResourceId id) { | 840 | void remove_resource(ResourceId id) { |
| 818 | VkImage img = VK_NULL_HANDLE; | 841 | VkImage img = VK_NULL_HANDLE; |
| 819 | { | 842 | { |
| @@ -1119,6 +1142,14 @@ private: | |||
| 1119 | std::unordered_map<std::uintptr_t, GraphicsPipeline> graphics_pipelines_; | 1142 | std::unordered_map<std::uintptr_t, GraphicsPipeline> graphics_pipelines_; |
| 1120 | std::unordered_map<std::uint64_t, VkAccelerationStructureKHR> acceleration_structures_; | 1143 | std::unordered_map<std::uint64_t, VkAccelerationStructureKHR> acceleration_structures_; |
| 1121 | LayoutTracker tracker_; | 1144 | LayoutTracker tracker_; |
| 1145 | std::mutex storage_mutex_; // a leaf lock: guards storage_pending_ only | ||
| 1146 | std::unordered_set<ResourceId> storage_pending_; | ||
| 1147 | // The last submission that initialized storage images (its queue's progress semaphore and ticket) and a counter | ||
| 1148 | // that says which one: every other queue's next submission waits for it, so no queue uses such an image before | ||
| 1149 | // the zero-fill that put it in GENERAL has run. | ||
| 1150 | VkSemaphore storage_init_semaphore_ = VK_NULL_HANDLE; | ||
| 1151 | std::uint64_t storage_init_value_ = 0; | ||
| 1152 | std::uint64_t storage_init_version_ = 0; | ||
| 1122 | std::map<std::tuple<VkImage, VkImageAspectFlags, std::uint32_t, std::uint32_t, std::uint32_t, VkFormat>, VkImageView> views_; | 1153 | std::map<std::tuple<VkImage, VkImageAspectFlags, std::uint32_t, std::uint32_t, std::uint32_t, VkFormat>, VkImageView> views_; |
| 1123 | std::function<bool(VkCommandBuffer)> bindless_prepare_; | 1154 | std::function<bool(VkCommandBuffer)> bindless_prepare_; |
| 1124 | std::unique_ptr<Depth24Converter> depth24_; | 1155 | std::unique_ptr<Depth24Converter> depth24_; |
| @@ -1434,6 +1465,33 @@ public: | |||
| 1434 | return ReplayResult::unsupported; | 1465 | return ReplayResult::unsupported; |
| 1435 | } | 1466 | } |
| 1436 | auto next_tracker = context_.tracker_; | 1467 | auto next_tracker = context_.tracker_; |
| 1468 | // Images with a UAV view are moved to GENERAL (zeroed) by the first submission that can use a shader on them: | ||
| 1469 | // not a copy queue (its family may not clear images), and one whose lists dispatch or draw. | ||
| 1470 | bool runs_shaders = false; | ||
| 1471 | for (const CommandList* list : lists) | ||
| 1472 | for (const auto& command : list->commands()) | ||
| 1473 | runs_shaders |= std::holds_alternative<Dispatch>(command) || std::holds_alternative<Draw>(command) || | ||
| 1474 | std::holds_alternative<ExecuteIndirect>(command); | ||
| 1475 | std::vector<ResourceId> storage_images; | ||
| 1476 | { | ||
| 1477 | std::lock_guard lock(context_.storage_mutex_); | ||
| 1478 | if (context_.storage_init_semaphore_ && context_.storage_init_semaphore_ != progress_ && | ||
| 1479 | context_.storage_init_version_ != storage_init_seen_) { | ||
| 1480 | waits_.push_back(context_.storage_init_semaphore_); | ||
| 1481 | wait_values_.push_back(context_.storage_init_value_); | ||
| 1482 | storage_init_seen_ = context_.storage_init_version_; | ||
| 1483 | } | ||
| 1484 | if (kind_ != QueueKind::copy && runs_shaders) | ||
| 1485 | storage_images.assign(context_.storage_pending_.begin(), context_.storage_pending_.end()); | ||
| 1486 | if (!storage_images.empty()) context_.storage_pending_.clear(); | ||
| 1487 | } | ||
| 1488 | for (const ResourceId id : storage_images) { | ||
| 1489 | const ResourceBinding* image = context_.resolve(id); | ||
| 1490 | if (!image || !image->image) continue; | ||
| 1491 | const VkImageSubresourceRange range{image->aspects, 0, image->mip_levels, 0, image->array_layers}; | ||
| 1492 | auto pieces = detail::current(&next_tracker, id, range, VK_IMAGE_LAYOUT_UNDEFINED); | ||
| 1493 | detail::initialize(replay, command_buffer, *image, id, pieces, VK_IMAGE_LAYOUT_GENERAL, &next_tracker); | ||
| 1494 | } | ||
| 1437 | bool wrote_readback = false; | 1495 | bool wrote_readback = false; |
| 1438 | VkPipelineStageFlags2 readback_stages = 0; | 1496 | VkPipelineStageFlags2 readback_stages = 0; |
| 1439 | std::uint32_t open_labels = 0; // events may span the lists of one ExecuteCommandLists | 1497 | std::uint32_t open_labels = 0; // events may span the lists of one ExecuteCommandLists |
| @@ -1476,6 +1534,17 @@ public: | |||
| 1476 | const bool ended = context_.vk.vkEndCommandBuffer(command_buffer) == VK_SUCCESS; | 1534 | const bool ended = context_.vk.vkEndCommandBuffer(command_buffer) == VK_SUCCESS; |
| 1477 | resource_lock.unlock(); // release resource_mutex_ before vkQueueSubmit while keeping tracker_lock held | 1535 | resource_lock.unlock(); // release resource_mutex_ before vkQueueSubmit while keeping tracker_lock held |
| 1478 | const bool submitted = ended && submit(command_buffer, VK_NULL_HANDLE, 0); | 1536 | const bool submitted = ended && submit(command_buffer, VK_NULL_HANDLE, 0); |
| 1537 | if (!submitted && !storage_images.empty()) { // not initialized after all: try again with the next submission | ||
| 1538 | std::lock_guard lock(context_.storage_mutex_); | ||
| 1539 | context_.storage_pending_.insert(storage_images.begin(), storage_images.end()); | ||
| 1540 | } | ||
| 1541 | if (submitted && !storage_images.empty()) { | ||
| 1542 | std::lock_guard lock(context_.storage_mutex_); | ||
| 1543 | context_.storage_init_semaphore_ = progress_; | ||
| 1544 | context_.storage_init_value_ = submitted_; | ||
| 1545 | ++context_.storage_init_version_; | ||
| 1546 | storage_init_seen_ = context_.storage_init_version_; | ||
| 1547 | } | ||
| 1479 | if (submitted) { | 1548 | if (submitted) { |
| 1480 | context_.tracker_ = std::move(next_tracker); | 1549 | context_.tracker_ = std::move(next_tracker); |
| 1481 | slot->predicate = std::move(batch); | 1550 | slot->predicate = std::move(batch); |
| @@ -1627,6 +1696,7 @@ private: | |||
| 1627 | std::uint64_t submitted_ = 0; | 1696 | std::uint64_t submitted_ = 0; |
| 1628 | std::vector<CommandSlot> buffers_; | 1697 | std::vector<CommandSlot> buffers_; |
| 1629 | std::unique_ptr<OcclusionResolve> occlusion_resolve_; | 1698 | std::unique_ptr<OcclusionResolve> occlusion_resolve_; |
| 1699 | std::uint64_t storage_init_seen_ = 0; // the storage_init_version_ this queue has waited for | ||
| 1630 | std::vector<VkSemaphore> waits_; | 1700 | std::vector<VkSemaphore> waits_; |
| 1631 | std::vector<std::uint64_t> wait_values_; | 1701 | std::vector<std::uint64_t> wait_values_; |
| 1632 | std::uint32_t open_labels_ = 0; // queue labels begun and not ended | 1702 | std::uint32_t open_labels_ = 0; // queue labels begun and not ended |
diff --git a/runtime/src/vulkan_bindless.h b/runtime/src/vulkan_bindless.h index c599eb7c2..5f484bf16 100644 --- a/runtime/src/vulkan_bindless.h +++ b/runtime/src/vulkan_bindless.h | |||
| @@ -47,6 +47,7 @@ | |||
| 47 | #include <array> | 47 | #include <array> |
| 48 | #include <cstdint> | 48 | #include <cstdint> |
| 49 | #include <cstring> | 49 | #include <cstring> |
| 50 | #include <functional> | ||
| 50 | #include <unordered_map> | 51 | #include <unordered_map> |
| 51 | #include <vector> | 52 | #include <vector> |
| 52 | 53 | ||
| @@ -162,6 +163,35 @@ constexpr std::uint32_t r32ui_binding(ImageDimension dimension) { | |||
| 162 | return dimension == ImageDimension::dim_2d ? 4 : dimension == ImageDimension::dim_3d ? 7 : no_binding; | 163 | return dimension == ImageDimension::dim_2d ? 4 : dimension == ImageDimension::dim_3d ? 7 : no_binding; |
| 163 | } | 164 | } |
| 164 | 165 | ||
| 166 | // Set 0's descriptor set layout at features' counts: what create_layout creates and what size_bindings' | ||
| 167 | // layout_supported asks vkGetDescriptorSetLayoutSupport about. It points into itself, so it is not copied. | ||
| 168 | struct SetLayout { | ||
| 169 | std::array<VkDescriptorSetLayoutBinding, binding_count> entries{}; | ||
| 170 | std::array<VkDescriptorBindingFlags, binding_count> flags{}; | ||
| 171 | VkDescriptorSetLayoutBindingFlagsCreateInfo flags_info{ | ||
| 172 | VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO}; | ||
| 173 | VkDescriptorSetLayoutCreateInfo info{VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO}; | ||
| 174 | |||
| 175 | explicit SetLayout(const BindlessFeatures& features) { | ||
| 176 | std::uint32_t count = 0; | ||
| 177 | for (std::uint32_t b = 0; b < binding_count; ++b) { | ||
| 178 | if (!binding_enabled(b, features)) continue; | ||
| 179 | entries[count] = {b, bindings[b].type, features.counts[b], VK_SHADER_STAGE_ALL, nullptr}; | ||
| 180 | flags[count] = (features.update_after_bind ? VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT : 0) | | ||
| 181 | (features.partially_bound ? VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT : 0); | ||
| 182 | ++count; | ||
| 183 | } | ||
| 184 | flags_info.bindingCount = count; | ||
| 185 | flags_info.pBindingFlags = flags.data(); | ||
| 186 | info.pNext = &flags_info; | ||
| 187 | info.flags = features.update_after_bind ? VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT : 0; | ||
| 188 | info.bindingCount = count; | ||
| 189 | info.pBindings = entries.data(); | ||
| 190 | } | ||
| 191 | SetLayout(const SetLayout&) = delete; | ||
| 192 | SetLayout& operator=(const SetLayout&) = delete; | ||
| 193 | }; | ||
| 194 | |||
| 165 | // What size_bindings() grows to where the device's limits allow. At 32-64 bytes a descriptor the whole set is then | 195 | // What size_bindings() grows to where the device's limits allow. At 32-64 bytes a descriptor the whole set is then |
| 166 | // 3-6 MiB (93793 descriptors on an RTX 5070). | 196 | // 3-6 MiB (93793 descriptors on an RTX 5070). |
| 167 | inline constexpr std::uint32_t max_2d_images = 65536; | 197 | inline constexpr std::uint32_t max_2d_images = 65536; |
| @@ -183,10 +213,14 @@ inline constexpr std::uint32_t growth_headroom = 64; | |||
| 183 | // what is sure to work (vkGetDescriptorSetLayoutSupport may allow more), so it never shrinks step 1. | 213 | // what is sure to work (vkGetDescriptorSetLayoutSupport may allow more), so it never shrinks step 1. |
| 184 | // A storage array holds the smaller of the storage count and its dimension's images: add_image never gives a | 214 | // A storage array holds the smaller of the storage count and its dimension's images: add_image never gives a |
| 185 | // storage view an index past the sampled array. The other bindings keep their default counts. | 215 | // storage view an index past the sampled array. The other bindings keep their default counts. |
| 216 | // layout_supported, when given, answers vkGetDescriptorSetLayoutSupport for set 0 at the counts in its argument: | ||
| 217 | // step 3 then also grows past maxPerSetDescriptors where the device says the layout works (Intel's Xe-LP reports | ||
| 218 | // 6159 and supports the full sizes, D3D-219). It is asked only once the sum is above maxPerSetDescriptors. | ||
| 186 | // Sets features.counts; returns false when a count is below its default because the device's limits are. | 219 | // Sets features.counts; returns false when a count is below its default because the device's limits are. |
| 187 | inline bool size_bindings(BindlessFeatures& features, const VkPhysicalDeviceLimits& limits, | 220 | inline bool size_bindings(BindlessFeatures& features, const VkPhysicalDeviceLimits& limits, |
| 188 | const VkPhysicalDeviceVulkan11Properties& v11, | 221 | const VkPhysicalDeviceVulkan11Properties& v11, |
| 189 | const VkPhysicalDeviceVulkan12Properties& v12) { | 222 | const VkPhysicalDeviceVulkan12Properties& v12, |
| 223 | const std::function<bool(const BindlessFeatures&)>& layout_supported = {}) { | ||
| 190 | const bool uab = features.update_after_bind; | 224 | const bool uab = features.update_after_bind; |
| 191 | const std::uint32_t sampled_limit = | 225 | const std::uint32_t sampled_limit = |
| 192 | uab ? std::min(v12.maxPerStageDescriptorUpdateAfterBindSampledImages, | 226 | uab ? std::min(v12.maxPerStageDescriptorUpdateAfterBindSampledImages, |
| @@ -233,7 +267,8 @@ inline bool size_bindings(BindlessFeatures& features, const VkPhysicalDeviceLimi | |||
| 233 | const auto within = [&](std::uint64_t n, std::uint32_t limit) { return n + headroom <= limit; }; | 267 | const auto within = [&](std::uint64_t n, std::uint32_t limit) { return n + headroom <= limit; }; |
| 234 | const std::uint64_t all = sampled + sampler + stored + buffers; | 268 | const std::uint64_t all = sampled + sampler + stored + buffers; |
| 235 | return within(sampled, sampled_limit) && within(sampler, sampler_limit) && within(stored, storage_limit) && | 269 | return within(sampled, sampled_limit) && within(sampler, sampler_limit) && within(stored, storage_limit) && |
| 236 | within(sampled + stored + buffers, resource_limit) && all <= pool_limit && all <= set_limit; | 270 | within(sampled + stored + buffers, resource_limit) && all <= pool_limit && |
| 271 | (all <= set_limit || (layout_supported && layout_supported(features))); | ||
| 237 | }; | 272 | }; |
| 238 | // Raises n to the largest value up to `high` that fits; leaves it where it is when none does. | 273 | // Raises n to the largest value up to `high` that fits; leaves it where it is when none does. |
| 239 | const auto grow = [&](std::uint32_t& n, std::uint32_t high, std::uint32_t headroom, std::uint64_t set_limit) { | 274 | const auto grow = [&](std::uint32_t& n, std::uint32_t high, std::uint32_t headroom, std::uint64_t set_limit) { |
| @@ -400,19 +435,21 @@ public: | |||
| 400 | result == DescriptorTable::InsertResult::added_with_relocation; | 435 | result == DescriptorTable::InsertResult::added_with_relocation; |
| 401 | return true; | 436 | return true; |
| 402 | } | 437 | } |
| 403 | // Erasing compacts the key's probe cluster, so other keys' entries may change slots. | 438 | // Erasing empties only the key's own slot; no other entry moves (DescriptorTable::erase), so it needs no idle. |
| 439 | // The caller erases a key once no submitted work uses it (its texture is gone), like D3D12 requires. | ||
| 404 | bool erase_key(const DescriptorKey& key) { | 440 | bool erase_key(const DescriptorKey& key) { |
| 405 | if (!table_.erase(key)) return false; | 441 | if (!table_.erase(key)) return false; |
| 406 | table_dirty_ = existing_entries_changed_ = true; | 442 | table_dirty_ = true; |
| 407 | return true; | 443 | return true; |
| 408 | } | 444 | } |
| 409 | const DescriptorTable& table() const { return table_; } | 445 | const DescriptorTable& table() const { return table_; } |
| 410 | 446 | ||
| 411 | // True when the next flush() will change entries a running shader may be probing, or replace the table's | 447 | // True when the next flush() will change entries a running shader may be probing (a live key's index replaced |
| 412 | // buffer: the caller then flushes only once no command buffer that uses the set is still executing. Without | 448 | // or a live key moved by a relocating insert), or replace the table's buffer: the caller then flushes only once |
| 413 | // it the flush only adds entries, and the copy of an entry is not atomic: a shader probing a different key | 449 | // no command buffer that uses the set is still executing. Without it the flush only adds entries or empties the |
| 414 | // could in principle see a torn entry that matches it, which is accepted as vanishingly unlikely because the | 450 | // slots of erased keys, and the copy of an entry is not atomic: a shader probing a different key could in |
| 415 | // added key is new (there is no live key equal to it). | 451 | // principle see a torn entry that matches it, which is accepted as vanishingly unlikely because the added or |
| 452 | // erased key is not live (no running work uses it). | ||
| 416 | bool flush_needs_idle() const { | 453 | bool flush_needs_idle() const { |
| 417 | return table_dirty_ && (existing_entries_changed_ || force_full_upload_ || | 454 | return table_dirty_ && (existing_entries_changed_ || force_full_upload_ || |
| 418 | table_.size_bytes() > table_buffers_.table.size); | 455 | table_.size_bytes() > table_buffers_.table.size); |
| @@ -532,27 +569,12 @@ private: | |||
| 532 | } | 569 | } |
| 533 | 570 | ||
| 534 | bool create_layout() { | 571 | bool create_layout() { |
| 535 | std::array<VkDescriptorSetLayoutBinding, bindless::bindings.size()> entries{}; | 572 | const bindless::SetLayout layout(features_); |
| 536 | std::array<VkDescriptorBindingFlags, bindless::bindings.size()> flags{}; | 573 | const std::uint32_t count = layout.info.bindingCount; |
| 537 | std::array<VkDescriptorPoolSize, bindless::bindings.size()> sizes{}; | 574 | std::array<VkDescriptorPoolSize, bindless::bindings.size()> sizes{}; |
| 538 | std::uint32_t count = 0; | 575 | for (std::uint32_t i = 0; i < count; ++i) |
| 539 | for (std::uint32_t b = 0; b < bindless::bindings.size(); ++b) { | 576 | sizes[i] = {layout.entries[i].descriptorType, layout.entries[i].descriptorCount}; |
| 540 | if (!bindless::binding_enabled(b, features_)) continue; | 577 | if (vk_.vkCreateDescriptorSetLayout(device_, &layout.info, nullptr, &layout_) != VK_SUCCESS) return false; |
| 541 | entries[count] = {b, bindless::bindings[b].type, features_.counts[b], VK_SHADER_STAGE_ALL, nullptr}; | ||
| 542 | flags[count] = (features_.update_after_bind ? VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT : 0) | | ||
| 543 | (features_.partially_bound ? VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT : 0); | ||
| 544 | sizes[count] = {bindless::bindings[b].type, features_.counts[b]}; | ||
| 545 | ++count; | ||
| 546 | } | ||
| 547 | VkDescriptorSetLayoutBindingFlagsCreateInfo flags_info{ | ||
| 548 | VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO}; | ||
| 549 | flags_info.bindingCount = count; | ||
| 550 | flags_info.pBindingFlags = flags.data(); | ||
| 551 | VkDescriptorSetLayoutCreateInfo layout_info{VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, &flags_info}; | ||
| 552 | layout_info.flags = features_.update_after_bind ? VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT : 0; | ||
| 553 | layout_info.bindingCount = count; | ||
| 554 | layout_info.pBindings = entries.data(); | ||
| 555 | if (vk_.vkCreateDescriptorSetLayout(device_, &layout_info, nullptr, &layout_) != VK_SUCCESS) return false; | ||
| 556 | 578 | ||
| 557 | VkDescriptorPoolCreateInfo pool_info{VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO}; | 579 | VkDescriptorPoolCreateInfo pool_info{VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO}; |
| 558 | pool_info.flags = features_.update_after_bind ? VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT : 0; | 580 | pool_info.flags = features_.update_after_bind ? VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT : 0; |
diff --git a/runtime/src/vulkan_present.h b/runtime/src/vulkan_present.h index 35f1cb556..d9f53baa5 100644 --- a/runtime/src/vulkan_present.h +++ b/runtime/src/vulkan_present.h | |||
| @@ -35,7 +35,6 @@ | |||
| 35 | #include <cstring> | 35 | #include <cstring> |
| 36 | #include <functional> | 36 | #include <functional> |
| 37 | #include <map> | 37 | #include <map> |
| 38 | #include <optional> | ||
| 39 | #include <vector> | 38 | #include <vector> |
| 40 | 39 | ||
| 41 | namespace leonida { | 40 | namespace leonida { |
| @@ -271,25 +270,34 @@ public: | |||
| 271 | 270 | ||
| 272 | bool recorded = false; | 271 | bool recorded = false; |
| 273 | std::unique_lock tracker_lock(context_.tracker_mutex_, std::defer_lock); | 272 | std::unique_lock tracker_lock(context_.tracker_mutex_, std::defer_lock); |
| 274 | std::optional<LayoutTracker> next_tracker; | 273 | bool rollback_source = false; |
| 274 | VkImageLayout prev_layout = VK_IMAGE_LAYOUT_UNDEFINED; | ||
| 275 | if (binding) { | 275 | if (binding) { |
| 276 | // Lock hierarchy: resource_mutex_ -> tracker_mutex_ -> submit_mutex_ (vulkan_backend.h). | 276 | // Lock hierarchy: resource_mutex_ -> tracker_mutex_ -> submit_mutex_ (vulkan_backend.h). |
| 277 | // Release resource_mutex_ before vkQueueSubmit while keeping tracker_mutex_ held so layout updates | 277 | // record() only touches subresource 0 (mip 0, layer 0, color) of `source`, so saving that one layout |
| 278 | // commit in submission order and roll back if vkQueueSubmit fails. | 278 | // rolls back a failed submit in O(1) without copying the entire LayoutTracker map. |
| 279 | std::shared_lock resource_lock(context_.resource_mutex_); | 279 | std::shared_lock resource_lock(context_.resource_mutex_); |
| 280 | const ResourceBinding* current = context_.resolve(source); | 280 | const ResourceBinding* current = context_.resolve(source); |
| 281 | if (current && current->image && current->aspects == VK_IMAGE_ASPECT_COLOR_BIT) { | 281 | if (current && current->image && current->aspects == VK_IMAGE_ASPECT_COLOR_BIT) { |
| 282 | tracker_lock.lock(); | 282 | tracker_lock.lock(); |
| 283 | next_tracker.emplace(context_.tracker_); | 283 | rollback_source = context_.tracker_.tracked(source); |
| 284 | record(frame.commands, *current, source, image, source_rect, *next_tracker); | 284 | if (rollback_source) prev_layout = context_.tracker_.layout(source, 0); |
| 285 | record(frame.commands, *current, source, image, source_rect); | ||
| 285 | recorded = true; | 286 | recorded = true; |
| 286 | } | 287 | } |
| 287 | } else { | 288 | } else { |
| 288 | record_blank(frame.commands, image); | 289 | record_blank(frame.commands, image); |
| 289 | recorded = true; | 290 | recorded = true; |
| 290 | } | 291 | } |
| 292 | const auto rollback = [&] { | ||
| 293 | if (rollback_source) | ||
| 294 | context_.tracker_.set(source, {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}, prev_layout); | ||
| 295 | }; | ||
| 291 | if (!recorded) return give_back(frame, VK_ERROR_UNKNOWN); // released by another thread since presentable() | 296 | if (!recorded) return give_back(frame, VK_ERROR_UNKNOWN); // released by another thread since presentable() |
| 292 | if (const VkResult reset = vkResetFences_(device, 1, &frame.done); reset != VK_SUCCESS) return stop(reset); | 297 | if (const VkResult reset = vkResetFences_(device, 1, &frame.done); reset != VK_SUCCESS) { |
| 298 | rollback(); | ||
| 299 | return stop(reset); | ||
| 300 | } | ||
| 293 | const VkPipelineStageFlags wait_stage = VK_PIPELINE_STAGE_TRANSFER_BIT; | 301 | const VkPipelineStageFlags wait_stage = VK_PIPELINE_STAGE_TRANSFER_BIT; |
| 294 | VkSubmitInfo submit_info{VK_STRUCTURE_TYPE_SUBMIT_INFO}; | 302 | VkSubmitInfo submit_info{VK_STRUCTURE_TYPE_SUBMIT_INFO}; |
| 295 | submit_info.waitSemaphoreCount = 1; | 303 | submit_info.waitSemaphoreCount = 1; |
| @@ -322,10 +330,12 @@ public: | |||
| 322 | { | 330 | { |
| 323 | std::lock_guard lock(context_.submit_mutex()); | 331 | std::lock_guard lock(context_.submit_mutex()); |
| 324 | submitted = vk.vkQueueSubmit(queue_, 1, &submit_info, frame.done); | 332 | submitted = vk.vkQueueSubmit(queue_, 1, &submit_info, frame.done); |
| 333 | if (submitted != VK_SUCCESS) rollback(); | ||
| 334 | // Commit/rollback happened before releasing tracker_mutex_ inside submit_mutex(), preserving submission | ||
| 335 | // order without holding tracker_mutex_ across vkQueuePresentKHR. | ||
| 336 | if (tracker_lock.owns_lock()) tracker_lock.unlock(); | ||
| 325 | if (submitted == VK_SUCCESS) result = vkQueuePresentKHR_(queue_, &present); | 337 | if (submitted == VK_SUCCESS) result = vkQueuePresentKHR_(queue_, &present); |
| 326 | } | 338 | } |
| 327 | if (submitted == VK_SUCCESS && next_tracker) context_.tracker_ = std::move(*next_tracker); | ||
| 328 | if (tracker_lock.owns_lock()) tracker_lock.unlock(); | ||
| 329 | if (submitted != VK_SUCCESS) return give_back(frame, submitted); | 339 | if (submitted != VK_SUCCESS) return give_back(frame, submitted); |
| 330 | ++frame_index_; | 340 | ++frame_index_; |
| 331 | // Only a present the engine took counts (SUBOPTIMAL is shown too). OUT_OF_DATE was not shown: the swapchain | 341 | // Only a present the engine took counts (SUBOPTIMAL is shown too). OUT_OF_DATE was not shown: the swapchain |
| @@ -401,7 +411,7 @@ private: | |||
| 401 | } | 411 | } |
| 402 | 412 | ||
| 403 | void record(VkCommandBuffer commands, const ResourceBinding& binding, ResourceId source, std::uint32_t image, | 413 | void record(VkCommandBuffer commands, const ResourceBinding& binding, ResourceId source, std::uint32_t image, |
| 404 | const PresentRect* source_rect, LayoutTracker& tracker) { | 414 | const PresentRect* source_rect) { |
| 405 | auto& vk = context_.vk; | 415 | auto& vk = context_.vk; |
| 406 | const ReplayFunctions& fn = context_.replay_; | 416 | const ReplayFunctions& fn = context_.replay_; |
| 407 | vk.vkResetCommandBuffer(commands, 0); | 417 | vk.vkResetCommandBuffer(commands, 0); |
| @@ -414,8 +424,8 @@ private: | |||
| 414 | // PRESENT is D3D12's common state: GENERAL for an ordinary texture. A never-written back buffer is | 424 | // PRESENT is D3D12's common state: GENERAL for an ordinary texture. A never-written back buffer is |
| 415 | // zero-filled first, as any committed resource is. | 425 | // zero-filled first, as any committed resource is. |
| 416 | const VkImageLayout common = image_layout(binding, VK_IMAGE_LAYOUT_GENERAL); | 426 | const VkImageLayout common = image_layout(binding, VK_IMAGE_LAYOUT_GENERAL); |
| 417 | auto pieces = detail::current(&tracker, source, range, common); | 427 | auto pieces = detail::current(&context_.tracker_, source, range, common); |
| 418 | detail::initialize(fn, commands, binding, source, pieces, common, &tracker); | 428 | detail::initialize(fn, commands, binding, source, pieces, common, &context_.tracker_); |
| 419 | for (const auto& piece : pieces) | 429 | for (const auto& piece : pieces) |
| 420 | detail::image_barrier(fn, commands, binding, piece.range, piece.layout, | 430 | detail::image_barrier(fn, commands, binding, piece.range, piece.layout, |
| 421 | VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, VK_ACCESS_MEMORY_WRITE_BIT, | 431 | VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, VK_ACCESS_MEMORY_WRITE_BIT, |
diff --git a/runtime/src/vulkan_replay.h b/runtime/src/vulkan_replay.h index 887c95b72..2a37f58f5 100644 --- a/runtime/src/vulkan_replay.h +++ b/runtime/src/vulkan_replay.h | |||
| @@ -788,6 +788,10 @@ struct ReplayFunctions { | |||
| 788 | // cannot read while the list is prepared, `xdxr_record` records the build. | 788 | // cannot read while the list is prepared, `xdxr_record` records the build. |
| 789 | std::function<bool(const BuildAccelerationStructure&)> xdxr_check; | 789 | std::function<bool(const BuildAccelerationStructure&)> xdxr_check; |
| 790 | std::function<void(VkCommandBuffer, const BuildAccelerationStructure&)> xdxr_record; | 790 | std::function<void(VkCommandBuffer, const BuildAccelerationStructure&)> xdxr_record; |
| 791 | // CopyRaytracingAccelerationStructure (CLONE, COMPACT) of XDXR structures: `bytes` is the room the destination | ||
| 792 | // resource has; and one postbuild value (COMPACTED_SIZE, CURRENT_SIZE) of the structure at `src` to `dest`. | ||
| 793 | std::function<void(VkCommandBuffer, std::uint64_t src_va, std::uint64_t dst_va, std::uint64_t bytes)> xdxr_copy; | ||
| 794 | std::function<void(VkCommandBuffer, std::uint64_t src_va, std::uint64_t dest_va)> xdxr_postbuild; | ||
| 791 | std::function<VkAccelerationStructureKHR(std::uint64_t)> resolve_acceleration_structure; | 795 | std::function<VkAccelerationStructureKHR(std::uint64_t)> resolve_acceleration_structure; |
| 792 | // Preparation only allocates a slot; capture records the GPU snapshot at the SetPredication command. | 796 | // Preparation only allocates a slot; capture records the GPU snapshot at the SetPredication command. |
| 793 | std::function<bool(VkBuffer, VkDeviceSize, PredicateCapture&)> prepare_predicate; | 797 | std::function<bool(VkBuffer, VkDeviceSize, PredicateCapture&)> prepare_predicate; |
| @@ -903,6 +907,7 @@ struct Prepared { | |||
| 903 | VkExtent2D area{}; | 907 | VkExtent2D area{}; |
| 904 | std::uint32_t layers = 1; // the fewest layers any bound attachment view has | 908 | std::uint32_t layers = 1; // the fewest layers any bound attachment view has |
| 905 | VkAccelerationStructureKHR accel_dst = VK_NULL_HANDLE; | 909 | VkAccelerationStructureKHR accel_dst = VK_NULL_HANDLE; |
| 910 | std::uint64_t xdxr_bytes = 0; // CopyAccelerationStructure: the most bytes the copy may write | ||
| 906 | VkAccelerationStructureKHR accel_src = VK_NULL_HANDLE; | 911 | VkAccelerationStructureKHR accel_src = VK_NULL_HANDLE; |
| 907 | }; | 912 | }; |
| 908 | 913 | ||
| @@ -972,7 +977,7 @@ inline VkFormat color_view_format(const ResourceBinding& resource, const TargetV | |||
| 972 | } | 977 | } |
| 973 | if (!resource.rgba8_typeless && !resource.castable_view_formats) | 978 | if (!resource.rgba8_typeless && !resource.castable_view_formats) |
| 974 | return format == resource.format ? format : VK_FORMAT_UNDEFINED; | 979 | return format == resource.format ? format : VK_FORMAT_UNDEFINED; |
| 975 | if (resource.format != VK_FORMAT_R8G8B8A8_UNORM || resource.volume || resource.depth != 1 || resource.samples != 1) | 980 | if (resource.format != VK_FORMAT_R8G8B8A8_UNORM || resource.volume || resource.depth != 1) |
| 976 | return VK_FORMAT_UNDEFINED; | 981 | return VK_FORMAT_UNDEFINED; |
| 977 | return format; | 982 | return format; |
| 978 | } | 983 | } |
| @@ -1058,20 +1063,180 @@ inline std::vector<LayoutPiece> current(const LayoutTracker* tracker, ResourceId | |||
| 1058 | return out; | 1063 | return out; |
| 1059 | } | 1064 | } |
| 1060 | 1065 | ||
| 1066 | // Zero-fills a block-compressed image range via vkCmdCopyBufferToImage from either the device's zero page | ||
| 1067 | // (`vk.zero_buffer`) or a zeroed transfer-scratch chunk (`vk.copy_scratch` + `vk.fill_buffer`). Vulkan forbids | ||
| 1068 | // vkCmdClearColorImage on BC formats, yet D3D12 committed resources start zeroed unless CREATE_NOT_ZEROED is set | ||
| 1069 | // (D3D-220). | ||
| 1070 | inline bool zero_compressed_image(const ReplayFunctions& vk, VkCommandBuffer command_buffer, | ||
| 1071 | const ResourceBinding& resource, const VkImageSubresourceRange& range, | ||
| 1072 | VkImageLayout dst_layout) { | ||
| 1073 | const BlockFormat fmt = block_format(resource.format, VK_IMAGE_ASPECT_COLOR_BIT); | ||
| 1074 | if (fmt.block <= 1 || !fmt.bytes || !vk.copy_buffer_to_image) return false; | ||
| 1075 | const std::uint32_t mip_begin = range.baseMipLevel; | ||
| 1076 | const std::uint32_t mip_end = | ||
| 1077 | range.levelCount == VK_REMAINING_MIP_LEVELS ? resource.mip_levels | ||
| 1078 | : std::min(resource.mip_levels, mip_begin + range.levelCount); | ||
| 1079 | const std::uint32_t layer_begin = range.baseArrayLayer; | ||
| 1080 | const std::uint32_t layer_end = | ||
| 1081 | range.layerCount == VK_REMAINING_ARRAY_LAYERS ? resource.array_layers | ||
| 1082 | : std::min(resource.array_layers, layer_begin + range.layerCount); | ||
| 1083 | if (mip_begin >= mip_end || layer_begin >= layer_end) return true; | ||
| 1084 | |||
| 1085 | constexpr VkDeviceSize kMaxChunk = 64u * 1024u; | ||
| 1086 | const std::uint32_t layer_count = layer_end - layer_begin; | ||
| 1087 | VkDeviceSize needed = 0; | ||
| 1088 | for (std::uint32_t mip = mip_begin; mip < mip_end; ++mip) { | ||
| 1089 | const VkExtent2D ext = mip_extent(resource, mip); | ||
| 1090 | const std::uint64_t bx = (std::uint64_t(ext.width) + fmt.block - 1) / fmt.block; | ||
| 1091 | const std::uint64_t by = (std::uint64_t(ext.height) + fmt.block - 1) / fmt.block; | ||
| 1092 | const std::uint64_t mip_d = std::max(1u, resource.depth >> mip); | ||
| 1093 | const std::uint64_t slice_bytes = bx * by * fmt.bytes; | ||
| 1094 | if (slice_bytes >= kMaxChunk || mip_d > kMaxChunk / slice_bytes || | ||
| 1095 | layer_count > kMaxChunk / (slice_bytes * mip_d)) { | ||
| 1096 | needed = kMaxChunk; | ||
| 1097 | break; | ||
| 1098 | } | ||
| 1099 | needed = std::max<VkDeviceSize>(needed, slice_bytes * mip_d * layer_count); | ||
| 1100 | } | ||
| 1101 | if (!needed) return true; | ||
| 1102 | |||
| 1103 | VkBuffer zero_buf = VK_NULL_HANDLE; | ||
| 1104 | VkDeviceSize zero_off = 0; | ||
| 1105 | VkDeviceSize zero_cap = 0; | ||
| 1106 | if (vk.zero_buffer && vk.zero_size >= fmt.bytes) { | ||
| 1107 | const VkDeviceSize align = fmt.bytes; | ||
| 1108 | const VkDeviceSize pad = (align - (vk.zero_offset % align)) % align; | ||
| 1109 | if (vk.zero_size >= pad + fmt.bytes) { | ||
| 1110 | zero_buf = vk.zero_buffer; | ||
| 1111 | zero_off = vk.zero_offset + pad; | ||
| 1112 | zero_cap = vk.zero_size - pad; | ||
| 1113 | } | ||
| 1114 | } | ||
| 1115 | if (!zero_buf && vk.copy_scratch && vk.fill_buffer) { | ||
| 1116 | // Round up to a multiple of fmt.bytes (8 or 16, always a multiple of 4 for vkCmdFillBuffer). | ||
| 1117 | const VkDeviceSize fill_bytes = ((needed + fmt.bytes - 1) / fmt.bytes) * fmt.bytes; | ||
| 1118 | VkBuffer scratch = VK_NULL_HANDLE; | ||
| 1119 | VkDeviceSize offset = 0; | ||
| 1120 | if (vk.copy_scratch(fill_bytes, scratch, offset)) { | ||
| 1121 | const VkDeviceSize align = fmt.bytes; | ||
| 1122 | const VkDeviceSize pad = (align - (offset % align)) % align; | ||
| 1123 | if (fill_bytes >= pad + fmt.bytes) { | ||
| 1124 | vk.fill_buffer(command_buffer, scratch, offset + pad, fill_bytes - pad, 0); | ||
| 1125 | memory_barrier(vk, command_buffer, VK_ACCESS_TRANSFER_WRITE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, | ||
| 1126 | VK_ACCESS_TRANSFER_READ_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT); | ||
| 1127 | zero_buf = scratch; | ||
| 1128 | zero_off = offset + pad; | ||
| 1129 | zero_cap = fill_bytes - pad; | ||
| 1130 | } | ||
| 1131 | } | ||
| 1132 | } | ||
| 1133 | if (!zero_buf || zero_cap < fmt.bytes) return false; | ||
| 1134 | |||
| 1135 | std::vector<VkBufferImageCopy> regions; | ||
| 1136 | for (std::uint32_t mip = mip_begin; mip < mip_end; ++mip) { | ||
| 1137 | const VkExtent2D ext = mip_extent(resource, mip); | ||
| 1138 | const std::uint32_t mip_d = std::max(1u, resource.depth >> mip); | ||
| 1139 | const std::uint64_t bx_total = (std::uint64_t(ext.width) + fmt.block - 1) / fmt.block; | ||
| 1140 | const std::uint64_t by_total = (std::uint64_t(ext.height) + fmt.block - 1) / fmt.block; | ||
| 1141 | const std::uint64_t slice_bytes = bx_total * by_total * fmt.bytes; | ||
| 1142 | if (slice_bytes && slice_bytes <= zero_cap && mip_d <= zero_cap / slice_bytes && | ||
| 1143 | layer_count <= zero_cap / (slice_bytes * mip_d)) { | ||
| 1144 | VkBufferImageCopy r{}; | ||
| 1145 | r.bufferOffset = zero_off; | ||
| 1146 | r.imageSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, mip, layer_begin, layer_count}; | ||
| 1147 | r.imageExtent = {ext.width, ext.height, mip_d}; | ||
| 1148 | regions.push_back(r); | ||
| 1149 | continue; | ||
| 1150 | } | ||
| 1151 | const std::uint64_t row_bytes = bx_total * fmt.bytes; | ||
| 1152 | for (std::uint32_t layer = layer_begin; layer < layer_end; ++layer) { | ||
| 1153 | if (slice_bytes <= zero_cap) { | ||
| 1154 | const std::uint32_t slices_per_copy = | ||
| 1155 | std::max<std::uint32_t>(1u, std::uint32_t(std::min<std::uint64_t>(mip_d, zero_cap / slice_bytes))); | ||
| 1156 | for (std::uint32_t z = 0; z < mip_d; z += slices_per_copy) { | ||
| 1157 | VkBufferImageCopy r{}; | ||
| 1158 | r.bufferOffset = zero_off; | ||
| 1159 | r.imageSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, mip, layer, 1}; | ||
| 1160 | r.imageOffset = {0, 0, std::int32_t(z)}; | ||
| 1161 | r.imageExtent = {ext.width, ext.height, std::min(slices_per_copy, mip_d - z)}; | ||
| 1162 | regions.push_back(r); | ||
| 1163 | } | ||
| 1164 | } else if (row_bytes <= zero_cap) { | ||
| 1165 | const std::uint32_t rows_per_copy = | ||
| 1166 | std::max<std::uint32_t>(1u, std::uint32_t(std::min<std::uint64_t>(by_total, zero_cap / row_bytes))); | ||
| 1167 | for (std::uint32_t z = 0; z < mip_d; ++z) { | ||
| 1168 | for (std::uint64_t y_blk = 0; y_blk < by_total; y_blk += rows_per_copy) { | ||
| 1169 | const std::uint32_t oy = std::uint32_t(y_blk * fmt.block); | ||
| 1170 | const std::uint32_t eh = std::min<std::uint32_t>(rows_per_copy * fmt.block, ext.height - oy); | ||
| 1171 | VkBufferImageCopy r{}; | ||
| 1172 | r.bufferOffset = zero_off; | ||
| 1173 | r.imageSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, mip, layer, 1}; | ||
| 1174 | r.imageOffset = {0, std::int32_t(oy), std::int32_t(z)}; | ||
| 1175 | r.imageExtent = {ext.width, eh, 1}; | ||
| 1176 | regions.push_back(r); | ||
| 1177 | } | ||
| 1178 | } | ||
| 1179 | } else { | ||
| 1180 | const std::uint32_t cols_per_copy = | ||
| 1181 | std::max<std::uint32_t>(1u, std::uint32_t(std::min<std::uint64_t>(bx_total, zero_cap / fmt.bytes))); | ||
| 1182 | for (std::uint32_t z = 0; z < mip_d; ++z) { | ||
| 1183 | for (std::uint64_t y_blk = 0; y_blk < by_total; ++y_blk) { | ||
| 1184 | const std::uint32_t oy = std::uint32_t(y_blk * fmt.block); | ||
| 1185 | const std::uint32_t eh = std::min<std::uint32_t>(fmt.block, ext.height - oy); | ||
| 1186 | for (std::uint64_t x_blk = 0; x_blk < bx_total; x_blk += cols_per_copy) { | ||
| 1187 | const std::uint32_t ox = std::uint32_t(x_blk * fmt.block); | ||
| 1188 | const std::uint32_t ew = | ||
| 1189 | std::min<std::uint32_t>(cols_per_copy * fmt.block, ext.width - ox); | ||
| 1190 | VkBufferImageCopy r{}; | ||
| 1191 | r.bufferOffset = zero_off; | ||
| 1192 | r.imageSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, mip, layer, 1}; | ||
| 1193 | r.imageOffset = {std::int32_t(ox), std::int32_t(oy), std::int32_t(z)}; | ||
| 1194 | r.imageExtent = {ew, eh, 1}; | ||
| 1195 | regions.push_back(r); | ||
| 1196 | } | ||
| 1197 | } | ||
| 1198 | } | ||
| 1199 | } | ||
| 1200 | } | ||
| 1201 | } | ||
| 1202 | if (!regions.empty()) | ||
| 1203 | vk.copy_buffer_to_image(command_buffer, zero_buf, resource.image, dst_layout, | ||
| 1204 | std::uint32_t(regions.size()), regions.data()); | ||
| 1205 | return true; | ||
| 1206 | } | ||
| 1207 | |||
| 1061 | // Images registered with the tracker in UNDEFINED have never been used. D3D12 committed resources start zeroed, | 1208 | // Images registered with the tracker in UNDEFINED have never been used. D3D12 committed resources start zeroed, |
| 1062 | // so each such piece is cleared to zero (colour 0, depth 0, stencil 0) and moved to `layout`, the layout the | 1209 | // so each such piece is zero-filled (clear for uncompressed images, zero-buffer copy for block-compressed formats |
| 1063 | // operation about to run expects, before that operation; with not_zeroed, or a block-compressed format (which | 1210 | // when a zero page or transfer scratch is available) and moved to `layout`, the layout the operation about to run |
| 1064 | // Vulkan cannot clear), it is only moved. The tracker records it. | 1211 | // expects; with not_zeroed, it is only moved. The tracker records it. |
| 1065 | inline void initialize(const ReplayFunctions& vk, VkCommandBuffer command_buffer, const ResourceBinding& resource, | 1212 | inline void initialize(const ReplayFunctions& vk, VkCommandBuffer command_buffer, const ResourceBinding& resource, |
| 1066 | ResourceId id, std::vector<LayoutPiece>& pieces, VkImageLayout layout, LayoutTracker* tracker) { | 1213 | ResourceId id, std::vector<LayoutPiece>& pieces, VkImageLayout layout, LayoutTracker* tracker) { |
| 1067 | constexpr VkAccessFlags any_memory = VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT; | 1214 | constexpr VkAccessFlags any_memory = VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT; |
| 1068 | for (auto& piece : pieces) { | 1215 | for (auto& piece : pieces) { |
| 1069 | if (piece.layout != VK_IMAGE_LAYOUT_UNDEFINED) continue; | 1216 | if (piece.layout != VK_IMAGE_LAYOUT_UNDEFINED) continue; |
| 1070 | // Vulkan cannot clear block-compressed images; those start undefined (applications upload them first). | 1217 | const BlockFormat fmt = block_format(resource.format, VK_IMAGE_ASPECT_COLOR_BIT); |
| 1071 | const bool compressed = block_format(resource.format, VK_IMAGE_ASPECT_COLOR_BIT).block > 1; | 1218 | const bool compressed = fmt.block > 1; |
| 1072 | if (resource.not_zeroed || compressed) { | 1219 | if (resource.not_zeroed) { |
| 1073 | image_barrier(vk, command_buffer, resource, piece.range, VK_IMAGE_LAYOUT_UNDEFINED, layout, 0, | 1220 | image_barrier(vk, command_buffer, resource, piece.range, VK_IMAGE_LAYOUT_UNDEFINED, layout, 0, |
| 1074 | VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, any_memory, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT); | 1221 | VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, any_memory, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT); |
| 1222 | } else if (compressed) { | ||
| 1223 | const bool can_zero = | ||
| 1224 | vk.copy_buffer_to_image && | ||
| 1225 | ((vk.zero_buffer && vk.zero_size >= fmt.bytes) || (vk.copy_scratch && vk.fill_buffer)); | ||
| 1226 | if (can_zero) { | ||
| 1227 | const VkImageLayout dst = image_layout(resource, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL); | ||
| 1228 | image_barrier(vk, command_buffer, resource, piece.range, VK_IMAGE_LAYOUT_UNDEFINED, dst, 0, | ||
| 1229 | VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_ACCESS_TRANSFER_WRITE_BIT, | ||
| 1230 | VK_PIPELINE_STAGE_TRANSFER_BIT); | ||
| 1231 | const bool zeroed = zero_compressed_image(vk, command_buffer, resource, piece.range, dst); | ||
| 1232 | image_barrier(vk, command_buffer, resource, piece.range, dst, layout, | ||
| 1233 | zeroed ? VK_ACCESS_TRANSFER_WRITE_BIT : 0, | ||
| 1234 | zeroed ? VK_PIPELINE_STAGE_TRANSFER_BIT : VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, any_memory, | ||
| 1235 | VK_PIPELINE_STAGE_ALL_COMMANDS_BIT); | ||
| 1236 | } else { | ||
| 1237 | image_barrier(vk, command_buffer, resource, piece.range, VK_IMAGE_LAYOUT_UNDEFINED, layout, 0, | ||
| 1238 | VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, any_memory, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT); | ||
| 1239 | } | ||
| 1075 | } else { | 1240 | } else { |
| 1076 | const VkImageLayout dst = image_layout(resource, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL); | 1241 | const VkImageLayout dst = image_layout(resource, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL); |
| 1077 | image_barrier(vk, command_buffer, resource, piece.range, VK_IMAGE_LAYOUT_UNDEFINED, dst, 0, | 1242 | image_barrier(vk, command_buffer, resource, piece.range, VK_IMAGE_LAYOUT_UNDEFINED, dst, 0, |
| @@ -2232,6 +2397,13 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun | |||
| 2232 | (ind->kind == IndirectKind::dispatch && !vk.dispatch_indirect)) | 2397 | (ind->kind == IndirectKind::dispatch && !vk.dispatch_indirect)) |
| 2233 | return ReplayResult::unsupported; | 2398 | return ReplayResult::unsupported; |
| 2234 | } | 2399 | } |
| 2400 | if (ind->kind == IndirectKind::dispatch && ind->pipeline) { // the pipeline and root arguments it was recorded | ||
| 2401 | if (!vk.bind_pipeline || !vk.push_constants || !vk.compute_pipeline) return ReplayResult::unsupported; | ||
| 2402 | const ComputePipeline* pipeline = vk.compute_pipeline(ind->pipeline); | ||
| 2403 | if (!pipeline || !pipeline->pipeline) return ReplayResult::unresolved_resource; | ||
| 2404 | if (pipeline->bindless_set && !vk.bind_descriptor_sets) return ReplayResult::unsupported; | ||
| 2405 | p.pipeline = *pipeline; | ||
| 2406 | } | ||
| 2235 | } else if (const auto* build = std::get_if<BuildAccelerationStructure>(&command)) { | 2407 | } else if (const auto* build = std::get_if<BuildAccelerationStructure>(&command)) { |
| 2236 | if (vk.xdxr_check) { | 2408 | if (vk.xdxr_check) { |
| 2237 | if (!vk.xdxr_check(*build)) return ReplayResult::unsupported; | 2409 | if (!vk.xdxr_check(*build)) return ReplayResult::unsupported; |
| @@ -2245,6 +2417,29 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun | |||
| 2245 | if (!p.accel_src) return ReplayResult::unresolved_resource; | 2417 | if (!p.accel_src) return ReplayResult::unresolved_resource; |
| 2246 | } | 2418 | } |
| 2247 | } | 2419 | } |
| 2420 | } else if (const auto* copy = std::get_if<CopyAccelerationStructure>(&command)) { | ||
| 2421 | // XDXR only (a KHR copy needs VkAccelerationStructureKHR handles and vkCmdCopyAccelerationStructureKHR); | ||
| 2422 | // the destination's room bounds the copy, as the size is only known to the GPU. | ||
| 2423 | if (!vk.xdxr_copy || !vk.buffer_at || copy->mode > 1) return ReplayResult::unsupported; | ||
| 2424 | std::uint64_t room = ~std::uint64_t(0); | ||
| 2425 | VkBuffer buffer = VK_NULL_HANDLE; | ||
| 2426 | VkDeviceSize offset = 0; | ||
| 2427 | if (!vk.buffer_at(copy->dst_va, room, buffer, offset)) return ReplayResult::unresolved_resource; | ||
| 2428 | std::uint64_t source = ~std::uint64_t(0); | ||
| 2429 | if (!vk.buffer_at(copy->src_va, source, buffer, offset)) return ReplayResult::unresolved_resource; | ||
| 2430 | p.xdxr_bytes = std::min(room, source); | ||
| 2431 | } else if (const auto* info = std::get_if<AccelerationStructurePostbuild>(&command)) { | ||
| 2432 | // The KHR path never wrote postbuild values; it keeps skipping them rather than failing the list. | ||
| 2433 | if (!vk.xdxr_postbuild) { | ||
| 2434 | p.skip = true; | ||
| 2435 | } else { | ||
| 2436 | if (!vk.buffer_at || (info->type != 0 && info->type != 3)) return ReplayResult::unsupported; | ||
| 2437 | std::uint64_t room = 8 * info->sources.size(); | ||
| 2438 | VkBuffer buffer = VK_NULL_HANDLE; | ||
| 2439 | VkDeviceSize offset = 0; | ||
| 2440 | if (!vk.buffer_at(info->dest_va, room, buffer, offset)) return ReplayResult::unresolved_resource; | ||
| 2441 | if (room < 8 * info->sources.size()) return ReplayResult::invalid_copy; | ||
| 2442 | } | ||
| 2248 | } else if (const auto* dispatch = std::get_if<Dispatch>(&command)) { | 2443 | } else if (const auto* dispatch = std::get_if<Dispatch>(&command)) { |
| 2249 | if (!vk.bind_pipeline || !vk.push_constants || !vk.dispatch || !vk.compute_pipeline) | 2444 | if (!vk.bind_pipeline || !vk.push_constants || !vk.dispatch || !vk.compute_pipeline) |
| 2250 | return ReplayResult::unsupported; | 2445 | return ReplayResult::unsupported; |
| @@ -2953,14 +3148,32 @@ inline void emit(const PreparedList& prepared, VkCommandBuffer command_buffer, c | |||
| 2953 | } else if (ind->kind == IndirectKind::draw_indexed) { | 3148 | } else if (ind->kind == IndirectKind::draw_indexed) { |
| 2954 | vk.draw_indexed_indirect(command_buffer, p.binding.buffer, arguments, ind->max_count, ind->stride); | 3149 | vk.draw_indexed_indirect(command_buffer, p.binding.buffer, arguments, ind->max_count, ind->stride); |
| 2955 | } else if (ind->kind == IndirectKind::dispatch) { | 3150 | } else if (ind->kind == IndirectKind::dispatch) { |
| 3151 | if (ind->pipeline) { | ||
| 3152 | ShaderUserData data{}; | ||
| 3153 | std::copy(ind->user_data.begin(), ind->user_data.end(), data.s); | ||
| 3154 | data.heap_base = vk.heap_base; | ||
| 3155 | data.code_base = p.pipeline.code_base; | ||
| 3156 | vk.bind_pipeline(command_buffer, VK_PIPELINE_BIND_POINT_COMPUTE, p.pipeline.pipeline); | ||
| 3157 | if (p.pipeline.bindless_set) | ||
| 3158 | vk.bind_descriptor_sets(command_buffer, VK_PIPELINE_BIND_POINT_COMPUTE, p.pipeline.layout, 0, | ||
| 3159 | 1, &p.pipeline.bindless_set, 0, nullptr); | ||
| 3160 | vk.push_constants(command_buffer, p.pipeline.layout, VK_SHADER_STAGE_COMPUTE_BIT, 0, sizeof(data), | ||
| 3161 | &data); | ||
| 3162 | } | ||
| 2956 | for (std::uint32_t k = 0; k < ind->max_count; ++k) { | 3163 | for (std::uint32_t k = 0; k < ind->max_count; ++k) { |
| 2957 | vk.dispatch_indirect(command_buffer, p.binding.buffer, | 3164 | vk.dispatch_indirect(command_buffer, p.binding.buffer, |
| 2958 | arguments + VkDeviceSize(k) * ind->stride); | 3165 | arguments + VkDeviceSize(k) * ind->stride); |
| 2959 | } | 3166 | } |
| 2960 | } | 3167 | } |
| 2961 | } | 3168 | } |
| 2962 | } else if (const auto* build = std::get_if<BuildAccelerationStructure>(&command); build && vk.xdxr_record) { | 3169 | } else if (const auto* xdxr_build = std::get_if<BuildAccelerationStructure>(&command); |
| 2963 | vk.xdxr_record(command_buffer, *build); | 3170 | xdxr_build && vk.xdxr_record) { |
| 3171 | vk.xdxr_record(command_buffer, *xdxr_build); | ||
| 3172 | } else if (const auto* copy = std::get_if<CopyAccelerationStructure>(&command)) { | ||
| 3173 | vk.xdxr_copy(command_buffer, copy->src_va, copy->dst_va, p.xdxr_bytes); | ||
| 3174 | } else if (const auto* info = std::get_if<AccelerationStructurePostbuild>(&command); info && !p.skip) { | ||
| 3175 | for (std::size_t i = 0; i < info->sources.size(); ++i) | ||
| 3176 | vk.xdxr_postbuild(command_buffer, info->sources[i], info->dest_va + 8 * i); | ||
| 2964 | } else if (const auto* build = std::get_if<BuildAccelerationStructure>(&command)) { | 3177 | } else if (const auto* build = std::get_if<BuildAccelerationStructure>(&command)) { |
| 2965 | // The build's addresses are console VAs into the GPU address arena (heap_base is its device address). | 3178 | // The build's addresses are console VAs into the GPU address arena (heap_base is its device address). |
| 2966 | // A null VA (no index buffer, no transform) stays null: heap_base + 0 would name the arena's zero page. | 3179 | // A null VA (no index buffer, no transform) stays null: heap_base + 0 would name the arena's zero page. |
diff --git a/runtime/src/xdxr_build.comp b/runtime/src/xdxr_build.comp index 7b5b9d034..908006897 100644 --- a/runtime/src/xdxr_build.comp +++ b/runtime/src/xdxr_build.comp | |||
| @@ -13,8 +13,22 @@ | |||
| 13 | // MODE_RADIX_* a stable LSD radix sort of the keys with their element indices: 8 passes of 4-bit digits, each | 13 | // MODE_RADIX_* a stable LSD radix sort of the keys with their element indices: 8 passes of 4-bit digits, each |
| 14 | // a count per tile of RADIX_TILE elements, one exclusive scan, and a scatter (24 dispatches in all, | 14 | // a count per tile of RADIX_TILE elements, one exclusive scan, and a scatter (24 dispatches in all, |
| 15 | // whatever the count; shared memory only, no subgroup operations) | 15 | // whatever the count; shared memory only, no subgroup operations) |
| 16 | // MODE_SMALL_SORT up to SMALL_SORT_MAX keys: one workgroup sorts them in shared memory (bitonic, ties by element | ||
| 17 | // index, so the order is the stable one), in one dispatch instead of the radix sort's 24, whose | ||
| 18 | // fixed latency dominated small builds | ||
| 16 | // MODE_LEVEL one thread per BOX32 node of one level: four consecutive entries of the level below | 19 | // MODE_LEVEL one thread per BOX32 node of one level: four consecutive entries of the level below |
| 17 | // MODE_HEADER one thread: the 64-byte header | 20 | // MODE_HEADER one thread: the 64-byte header |
| 21 | // An update (D3D12 PERFORM_UPDATE: same topology, new positions or transforms) refits instead: MODE_COPY copies the | ||
| 22 | // source structure to the destination when they differ, MODE_TRIANGLES / MODE_INSTANCES rewrite the elements at their | ||
| 23 | // slots, MODE_LEVEL with arg2 = 1 recomputes each node's boxes from the children it already points to (the tree's | ||
| 24 | // grouping is kept, so there is no Morton pass and no sort), and MODE_HEADER rewrites the bounds. | ||
| 25 | // MODE_COPY one thread per word: count words from src0 to dst | ||
| 26 | // MODE_COPY_AS CopyRaytracingAccelerationStructure CLONE / COMPACT: the source structure's size comes from its | ||
| 27 | // header (totalSizeIn64BNodes), so the copy can follow a build in the same list; at most count | ||
| 28 | // words. The records are position-independent (node pointers count from the structure's start, and | ||
| 29 | // a TLAS names its BLASes by address), so the bytes are the copy. | ||
| 30 | // MODE_POSTBUILD one thread: the 8-byte COMPACTED_SIZE or CURRENT_SIZE of the structure at src0, at dst. A build | ||
| 31 | // is already exactly its layout's size, so both are totalSizeIn64BNodes * 64. | ||
| 18 | // The tree groups four consecutive children per node in Morton order, level by level, so its shape depends only on | 32 | // The tree groups four consecutive children per node in Morton order, level by level, so its shape depends only on |
| 19 | // the element count and the layout (xdxr_build.h XdxrLayout) is known when the command is recorded. | 33 | // the element count and the layout (xdxr_build.h XdxrLayout) is known when the command is recorded. |
| 20 | // | 34 | // |
| @@ -31,9 +45,11 @@ layout(local_size_x = 64) in; | |||
| 31 | layout(buffer_reference, std430, buffer_reference_align = 4) buffer Words { uint w[]; }; | 45 | layout(buffer_reference, std430, buffer_reference_align = 4) buffer Words { uint w[]; }; |
| 32 | 46 | ||
| 33 | const uint MODE_INIT = 0u, MODE_TRIANGLES = 1u, MODE_INSTANCES = 2u, MODE_MORTON = 3u, MODE_LEVEL = 5u, | 47 | const uint MODE_INIT = 0u, MODE_TRIANGLES = 1u, MODE_INSTANCES = 2u, MODE_MORTON = 3u, MODE_LEVEL = 5u, |
| 34 | MODE_HEADER = 6u, MODE_RADIX_COUNT = 7u, MODE_RADIX_SCAN = 8u, MODE_RADIX_SCATTER = 9u; | 48 | MODE_HEADER = 6u, MODE_RADIX_COUNT = 7u, MODE_RADIX_SCAN = 8u, MODE_RADIX_SCATTER = 9u, |
| 49 | MODE_SMALL_SORT = 10u, MODE_COPY = 11u, MODE_COPY_AS = 12u, MODE_POSTBUILD = 13u; | ||
| 50 | const uint SMALL_SORT_MAX = 1024u; // xdxr_build.h XdxrLayout::small_sort_max | ||
| 35 | const uint RADIX_BITS = 4u, RADIX_BINS = 16u, RADIX_PASSES = 8u; | 51 | const uint RADIX_BITS = 4u, RADIX_BINS = 16u, RADIX_PASSES = 8u; |
| 36 | const uint RADIX_TILE = 2048u; // elements per workgroup in count and scatter: 32 chunks of 64 | 52 | const uint RADIX_TILE = 256u; // elements per workgroup in count and scatter: 4 chunks of 64 |
| 37 | const uint INVALID = 0xffffffffu; | 53 | const uint INVALID = 0xffffffffu; |
| 38 | const uint TRI0 = 0u, BOX32 = 5u, INSTANCE = 6u; | 54 | const uint TRI0 = 0u, BOX32 = 5u, INSTANCE = 6u; |
| 39 | const uint REMAP_IDENTITY = 0x09u; | 55 | const uint REMAP_IDENTITY = 0x09u; |
| @@ -53,7 +69,7 @@ layout(push_constant) uniform Push { | |||
| 53 | uint arg0; // triangles: vertex stride; level: entries in the level below | 69 | uint arg0; // triangles: vertex stride; level: entries in the level below |
| 54 | uint arg1; // triangles: 0 = R32G32B32_FLOAT, 1 = R32G32_FLOAT; level: first node of the level below, | 70 | uint arg1; // triangles: 0 = R32G32B32_FLOAT, 1 = R32G32_FLOAT; level: first node of the level below, |
| 55 | // or INVALID when the level below is the elements | 71 | // or INVALID when the level below is the elements |
| 56 | uint arg2; // triangles: index type (0 none, 1 u16, 2 u32); level: 1 for the root level | 72 | uint arg2; // triangles: index type (0 none, 1 u16, 2 u32); level: 1 = refit the existing node |
| 57 | uint geometry; // triangles: geometry index << 8 | D3D12_RAYTRACING_GEOMETRY_FLAGS | 73 | uint geometry; // triangles: geometry index << 8 | D3D12_RAYTRACING_GEOMETRY_FLAGS |
| 58 | uint elements; // element count N | 74 | uint elements; // element count N |
| 59 | uint sort_size; // N: the keys sorted (one per element) | 75 | uint sort_size; // N: the keys sorted (one per element) |
| @@ -254,6 +270,41 @@ void morton(uint i) { | |||
| 254 | store(pc.scratch, keys_off() + 4u * i, key); | 270 | store(pc.scratch, keys_off() + 4u * i, key); |
| 255 | store(pc.scratch, vals_off() + 4u * i, i); | 271 | store(pc.scratch, vals_off() + 4u * i, i); |
| 256 | } | 272 | } |
| 273 | // ---- MODE_SMALL_SORT ---- | ||
| 274 | // 8 KiB, with the radix arrays below about 12.5 KiB: under the 16 KiB every Vulkan device must allow. | ||
| 275 | shared uint small_keys[SMALL_SORT_MAX]; | ||
| 276 | shared uint small_vals[SMALL_SORT_MAX]; | ||
| 277 | |||
| 278 | void small_sort(uint t) { | ||
| 279 | uint n = pc.sort_size, p = 1u; | ||
| 280 | while (p < n) p <<= 1; | ||
| 281 | for (uint i = t; i < p; i += 64u) { | ||
| 282 | small_keys[i] = i < n ? load(pc.scratch, keys_off() + 4u * i) : INVALID; | ||
| 283 | small_vals[i] = i < n ? load(pc.scratch, vals_off() + 4u * i) : INVALID; | ||
| 284 | } | ||
| 285 | barrier(); | ||
| 286 | for (uint k = 2u; k <= p; k <<= 1) { | ||
| 287 | for (uint j = k >> 1; j > 0u; j >>= 1) { | ||
| 288 | for (uint i = t; i < p; i += 64u) { | ||
| 289 | uint l = i ^ j; | ||
| 290 | if (l > i) { | ||
| 291 | uint ki = small_keys[i], kl = small_keys[l], vi = small_vals[i], vl = small_vals[l]; | ||
| 292 | bool greater = ki > kl || (ki == kl && vi > vl); | ||
| 293 | if (greater == ((i & k) == 0u)) { | ||
| 294 | small_keys[i] = kl; small_keys[l] = ki; | ||
| 295 | small_vals[i] = vl; small_vals[l] = vi; | ||
| 296 | } | ||
| 297 | } | ||
| 298 | } | ||
| 299 | barrier(); | ||
| 300 | } | ||
| 301 | } | ||
| 302 | for (uint i = t; i < n; i += 64u) { | ||
| 303 | store(pc.scratch, keys_off() + 4u * i, small_keys[i]); | ||
| 304 | store(pc.scratch, vals_off() + 4u * i, small_vals[i]); | ||
| 305 | } | ||
| 306 | } | ||
| 307 | |||
| 257 | // ---- MODE_RADIX_* ---- | 308 | // ---- MODE_RADIX_* ---- |
| 258 | shared uint radix_hist[RADIX_BINS]; | 309 | shared uint radix_hist[RADIX_BINS]; |
| 259 | shared uint radix_rank[RADIX_BINS][64]; | 310 | shared uint radix_rank[RADIX_BINS][64]; |
| @@ -341,7 +392,22 @@ void build_node(uint n) { | |||
| 341 | uint entry = 4u * n + c; | 392 | uint entry = 4u * n + c; |
| 342 | uint child = INVALID; | 393 | uint child = INVALID; |
| 343 | vec3 lo = vec3(uintBitsToFloat(0x7f800000u)), hi = -lo; // min > max: the box test misses it | 394 | vec3 lo = vec3(uintBitsToFloat(0x7f800000u)), hi = -lo; // min > max: the box test misses it |
| 344 | if (entry < pc.arg0) { | 395 | if (pc.arg2 == 1u) { |
| 396 | // refit: the child this node already has; its new box is in scratch (an element's from MODE_TRIANGLES / | ||
| 397 | // MODE_INSTANCES, a node's from the level below) | ||
| 398 | child = load(pc.dst, o + 4u * c); | ||
| 399 | if (child != INVALID) { | ||
| 400 | uint at = ptr_unit(child) * 64u; | ||
| 401 | if ((child & 7u) == BOX32) { | ||
| 402 | load_box(pc.elements + (at - pc.nodes_off) / 128u, lo, hi); | ||
| 403 | } else { | ||
| 404 | uint e = (at - pc.elements_off) / element_size(); | ||
| 405 | load_box(e, lo, hi); | ||
| 406 | if (pc.tlas != 0u) store(pc.dst, pc.elements_off + 128u * e + 116u, me); | ||
| 407 | } | ||
| 408 | if (!box_empty(lo, hi)) { ulo = min(ulo, lo); uhi = max(uhi, hi); } | ||
| 409 | } | ||
| 410 | } else if (entry < pc.arg0) { | ||
| 345 | if (pc.arg1 == INVALID) { | 411 | if (pc.arg1 == INVALID) { |
| 346 | uint e = load(pc.scratch, vals_off() + 4u * entry); | 412 | uint e = load(pc.scratch, vals_off() + 4u * entry); |
| 347 | child = element_ptr(e); | 413 | child = element_ptr(e); |
| @@ -389,12 +455,23 @@ void main() { | |||
| 389 | if (pc.mode == MODE_RADIX_COUNT) { radix_count(gl_WorkGroupID.x, gl_LocalInvocationID.x); return; } | 455 | if (pc.mode == MODE_RADIX_COUNT) { radix_count(gl_WorkGroupID.x, gl_LocalInvocationID.x); return; } |
| 390 | if (pc.mode == MODE_RADIX_SCAN) { radix_scan(gl_LocalInvocationID.x); return; } | 456 | if (pc.mode == MODE_RADIX_SCAN) { radix_scan(gl_LocalInvocationID.x); return; } |
| 391 | if (pc.mode == MODE_RADIX_SCATTER) { radix_scatter(gl_WorkGroupID.x, gl_LocalInvocationID.x); return; } | 457 | if (pc.mode == MODE_RADIX_SCATTER) { radix_scatter(gl_WorkGroupID.x, gl_LocalInvocationID.x); return; } |
| 458 | if (pc.mode == MODE_SMALL_SORT) { small_sort(gl_LocalInvocationID.x); return; } | ||
| 392 | if (pc.mode == MODE_HEADER) { | 459 | if (pc.mode == MODE_HEADER) { |
| 393 | if (i == 0u) build_header(); | 460 | if (i == 0u) build_header(); |
| 394 | return; | 461 | return; |
| 395 | } | 462 | } |
| 396 | if (i >= pc.count) return; | 463 | if (i >= pc.count) return; |
| 397 | if (pc.mode == MODE_INIT) { | 464 | if (pc.mode == MODE_POSTBUILD) { |
| 465 | if (i == 0u) { store(pc.dst, 0u, load(pc.src0, 4u) * 64u); store(pc.dst, 4u, 0u); } | ||
| 466 | return; | ||
| 467 | } | ||
| 468 | if (pc.mode == MODE_COPY_AS) { | ||
| 469 | if (4u * i < load(pc.src0, 4u) * 64u) store(pc.dst, 4u * i, load(pc.src0, 4u * i)); | ||
| 470 | return; | ||
| 471 | } | ||
| 472 | if (pc.mode == MODE_COPY) { | ||
| 473 | store(pc.dst, 4u * i, load(pc.src0, 4u * i)); | ||
| 474 | } else if (pc.mode == MODE_INIT) { | ||
| 398 | store(pc.dst, pc.parents_off + 4u * i, INVALID); | 475 | store(pc.dst, pc.parents_off + 4u * i, INVALID); |
| 399 | if (i < 3u) { store(pc.scratch, 4u * i, INVALID); store(pc.scratch, 12u + 4u * i, 0u); } | 476 | if (i < 3u) { store(pc.scratch, 4u * i, INVALID); store(pc.scratch, 12u + 4u * i, 0u); } |
| 400 | } else if (pc.mode == MODE_TRIANGLES) { | 477 | } else if (pc.mode == MODE_TRIANGLES) { |
diff --git a/runtime/src/xdxr_build.h b/runtime/src/xdxr_build.h index 32ee111cb..6930078a4 100644 --- a/runtime/src/xdxr_build.h +++ b/runtime/src/xdxr_build.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | // device addresses are wider (llvmpipe's are host pointers), the layer must present a narrower window and a bias. | 15 | // device addresses are wider (llvmpipe's are host pointers), the layer must present a narrower window and a bias. |
| 16 | #pragma once | 16 | #pragma once |
| 17 | 17 | ||
| 18 | #include <algorithm> | ||
| 18 | #include <cstddef> | 19 | #include <cstddef> |
| 19 | #include <cstdint> | 20 | #include <cstdint> |
| 20 | #include <vector> | 21 | #include <vector> |
| @@ -41,9 +42,10 @@ struct XdxrLayout { | |||
| 41 | std::uint32_t size = 0; // result data size in bytes, a multiple of 64 | 42 | std::uint32_t size = 0; // result data size in bytes, a multiple of 64 |
| 42 | std::uint32_t parent_entries = 0; // one per 64-byte unit from elements_off on | 43 | std::uint32_t parent_entries = 0; // one per 64-byte unit from elements_off on |
| 43 | std::uint32_t sort_size = 0; // keys the radix sort orders: one per element | 44 | std::uint32_t sort_size = 0; // keys the radix sort orders: one per element |
| 44 | static constexpr std::uint32_t radix_tile = 2048; // xdxr_build.comp RADIX_TILE | 45 | static constexpr std::uint32_t radix_tile = 256; // xdxr_build.comp RADIX_TILE |
| 45 | static constexpr std::uint32_t radix_bins = 16; | 46 | static constexpr std::uint32_t radix_bins = 16; |
| 46 | static constexpr std::uint32_t radix_passes = 8; | 47 | static constexpr std::uint32_t radix_passes = 8; |
| 48 | static constexpr std::uint32_t small_sort_max = 1024; // xdxr_build.comp SMALL_SORT_MAX: one-workgroup sort | ||
| 47 | std::uint64_t scratch = 0; // scratch bytes | 49 | std::uint64_t scratch = 0; // scratch bytes |
| 48 | 50 | ||
| 49 | // False when the count would overflow the 32-bit offsets of the format. | 51 | // False when the count would overflow the 32-bit offsets of the format. |
| @@ -108,11 +110,16 @@ public: | |||
| 108 | 110 | ||
| 109 | // Records a bottom-level build into `dst` (layout.size bytes) using `scratch` (layout.scratch bytes). `layout` | 111 | // Records a bottom-level build into `dst` (layout.size bytes) using `scratch` (layout.scratch bytes). `layout` |
| 110 | // must come from compute() with the sum of the geometries' triangle counts. | 112 | // must come from compute() with the sum of the geometries' triangle counts. |
| 113 | // | ||
| 114 | // With `update_from` set, an update (D3D12 PERFORM_UPDATE) instead: the structure at `update_from` (the | ||
| 115 | // destination itself, or another one, which is copied first) was built from the same topology, and is refitted | ||
| 116 | // to the new positions. Its tree is kept and only its boxes change, which is valid for any motion and costs no | ||
| 117 | // sort, though a refitted tree traverses more slowly as the geometry moves away from where it was built. | ||
| 111 | bool record_blas(VkCommandBuffer cb, const XdxrLayout& layout, const std::vector<XdxrTriangles>& geometries, | 118 | bool record_blas(VkCommandBuffer cb, const XdxrLayout& layout, const std::vector<XdxrTriangles>& geometries, |
| 112 | std::uint64_t dst, std::uint64_t scratch) { | 119 | std::uint64_t dst, std::uint64_t scratch, std::uint64_t update_from = 0) { |
| 113 | if (!loaded_ || layout.tlas) return false; | 120 | if (!loaded_ || layout.tlas) return false; |
| 114 | Push p = base(layout, dst, scratch); | 121 | Push p = base(layout, dst, scratch); |
| 115 | begin(cb, layout, p); | 122 | if (update_from) refit_begin(cb, layout, p, update_from); else begin(cb, layout, p); |
| 116 | std::uint32_t first = 0; | 123 | std::uint32_t first = 0; |
| 117 | for (std::size_t g = 0; g < geometries.size(); ++g) { | 124 | for (std::size_t g = 0; g < geometries.size(); ++g) { |
| 118 | const auto& geo = geometries[g]; | 125 | const auto& geo = geometries[g]; |
| @@ -132,17 +139,18 @@ public: | |||
| 132 | first += geo.triangle_count; | 139 | first += geo.triangle_count; |
| 133 | } | 140 | } |
| 134 | if (first != layout.elements) return false; | 141 | if (first != layout.elements) return false; |
| 135 | finish(cb, layout, p); | 142 | if (update_from) refit_finish(cb, layout, p); else finish(cb, layout, p); |
| 136 | return true; | 143 | return true; |
| 137 | } | 144 | } |
| 138 | 145 | ||
| 139 | // Records a top-level build from `count` D3D12_RAYTRACING_INSTANCE_DESCs at `instances`. | 146 | // Records a top-level build from `count` D3D12_RAYTRACING_INSTANCE_DESCs at `instances`. |
| 147 | // `update_from`: as for record_blas; the instances may move, and name other BLASes. | ||
| 140 | bool record_tlas(VkCommandBuffer cb, const XdxrLayout& layout, std::uint64_t instances, std::uint64_t dst, | 148 | bool record_tlas(VkCommandBuffer cb, const XdxrLayout& layout, std::uint64_t instances, std::uint64_t dst, |
| 141 | std::uint64_t scratch, std::uint64_t bias = 0) { | 149 | std::uint64_t scratch, std::uint64_t bias = 0, std::uint64_t update_from = 0) { |
| 142 | if (!loaded_ || !layout.tlas) return false; | 150 | if (!loaded_ || !layout.tlas) return false; |
| 143 | Push p = base(layout, dst, scratch); | 151 | Push p = base(layout, dst, scratch); |
| 144 | p.bias = split(bias); | 152 | p.bias = split(bias); |
| 145 | begin(cb, layout, p); | 153 | if (update_from) refit_begin(cb, layout, p, update_from); else begin(cb, layout, p); |
| 146 | if (layout.elements) { | 154 | if (layout.elements) { |
| 147 | Push t = p; | 155 | Push t = p; |
| 148 | t.mode = mode_instances; | 156 | t.mode = mode_instances; |
| @@ -150,14 +158,48 @@ public: | |||
| 150 | t.src0 = split(instances); | 158 | t.src0 = split(instances); |
| 151 | dispatch(cb, t, t.count); | 159 | dispatch(cb, t, t.count); |
| 152 | } | 160 | } |
| 153 | finish(cb, layout, p); | 161 | if (update_from) refit_finish(cb, layout, p); else finish(cb, layout, p); |
| 162 | return true; | ||
| 163 | } | ||
| 164 | |||
| 165 | // CopyRaytracingAccelerationStructure CLONE or COMPACT: the structure at `src` to `dst`, as many bytes as its | ||
| 166 | // header says, at most `max_bytes` (the room the destination has). The structures are position-independent. | ||
| 167 | bool record_copy(VkCommandBuffer cb, std::uint64_t src, std::uint64_t dst, std::uint64_t max_bytes) { | ||
| 168 | if (!loaded_ || !src || !dst || max_bytes < XdxrLayout::header_size) return false; | ||
| 169 | if (src == dst) return true; | ||
| 170 | vk_.vkCmdBindPipeline(cb, VK_PIPELINE_BIND_POINT_COMPUTE, pipeline_); | ||
| 171 | Push p{}; | ||
| 172 | p.mode = mode_copy_as; | ||
| 173 | p.src0 = split(src); | ||
| 174 | p.dst = split(dst); | ||
| 175 | p.count = std::uint32_t(std::min<std::uint64_t>(max_bytes, 0xffffffffull) / 4); | ||
| 176 | dispatch(cb, p, p.count, false); | ||
| 177 | return true; | ||
| 178 | } | ||
| 179 | |||
| 180 | // One postbuild value (COMPACTED_SIZE or CURRENT_SIZE, the same for these builds): 8 bytes at `dst` for the | ||
| 181 | // structure at `src`. A barrier first: a build or copy recorded just before writes the header it reads. | ||
| 182 | bool record_postbuild(VkCommandBuffer cb, std::uint64_t src, std::uint64_t dst) { | ||
| 183 | if (!loaded_ || !src || !dst) return false; | ||
| 184 | VkMemoryBarrier b{VK_STRUCTURE_TYPE_MEMORY_BARRIER, nullptr, VK_ACCESS_SHADER_WRITE_BIT, | ||
| 185 | VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT}; | ||
| 186 | vk_.vkCmdPipelineBarrier(cb, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 1, | ||
| 187 | &b, 0, nullptr, 0, nullptr); | ||
| 188 | vk_.vkCmdBindPipeline(cb, VK_PIPELINE_BIND_POINT_COMPUTE, pipeline_); | ||
| 189 | Push p{}; | ||
| 190 | p.mode = mode_postbuild; | ||
| 191 | p.src0 = split(src); | ||
| 192 | p.dst = split(dst); | ||
| 193 | p.count = 1; | ||
| 194 | dispatch(cb, p, 1, false); | ||
| 154 | return true; | 195 | return true; |
| 155 | } | 196 | } |
| 156 | 197 | ||
| 157 | private: | 198 | private: |
| 158 | enum : std::uint32_t { | 199 | enum : std::uint32_t { |
| 159 | mode_init = 0, mode_triangles = 1, mode_instances = 2, mode_morton = 3, mode_level = 5, mode_header = 6, | 200 | mode_init = 0, mode_triangles = 1, mode_instances = 2, mode_morton = 3, mode_level = 5, mode_header = 6, |
| 160 | mode_radix_count = 7, mode_radix_scan = 8, mode_radix_scatter = 9 | 201 | mode_radix_count = 7, mode_radix_scan = 8, mode_radix_scatter = 9, mode_small_sort = 10, mode_copy = 11, |
| 202 | mode_copy_as = 12, mode_postbuild = 13 | ||
| 161 | }; | 203 | }; |
| 162 | struct Addr { std::uint32_t lo = 0, hi = 0; }; | 204 | struct Addr { std::uint32_t lo = 0, hi = 0; }; |
| 163 | struct Push { // xdxr_build.comp `Push`, std430 push-constant layout | 205 | struct Push { // xdxr_build.comp `Push`, std430 push-constant layout |
| @@ -191,6 +233,36 @@ private: | |||
| 191 | dispatch(cb, init, init.count); | 233 | dispatch(cb, init, init.count); |
| 192 | } | 234 | } |
| 193 | 235 | ||
| 236 | // An update: the source's tree is copied unless it is the destination. Its parent table stays as it is, so there | ||
| 237 | // is no MODE_INIT. | ||
| 238 | void refit_begin(VkCommandBuffer cb, const XdxrLayout& l, const Push& p, std::uint64_t source) { | ||
| 239 | vk_.vkCmdBindPipeline(cb, VK_PIPELINE_BIND_POINT_COMPUTE, pipeline_); | ||
| 240 | const std::uint64_t dst = std::uint64_t(p.dst.hi) << 32 | p.dst.lo; | ||
| 241 | if (source == dst) return; | ||
| 242 | Push c = p; | ||
| 243 | c.mode = mode_copy; | ||
| 244 | c.count = l.size / 4; | ||
| 245 | c.src0 = split(source); | ||
| 246 | dispatch(cb, c, c.count); | ||
| 247 | } | ||
| 248 | |||
| 249 | // Boxes bottom-up through the existing nodes, then the header (its bounds change; nothing else does). | ||
| 250 | void refit_finish(VkCommandBuffer cb, const XdxrLayout& l, const Push& p) { | ||
| 251 | for (std::size_t level = 0; level < l.level_counts.size(); ++level) { | ||
| 252 | Push n = p; | ||
| 253 | n.mode = mode_level; | ||
| 254 | n.count = l.level_counts[level]; | ||
| 255 | n.first = l.level_first[level]; | ||
| 256 | n.arg2 = 1; // refit: read each node's children from the node | ||
| 257 | dispatch(cb, n, n.count); | ||
| 258 | } | ||
| 259 | Push h = p; | ||
| 260 | h.mode = mode_header; | ||
| 261 | h.count = 1; | ||
| 262 | h.first = l.root(); | ||
| 263 | dispatch(cb, h, 1, false); | ||
| 264 | } | ||
| 265 | |||
| 194 | void finish(VkCommandBuffer cb, const XdxrLayout& l, const Push& p) { | 266 | void finish(VkCommandBuffer cb, const XdxrLayout& l, const Push& p) { |
| 195 | Push m = p; | 267 | Push m = p; |
| 196 | m.mode = mode_morton; | 268 | m.mode = mode_morton; |
| @@ -198,7 +270,11 @@ private: | |||
| 198 | dispatch(cb, m, m.count); | 270 | dispatch(cb, m, m.count); |
| 199 | // stable LSD radix sort, 4 bits a pass; an even pass count leaves the result where the keys started | 271 | // stable LSD radix sort, 4 bits a pass; an even pass count leaves the result where the keys started |
| 200 | static_assert(XdxrLayout::radix_passes % 2 == 0, "the sorted keys must end in the first buffer"); | 272 | static_assert(XdxrLayout::radix_passes % 2 == 0, "the sorted keys must end in the first buffer"); |
| 201 | if (l.sort_size > 1) { | 273 | if (l.sort_size > 1 && l.sort_size <= XdxrLayout::small_sort_max) { |
| 274 | Push s = p; | ||
| 275 | s.mode = mode_small_sort; | ||
| 276 | dispatch(cb, s, 64); // one workgroup, shared memory | ||
| 277 | } else if (l.sort_size > 1) { | ||
| 202 | for (std::uint32_t pass = 0; pass < XdxrLayout::radix_passes; ++pass) { | 278 | for (std::uint32_t pass = 0; pass < XdxrLayout::radix_passes; ++pass) { |
| 203 | Push s = p; | 279 | Push s = p; |
| 204 | s.first = pass; | 280 | s.first = pass; |
diff --git a/runtime/src/xdxr_build.inc b/runtime/src/xdxr_build.inc index 8a43b04cd..bbc1bb888 100644 --- a/runtime/src/xdxr_build.inc +++ b/runtime/src/xdxr_build.inc | |||
| @@ -1,3441 +1,4092 @@ | |||
| 1 | {0x07230203,0x00010500,0x000d000b,0x00002b73, | 1 | {0x07230203,0x00010500,0x000d000b,0x000032b4, |
| 2 | 0x00000000,0x00020011,0x00000001,0x00020011, | 2 | 0x00000000,0x00020011,0x00000001,0x00020011, |
| 3 | 0x000014e3,0x0006000b,0x00000001,0x4c534c47, | 3 | 0x000014e3,0x0006000b,0x00000001,0x4c534c47, |
| 4 | 0x6474732e,0x3035342e,0x00000000,0x0003000e, | 4 | 0x6474732e,0x3035342e,0x00000000,0x0003000e, |
| 5 | 0x000014e4,0x00000001,0x000d000f,0x00000005, | 5 | 0x000014e4,0x00000001,0x000f000f,0x00000005, |
| 6 | 0x00000004,0x6e69616d,0x00000000,0x000000f9, | 6 | 0x00000004,0x6e69616d,0x00000000,0x000000fc, |
| 7 | 0x000006d4,0x00000740,0x00000789,0x000007e2, | 7 | 0x000006af,0x000006c4,0x000007a3,0x0000080d, |
| 8 | 0x000009e6,0x000009f0,0x000009f1,0x00060010, | 8 | 0x00000856,0x000008af,0x00000b0e,0x00000b17, |
| 9 | 0x00000004,0x00000011,0x00000040,0x00000001, | 9 | 0x00000b18,0x00060010,0x00000004,0x00000011, |
| 10 | 0x00000001,0x00040047,0x00000015,0x00000006, | 10 | 0x00000040,0x00000001,0x00000001,0x00040047, |
| 11 | 0x00000004,0x00030047,0x00000016,0x00000002, | 11 | 0x00000015,0x00000006,0x00000004,0x00030047, |
| 12 | 0x00050048,0x00000016,0x00000000,0x00000023, | 12 | 0x00000016,0x00000002,0x00050048,0x00000016, |
| 13 | 0x00000000,0x00030047,0x000000f7,0x00000002, | 13 | 0x00000000,0x00000023,0x00000000,0x00030047, |
| 14 | 0x00050048,0x000000f7,0x00000000,0x00000023, | 14 | 0x000000fa,0x00000002,0x00050048,0x000000fa, |
| 15 | 0x00000000,0x00050048,0x000000f7,0x00000001, | 15 | 0x00000000,0x00000023,0x00000000,0x00050048, |
| 16 | 0x00000023,0x00000008,0x00050048,0x000000f7, | 16 | 0x000000fa,0x00000001,0x00000023,0x00000008, |
| 17 | 0x00000002,0x00000023,0x00000010,0x00050048, | 17 | 0x00050048,0x000000fa,0x00000002,0x00000023, |
| 18 | 0x000000f7,0x00000003,0x00000023,0x00000018, | 18 | 0x00000010,0x00050048,0x000000fa,0x00000003, |
| 19 | 0x00050048,0x000000f7,0x00000004,0x00000023, | 19 | 0x00000023,0x00000018,0x00050048,0x000000fa, |
| 20 | 0x00000020,0x00050048,0x000000f7,0x00000005, | 20 | 0x00000004,0x00000023,0x00000020,0x00050048, |
| 21 | 0x00000023,0x00000028,0x00050048,0x000000f7, | 21 | 0x000000fa,0x00000005,0x00000023,0x00000028, |
| 22 | 0x00000006,0x00000023,0x00000030,0x00050048, | 22 | 0x00050048,0x000000fa,0x00000006,0x00000023, |
| 23 | 0x000000f7,0x00000007,0x00000023,0x00000034, | 23 | 0x00000030,0x00050048,0x000000fa,0x00000007, |
| 24 | 0x00050048,0x000000f7,0x00000008,0x00000023, | 24 | 0x00000023,0x00000034,0x00050048,0x000000fa, |
| 25 | 0x00000038,0x00050048,0x000000f7,0x00000009, | 25 | 0x00000008,0x00000023,0x00000038,0x00050048, |
| 26 | 0x00000023,0x0000003c,0x00050048,0x000000f7, | 26 | 0x000000fa,0x00000009,0x00000023,0x0000003c, |
| 27 | 0x0000000a,0x00000023,0x00000040,0x00050048, | 27 | 0x00050048,0x000000fa,0x0000000a,0x00000023, |
| 28 | 0x000000f7,0x0000000b,0x00000023,0x00000044, | 28 | 0x00000040,0x00050048,0x000000fa,0x0000000b, |
| 29 | 0x00050048,0x000000f7,0x0000000c,0x00000023, | 29 | 0x00000023,0x00000044,0x00050048,0x000000fa, |
| 30 | 0x00000048,0x00050048,0x000000f7,0x0000000d, | 30 | 0x0000000c,0x00000023,0x00000048,0x00050048, |
| 31 | 0x00000023,0x0000004c,0x00050048,0x000000f7, | 31 | 0x000000fa,0x0000000d,0x00000023,0x0000004c, |
| 32 | 0x0000000e,0x00000023,0x00000050,0x00050048, | 32 | 0x00050048,0x000000fa,0x0000000e,0x00000023, |
| 33 | 0x000000f7,0x0000000f,0x00000023,0x00000054, | 33 | 0x00000050,0x00050048,0x000000fa,0x0000000f, |
| 34 | 0x00050048,0x000000f7,0x00000010,0x00000023, | 34 | 0x00000023,0x00000054,0x00050048,0x000000fa, |
| 35 | 0x00000058,0x00050048,0x000000f7,0x00000011, | 35 | 0x00000010,0x00000023,0x00000058,0x00050048, |
| 36 | 0x00000023,0x0000005c,0x00050048,0x000000f7, | 36 | 0x000000fa,0x00000011,0x00000023,0x0000005c, |
| 37 | 0x00000012,0x00000023,0x00000060,0x00050048, | 37 | 0x00050048,0x000000fa,0x00000012,0x00000023, |
| 38 | 0x000000f7,0x00000013,0x00000023,0x00000064, | 38 | 0x00000060,0x00050048,0x000000fa,0x00000013, |
| 39 | 0x00040047,0x000009e6,0x0000000b,0x0000001c, | 39 | 0x00000023,0x00000064,0x00040047,0x00000b0e, |
| 40 | 0x00040047,0x000009f0,0x0000000b,0x0000001a, | 40 | 0x0000000b,0x0000001c,0x00040047,0x00000b17, |
| 41 | 0x00040047,0x000009f1,0x0000000b,0x0000001b, | 41 | 0x0000000b,0x0000001a,0x00040047,0x00000b18, |
| 42 | 0x00040047,0x00000a6c,0x0000000b,0x00000019, | 42 | 0x0000000b,0x0000001b,0x00040047,0x00000bf1, |
| 43 | 0x00020013,0x00000002,0x00030021,0x00000003, | 43 | 0x0000000b,0x00000019,0x00020013,0x00000002, |
| 44 | 0x00000002,0x00040015,0x00000006,0x00000020, | 44 | 0x00030021,0x00000003,0x00000002,0x00040015, |
| 45 | 0x00000000,0x00040017,0x00000007,0x00000006, | 45 | 0x00000006,0x00000020,0x00000000,0x00040017, |
| 46 | 0x00000002,0x00040020,0x00000009,0x00000007, | 46 | 0x00000007,0x00000006,0x00000002,0x00040020, |
| 47 | 0x00000006,0x00030027,0x00000014,0x000014e5, | 47 | 0x00000009,0x00000007,0x00000006,0x00030027, |
| 48 | 0x0003001d,0x00000015,0x00000006,0x0003001e, | 48 | 0x00000014,0x000014e5,0x0003001d,0x00000015, |
| 49 | 0x00000016,0x00000015,0x00040020,0x00000014, | 49 | 0x00000006,0x0003001e,0x00000016,0x00000015, |
| 50 | 0x000014e5,0x00000016,0x00030016,0x00000027, | 50 | 0x00040020,0x00000014,0x000014e5,0x00000016, |
| 51 | 0x00000020,0x00040020,0x00000028,0x00000007, | 51 | 0x00030016,0x00000027,0x00000020,0x00040020, |
| 52 | 0x00000027,0x00020014,0x0000002f,0x00040017, | 52 | 0x00000028,0x00000007,0x00000027,0x00020014, |
| 53 | 0x0000004b,0x00000027,0x00000003,0x00040020, | 53 | 0x0000002f,0x00040017,0x0000004b,0x00000027, |
| 54 | 0x0000004c,0x00000007,0x0000004b,0x0004002b, | 54 | 0x00000003,0x00040020,0x0000004c,0x00000007, |
| 55 | 0x00000006,0x000000a3,0x00000000,0x0004001e, | 55 | 0x0000004b,0x0004002b,0x00000006,0x000000a6, |
| 56 | 0x000000a8,0x00000006,0x00000006,0x0004002b, | 56 | 0x00000000,0x0004001e,0x000000ab,0x00000006, |
| 57 | 0x00000006,0x000000ad,0x00000001,0x00040015, | 57 | 0x00000006,0x0004002b,0x00000006,0x000000b0, |
| 58 | 0x000000d6,0x00000020,0x00000001,0x0004002b, | 58 | 0x00000001,0x00040015,0x000000d9,0x00000020, |
| 59 | 0x000000d6,0x000000d7,0x00000000,0x00040020, | 59 | 0x00000001,0x0004002b,0x000000d9,0x000000da, |
| 60 | 0x000000d8,0x000014e5,0x00000006,0x0016001e, | 60 | 0x00000000,0x00040020,0x000000db,0x000014e5, |
| 61 | 0x000000f7,0x00000007,0x00000007,0x00000007, | 61 | 0x00000006,0x0016001e,0x000000fa,0x00000007, |
| 62 | 0x00000007,0x00000007,0x00000007,0x00000006, | 62 | 0x00000007,0x00000007,0x00000007,0x00000007, |
| 63 | 0x00000007,0x00000006,0x00000006,0x00000006, | ||
| 63 | 0x00000006,0x00000006,0x00000006,0x00000006, | 64 | 0x00000006,0x00000006,0x00000006,0x00000006, |
| 64 | 0x00000006,0x00000006,0x00000006,0x00000006, | 65 | 0x00000006,0x00000006,0x00000006,0x00000006, |
| 65 | 0x00000006,0x00000006,0x00000006,0x00000006, | 66 | 0x00000006,0x00000006,0x00000006,0x00040020, |
| 66 | 0x00000006,0x00040020,0x000000f8,0x00000009, | 67 | 0x000000fb,0x00000009,0x000000fa,0x0004003b, |
| 67 | 0x000000f7,0x0004003b,0x000000f8,0x000000f9, | 68 | 0x000000fb,0x000000fc,0x00000009,0x0004002b, |
| 68 | 0x00000009,0x0004002b,0x000000d6,0x000000fa, | 69 | 0x000000d9,0x000000fd,0x0000000e,0x00040020, |
| 69 | 0x0000000e,0x00040020,0x000000fb,0x00000009, | 70 | 0x000000fe,0x00000009,0x00000006,0x0004002b, |
| 70 | 0x00000006,0x0004002b,0x00000006,0x000000fe, | 71 | 0x00000006,0x00000101,0x00000100,0x0004002b, |
| 71 | 0x00000800,0x0004002b,0x00000006,0x00000104, | 72 | 0x00000006,0x00000107,0x00000040,0x0004002b, |
| 72 | 0x00000040,0x0004002b,0x00000006,0x00000107, | 73 | 0x00000006,0x0000010a,0x00000004,0x0004002b, |
| 73 | 0x00000004,0x0004002b,0x00000006,0x0000010e, | 74 | 0x00000006,0x00000111,0x00000008,0x0004002b, |
| 74 | 0x00000008,0x0004002b,0x00000006,0x00000115, | 75 | 0x00000006,0x00000118,0x0000000c,0x0004002b, |
| 75 | 0x0000000c,0x0004002b,0x00000006,0x0000011c, | 76 | 0x00000006,0x0000011f,0x00000010,0x0004002b, |
| 76 | 0x00000010,0x0004002b,0x00000006,0x0000012d, | 77 | 0x00000006,0x00000130,0x80000000,0x0004002b, |
| 77 | 0x80000000,0x0004002b,0x00000006,0x00000142, | 78 | 0x00000006,0x00000145,0x7fffffff,0x0004002b, |
| 78 | 0x7fffffff,0x0004002b,0x00000006,0x0000014d, | 79 | 0x00000006,0x00000150,0x00000018,0x0004002b, |
| 79 | 0x00000018,0x0004002b,0x000000d6,0x00000151, | 80 | 0x000000d9,0x00000154,0x00000001,0x00040020, |
| 80 | 0x00000001,0x00040020,0x00000153,0x00000009, | 81 | 0x00000156,0x00000009,0x00000007,0x0004002b, |
| 81 | 0x00000007,0x0004002b,0x00000006,0x0000016d, | 82 | 0x00000006,0x00000170,0x00000002,0x0004002b, |
| 82 | 0x00000002,0x0004002b,0x00000006,0x00000186, | 83 | 0x00000006,0x00000189,0x00000014,0x0004002b, |
| 83 | 0x00000014,0x0004002b,0x00000027,0x000001ea, | 84 | 0x00000027,0x000001ed,0x3f000000,0x0004002b, |
| 84 | 0x3f000000,0x0004002b,0x000000d6,0x00000202, | 85 | 0x000000d9,0x00000205,0x00000002,0x0004002b, |
| 85 | 0x00000002,0x0004002b,0x000000d6,0x0000020a, | 86 | 0x000000d9,0x0000020d,0x00000003,0x0004002b, |
| 86 | 0x00000003,0x0004002b,0x000000d6,0x00000212, | 87 | 0x000000d9,0x00000215,0x00000004,0x0004002b, |
| 87 | 0x00000004,0x0004002b,0x000000d6,0x0000021a, | 88 | 0x000000d9,0x0000021d,0x00000005,0x0004002b, |
| 88 | 0x00000005,0x0004002b,0x000000d6,0x00000221, | 89 | 0x000000d9,0x00000224,0x00000013,0x0004002b, |
| 89 | 0x00000013,0x0004002b,0x00000006,0x00000225, | 90 | 0x00000006,0x00000228,0x00000080,0x0004002b, |
| 90 | 0x00000080,0x0004002b,0x000000d6,0x00000229, | 91 | 0x000000d9,0x0000022c,0x0000000f,0x0004002b, |
| 91 | 0x0000000f,0x0004002b,0x000000d6,0x00000230, | 92 | 0x000000d9,0x00000233,0x00000006,0x0004002b, |
| 92 | 0x00000006,0x0004002b,0x00000006,0x00000236, | 93 | 0x00000006,0x00000239,0x00000006,0x0004002b, |
| 93 | 0x00000006,0x0004002b,0x000000d6,0x0000023b, | 94 | 0x000000d9,0x0000023e,0x00000010,0x0004002b, |
| 94 | 0x00000010,0x0004002b,0x00000006,0x00000243, | 95 | 0x00000006,0x00000246,0x00000005,0x0004002b, |
| 95 | 0x00000005,0x0004002b,0x000000d6,0x0000024d, | 96 | 0x000000d9,0x00000250,0x00000009,0x0004002b, |
| 96 | 0x00000009,0x0004002b,0x000000d6,0x00000263, | 97 | 0x000000d9,0x00000266,0x0000000a,0x0004002b, |
| 97 | 0x0000000a,0x0004002b,0x00000027,0x0000026a, | 98 | 0x00000027,0x0000026d,0x00000000,0x0004002b, |
| 98 | 0x00000000,0x0004002b,0x000000d6,0x00000278, | 99 | 0x000000d9,0x0000027b,0x0000000b,0x0004002b, |
| 99 | 0x0000000b,0x0004002b,0x00000006,0x000002a0, | 100 | 0x00000006,0x000002a3,0x0000ffff,0x0004002b, |
| 100 | 0x0000ffff,0x0004002b,0x00000006,0x000002b4, | 101 | 0x00000006,0x000002b7,0x00000003,0x00040017, |
| 101 | 0x00000003,0x00040017,0x000002b9,0x00000027, | 102 | 0x000002bc,0x00000027,0x00000004,0x0004001c, |
| 102 | 0x00000004,0x0004001c,0x000002f3,0x0000004b, | 103 | 0x000002f6,0x0000004b,0x000002b7,0x00040020, |
| 103 | 0x000002b4,0x00040020,0x000002f4,0x00000007, | 104 | 0x000002f7,0x00000007,0x000002f6,0x0004002b, |
| 104 | 0x000002f3,0x0004002b,0x000000d6,0x00000305, | 105 | 0x000000d9,0x00000308,0x00000008,0x0004002b, |
| 105 | 0x00000008,0x0004002b,0x00000006,0x00000344, | 106 | 0x00000006,0x00000347,0x00000024,0x0004002b, |
| 106 | 0x00000024,0x0004002b,0x00000006,0x0000034f, | 107 | 0x00000006,0x00000352,0x00000028,0x0004002b, |
| 107 | 0x00000028,0x0004002b,0x00000006,0x0000035a, | 108 | 0x00000006,0x0000035d,0x0000002c,0x0004002b, |
| 108 | 0x0000002c,0x0004002b,0x00000006,0x00000365, | 109 | 0x00000006,0x00000368,0x00000030,0x0004002b, |
| 109 | 0x00000030,0x0004002b,0x000000d6,0x00000367, | 110 | 0x000000d9,0x0000036a,0x0000000c,0x0004002b, |
| 110 | 0x0000000c,0x0004002b,0x00000006,0x00000371, | 111 | 0x00000006,0x00000374,0x00000034,0x0004002b, |
| 111 | 0x00000034,0x0004002b,0x00000006,0x0000037b, | 112 | 0x00000006,0x0000037e,0x00000038,0x0004002b, |
| 112 | 0x00000038,0x0004002b,0x00000006,0x0000037d, | 113 | 0x00000006,0x00000380,0xffffffff,0x0004002b, |
| 113 | 0xffffffff,0x0004002b,0x00000006,0x00000385, | 114 | 0x00000006,0x00000388,0x0000003c,0x0004002b, |
| 114 | 0x0000003c,0x0004002b,0x00000006,0x00000387, | 115 | 0x00000006,0x0000038a,0x00000009,0x00040017, |
| 115 | 0x00000009,0x00040017,0x00000392,0x0000002f, | 116 | 0x00000395,0x0000002f,0x00000003,0x0004001c, |
| 116 | 0x00000003,0x0004001c,0x000003d6,0x00000027, | 117 | 0x000003d9,0x00000027,0x00000118,0x00040020, |
| 117 | 0x00000115,0x00040020,0x000003d7,0x00000007, | 118 | 0x000003da,0x00000007,0x000003d9,0x0004002b, |
| 118 | 0x000003d6,0x0004002b,0x00000006,0x00000460, | 119 | 0x00000006,0x00000463,0x0000001c,0x0004002b, |
| 119 | 0x0000001c,0x0004002b,0x00000006,0x00000466, | 120 | 0x00000006,0x00000469,0x00000020,0x0004002b, |
| 120 | 0x00000020,0x0004002b,0x000000d6,0x0000047b, | 121 | 0x000000d9,0x0000047e,0x00000018,0x0004002b, |
| 121 | 0x00000018,0x0004002b,0x000000d6,0x000004d5, | 122 | 0x000000d9,0x000004d8,0x00000007,0x0004002b, |
| 122 | 0x00000007,0x0004002b,0x00000027,0x000004f9, | 123 | 0x00000027,0x000004fc,0x3f800000,0x0004002b, |
| 123 | 0x3f800000,0x0004002b,0x00000006,0x0000052e, | 124 | 0x00000006,0x00000531,0x3fffffff,0x00040018, |
| 124 | 0x3fffffff,0x00040018,0x00000548,0x0000004b, | 125 | 0x0000054b,0x0000004b,0x00000003,0x00040020, |
| 125 | 0x00000003,0x00040020,0x00000549,0x00000007, | 126 | 0x0000054c,0x00000007,0x0000054b,0x0006002c, |
| 126 | 0x00000548,0x0006002c,0x0000004b,0x0000056d, | 127 | 0x0000004b,0x00000570,0x0000026d,0x0000026d, |
| 127 | 0x0000026a,0x0000026a,0x0000026a,0x0006002c, | 128 | 0x0000026d,0x0006002c,0x0000054b,0x00000571, |
| 128 | 0x00000548,0x0000056e,0x0000056d,0x0000056d, | 129 | 0x00000570,0x00000570,0x00000570,0x0004002b, |
| 129 | 0x0000056d,0x0004002b,0x00000006,0x00000594, | 130 | 0x00000006,0x00000597,0x00000044,0x0004002b, |
| 130 | 0x00000044,0x0004002b,0x00000006,0x000005a3, | 131 | 0x00000006,0x000005a6,0x00000048,0x0004002b, |
| 131 | 0x00000048,0x0004002b,0x00000006,0x000005b2, | 132 | 0x00000006,0x000005b5,0x0000004c,0x0004002b, |
| 132 | 0x0000004c,0x0004002b,0x00000006,0x000005c3, | 133 | 0x00000006,0x000005c6,0x00000070,0x0004002b, |
| 133 | 0x00000070,0x0004002b,0x00000006,0x000005cd, | 134 | 0x00000006,0x000005d0,0x00000074,0x0004002b, |
| 134 | 0x00000074,0x0004002b,0x00000006,0x000005d6, | 135 | 0x00000006,0x000005d9,0x00000078,0x0004002b, |
| 135 | 0x00000078,0x0004002b,0x00000006,0x000005df, | 136 | 0x00000006,0x000005e2,0x0000007c,0x0004002b, |
| 136 | 0x0000007c,0x0004002b,0x00000006,0x000005fb, | 137 | 0x00000006,0x000005fe,0x000003ff,0x0004002b, |
| 137 | 0x000003ff,0x0004002b,0x00000006,0x00000602, | 138 | 0x00000006,0x00000605,0x030000ff,0x0004002b, |
| 138 | 0x030000ff,0x0004002b,0x00000006,0x00000608, | 139 | 0x00000006,0x0000060b,0x0300f00f,0x0004002b, |
| 139 | 0x0300f00f,0x0004002b,0x00000006,0x0000060e, | 140 | 0x00000006,0x00000611,0x030c30c3,0x0004002b, |
| 140 | 0x030c30c3,0x0004002b,0x00000006,0x00000614, | 141 | 0x00000006,0x00000617,0x09249249,0x0004002b, |
| 141 | 0x09249249,0x0004002b,0x00000027,0x00000657, | 142 | 0x00000027,0x0000065a,0x0da24260,0x0006002c, |
| 142 | 0x0da24260,0x0006002c,0x0000004b,0x00000658, | 143 | 0x0000004b,0x0000065b,0x0000065a,0x0000065a, |
| 143 | 0x00000657,0x00000657,0x00000657,0x00040017, | 144 | 0x0000065a,0x00040017,0x0000065d,0x00000006, |
| 144 | 0x0000065a,0x00000006,0x00000003,0x0004002b, | 145 | 0x00000003,0x0004002b,0x00000027,0x0000066b, |
| 145 | 0x00000027,0x00000668,0x447fc000,0x0004002b, | 146 | 0x447fc000,0x0004002b,0x00000006,0x000006ac, |
| 146 | 0x00000006,0x000006ca,0x0000000f,0x0004001c, | 147 | 0x00000400,0x0004001c,0x000006ad,0x00000006, |
| 147 | 0x000006d2,0x00000006,0x0000011c,0x00040020, | 148 | 0x000006ac,0x00040020,0x000006ae,0x00000004, |
| 148 | 0x000006d3,0x00000004,0x000006d2,0x0004003b, | 149 | 0x000006ad,0x0004003b,0x000006ae,0x000006af, |
| 149 | 0x000006d3,0x000006d4,0x00000004,0x00040020, | 150 | 0x00000004,0x00040020,0x000006c2,0x00000004, |
| 150 | 0x000006d6,0x00000004,0x00000006,0x0004002b, | 151 | 0x00000006,0x0004003b,0x000006ae,0x000006c4, |
| 151 | 0x00000006,0x000006d8,0x00000108,0x0004002b, | 152 | 0x00000004,0x0004002b,0x00000006,0x000006da, |
| 152 | 0x00000006,0x00000717,0x0000003f,0x0004001c, | 153 | 0x00000108,0x0004002b,0x00000006,0x00000799, |
| 153 | 0x0000073e,0x00000006,0x00000104,0x00040020, | 154 | 0x0000000f,0x0004001c,0x000007a1,0x00000006, |
| 154 | 0x0000073f,0x00000004,0x0000073e,0x0004003b, | 155 | 0x0000011f,0x00040020,0x000007a2,0x00000004, |
| 155 | 0x0000073f,0x00000740,0x00000004,0x0004003b, | 156 | 0x000007a1,0x0004003b,0x000007a2,0x000007a3, |
| 156 | 0x000006d3,0x00000789,0x00000004,0x0004001c, | 157 | 0x00000004,0x0004002b,0x00000006,0x000007e4, |
| 157 | 0x000007e0,0x0000073e,0x0000011c,0x00040020, | 158 | 0x0000003f,0x0004001c,0x0000080b,0x00000006, |
| 158 | 0x000007e1,0x00000004,0x000007e0,0x0004003b, | 159 | 0x00000107,0x00040020,0x0000080c,0x00000004, |
| 159 | 0x000007e1,0x000007e2,0x00000004,0x00040020, | 160 | 0x0000080b,0x0004003b,0x0000080c,0x0000080d, |
| 160 | 0x000007fe,0x00000007,0x000006d2,0x0004002b, | 161 | 0x00000004,0x0004003b,0x000007a2,0x00000856, |
| 161 | 0x000000d6,0x00000850,0x0000003f,0x0004002b, | 162 | 0x00000004,0x0004001c,0x000008ad,0x0000080b, |
| 162 | 0x000000d6,0x000008bc,0x0000000d,0x0004002b, | 163 | 0x0000011f,0x00040020,0x000008ae,0x00000004, |
| 163 | 0x000000d6,0x000008c7,0x00000011,0x0004002b, | 164 | 0x000008ad,0x0004003b,0x000008ae,0x000008af, |
| 164 | 0x000000d6,0x0000096f,0x00000012,0x00040020, | 165 | 0x00000004,0x00040020,0x000008cb,0x00000007, |
| 165 | 0x000009e5,0x00000001,0x0000065a,0x0004003b, | 166 | 0x000007a1,0x0004002b,0x000000d9,0x0000091d, |
| 166 | 0x000009e5,0x000009e6,0x00000001,0x00040020, | 167 | 0x0000003f,0x0004002b,0x00000006,0x00000967, |
| 167 | 0x000009e7,0x00000001,0x00000006,0x0004002b, | 168 | 0x00000007,0x0004002b,0x000000d9,0x0000096c, |
| 168 | 0x00000006,0x000009ec,0x00000007,0x0004003b, | 169 | 0x0000000d,0x0004002b,0x000000d9,0x000009ef, |
| 169 | 0x000009e5,0x000009f0,0x00000001,0x0004003b, | 170 | 0x00000011,0x0004002b,0x000000d9,0x00000a97, |
| 170 | 0x000009e5,0x000009f1,0x00000001,0x0006002c, | 171 | 0x00000012,0x00040020,0x00000b0d,0x00000001, |
| 171 | 0x0000065a,0x00000a6c,0x00000104,0x000000ad, | 172 | 0x0000065d,0x0004003b,0x00000b0d,0x00000b0e, |
| 172 | 0x000000ad,0x0006002c,0x0000004b,0x00002b61, | 173 | 0x00000001,0x00040020,0x00000b0f,0x00000001, |
| 173 | 0x000004f9,0x000004f9,0x000004f9,0x0004002b, | 174 | 0x00000006,0x0004003b,0x00000b0d,0x00000b17, |
| 174 | 0x00000027,0x00002b63,0x7f800000,0x0006002c, | 175 | 0x00000001,0x0004003b,0x00000b0d,0x00000b18, |
| 175 | 0x0000004b,0x00002b64,0x00002b63,0x00002b63, | 176 | 0x00000001,0x0004002b,0x00000006,0x00000b3a, |
| 176 | 0x00002b63,0x0004002b,0x00000027,0x00002b65, | 177 | 0x0000000a,0x0004002b,0x00000006,0x00000b57, |
| 177 | 0xff800000,0x0006002c,0x0000004b,0x00002b66, | 178 | 0x0000000d,0x0004002b,0x00000006,0x00000b94, |
| 178 | 0x00002b65,0x00002b65,0x00002b65,0x0004002b, | 179 | 0x0000000b,0x0006002c,0x0000065d,0x00000bf1, |
| 179 | 0x00000006,0x00002b67,0x000007ff,0x00050036, | 180 | 0x00000107,0x000000b0,0x000000b0,0x0006002c, |
| 180 | 0x00000002,0x00000004,0x00000000,0x00000003, | 181 | 0x0000004b,0x000032a2,0x000004fc,0x000004fc, |
| 181 | 0x000200f8,0x00000005,0x0004003b,0x000003d7, | 182 | 0x000004fc,0x0004002b,0x00000027,0x000032a4, |
| 182 | 0x00001884,0x00000007,0x0004003b,0x00000549, | 183 | 0x7f800000,0x0006002c,0x0000004b,0x000032a5, |
| 183 | 0x000018c5,0x00000007,0x0004003b,0x0000004c, | 184 | 0x000032a4,0x000032a4,0x000032a4,0x0004002b, |
| 184 | 0x000018c8,0x00000007,0x0004003b,0x0000004c, | 185 | 0x00000027,0x000032a6,0xff800000,0x0006002c, |
| 185 | 0x00001424,0x00000007,0x0004003b,0x000002f4, | 186 | 0x0000004b,0x000032a7,0x000032a6,0x000032a6, |
| 186 | 0x00001239,0x00000007,0x0004003b,0x000007fe, | 187 | 0x000032a6,0x0004002b,0x00000006,0x000032a8, |
| 187 | 0x00000c2a,0x00000007,0x000300f7,0x00000a6e, | 188 | 0x000000ff,0x00050036,0x00000002,0x00000004, |
| 188 | 0x00000000,0x000300fb,0x000000a3,0x00000a6f, | 189 | 0x00000000,0x00000003,0x000200f8,0x00000005, |
| 189 | 0x000200f8,0x00000a6f,0x00050041,0x000009e7, | 190 | 0x0004003b,0x000003da,0x00001c65,0x00000007, |
| 190 | 0x000009e8,0x000009e6,0x000000a3,0x0004003d, | 191 | 0x0004003b,0x0000054c,0x00001ca6,0x00000007, |
| 191 | 0x00000006,0x000009e9,0x000009e8,0x00050041, | 192 | 0x0004003b,0x0000004c,0x00001ca9,0x00000007, |
| 192 | 0x000000fb,0x000009ea,0x000000f9,0x00000230, | 193 | 0x0004003b,0x0000004c,0x00001805,0x00000007, |
| 193 | 0x0004003d,0x00000006,0x000009eb,0x000009ea, | 194 | 0x0004003b,0x000002f7,0x0000161a,0x00000007, |
| 194 | 0x000500aa,0x0000002f,0x000009ed,0x000009eb, | 195 | 0x0004003b,0x000008cb,0x00000daf,0x00000007, |
| 195 | 0x000009ec,0x000300f7,0x000009ef,0x00000000, | 196 | 0x000300f7,0x00000bf3,0x00000000,0x000300fb, |
| 196 | 0x000400fa,0x000009ed,0x000009ee,0x000009ef, | 197 | 0x000000a6,0x00000bf4,0x000200f8,0x00000bf4, |
| 197 | 0x000200f8,0x000009ee,0x00050041,0x000009e7, | 198 | 0x00050041,0x00000b0f,0x00000b10,0x00000b0e, |
| 198 | 0x000009f3,0x000009f0,0x000000a3,0x0004003d, | 199 | 0x000000a6,0x0004003d,0x00000006,0x00000b11, |
| 199 | 0x00000006,0x000009f4,0x000009f3,0x00050041, | 200 | 0x00000b10,0x00050041,0x000000fe,0x00000b12, |
| 200 | 0x000009e7,0x000009f6,0x000009f1,0x000000a3, | 201 | 0x000000fc,0x00000233,0x0004003d,0x00000006, |
| 201 | 0x0004003d,0x00000006,0x000009f7,0x000009f6, | 202 | 0x00000b13,0x00000b12,0x000500aa,0x0000002f, |
| 202 | 0x000500b0,0x0000002f,0x00000a8b,0x000009f7, | 203 | 0x00000b14,0x00000b13,0x00000967,0x000300f7, |
| 203 | 0x0000011c,0x000300f7,0x00000a8f,0x00000000, | 204 | 0x00000b16,0x00000000,0x000400fa,0x00000b14, |
| 204 | 0x000400fa,0x00000a8b,0x00000a8c,0x00000a8f, | 205 | 0x00000b15,0x00000b16,0x000200f8,0x00000b15, |
| 205 | 0x000200f8,0x00000a8c,0x00050041,0x000006d6, | 206 | 0x00050041,0x00000b0f,0x00000b1a,0x00000b17, |
| 206 | 0x00000a8e,0x000006d4,0x000009f7,0x0003003e, | 207 | 0x000000a6,0x0004003d,0x00000006,0x00000b1b, |
| 207 | 0x00000a8e,0x000000a3,0x000200f9,0x00000a8f, | 208 | 0x00000b1a,0x00050041,0x00000b0f,0x00000b1d, |
| 208 | 0x000200f8,0x00000a8f,0x000400e0,0x0000016d, | 209 | 0x00000b18,0x000000a6,0x0004003d,0x00000006, |
| 209 | 0x0000016d,0x000006d8,0x00050084,0x00000006, | 210 | 0x00000b1e,0x00000b1d,0x000500b0,0x0000002f, |
| 210 | 0x00000a91,0x000009f4,0x000000fe,0x00050080, | 211 | 0x00000c10,0x00000b1e,0x0000011f,0x000300f7, |
| 211 | 0x00000006,0x00000a93,0x00000a91,0x000000fe, | 212 | 0x00000c14,0x00000000,0x000400fa,0x00000c10, |
| 212 | 0x00050041,0x000000fb,0x00000a94,0x000000f9, | 213 | 0x00000c11,0x00000c14,0x000200f8,0x00000c11, |
| 213 | 0x000000fa,0x0004003d,0x00000006,0x00000a95, | 214 | 0x00050041,0x000006c2,0x00000c13,0x000007a3, |
| 214 | 0x00000a94,0x0007000c,0x00000006,0x00000a96, | 215 | 0x00000b1e,0x0003003e,0x00000c13,0x000000a6, |
| 215 | 0x00000001,0x00000026,0x00000a93,0x00000a95, | 216 | 0x000200f9,0x00000c14,0x000200f8,0x00000c14, |
| 216 | 0x00050080,0x00000006,0x00000a99,0x00000a91, | 217 | 0x000400e0,0x00000170,0x00000170,0x000006da, |
| 217 | 0x000009f7,0x000200f9,0x00000a9a,0x000200f8, | 218 | 0x00050084,0x00000006,0x00000c16,0x00000b1b, |
| 218 | 0x00000a9a,0x000700f5,0x00000006,0x00002b52, | 219 | 0x00000101,0x00050080,0x00000006,0x00000c18, |
| 219 | 0x00000a99,0x00000a8f,0x00000aac,0x00000aaa, | 220 | 0x00000c16,0x00000101,0x00050041,0x000000fe, |
| 220 | 0x000500b0,0x0000002f,0x00000a9e,0x00002b52, | 221 | 0x00000c19,0x000000fc,0x000000fd,0x0004003d, |
| 221 | 0x00000a96,0x000400f6,0x00000aad,0x00000aaa, | 222 | 0x00000006,0x00000c1a,0x00000c19,0x0007000c, |
| 222 | 0x00000000,0x000400fa,0x00000a9e,0x00000a9f, | 223 | 0x00000006,0x00000c1b,0x00000001,0x00000026, |
| 223 | 0x00000aad,0x000200f8,0x00000a9f,0x00050041, | 224 | 0x00000c18,0x00000c1a,0x00050080,0x00000006, |
| 224 | 0x000000fb,0x00000ac3,0x000000f9,0x00000305, | 225 | 0x00000c1e,0x00000c16,0x00000b1e,0x000200f9, |
| 225 | 0x0004003d,0x00000006,0x00000ac4,0x00000ac3, | 226 | 0x00000c1f,0x000200f8,0x00000c1f,0x000700f5, |
| 226 | 0x000500c7,0x00000006,0x00000ac5,0x00000ac4, | 227 | 0x00000006,0x00003283,0x00000c1e,0x00000c14, |
| 227 | 0x000000ad,0x000500aa,0x0000002f,0x00000ac6, | 228 | 0x00000c31,0x00000c2f,0x000500b0,0x0000002f, |
| 228 | 0x00000ac5,0x000000a3,0x000300f7,0x00000acb, | 229 | 0x00000c23,0x00003283,0x00000c1b,0x000400f6, |
| 229 | 0x00000000,0x000400fa,0x00000ac6,0x00000ac7, | 230 | 0x00000c32,0x00000c2f,0x00000000,0x000400fa, |
| 230 | 0x00000ac9,0x000200f8,0x00000ac7,0x000200f9, | 231 | 0x00000c23,0x00000c24,0x00000c32,0x000200f8, |
| 231 | 0x00000acb,0x000200f8,0x00000ac9,0x00050084, | 232 | 0x00000c24,0x00050041,0x000000fe,0x00000c48, |
| 232 | 0x00000006,0x00000ad3,0x0000010e,0x00000a95, | 233 | 0x000000fc,0x00000308,0x0004003d,0x00000006, |
| 233 | 0x00050080,0x00000006,0x00000ad4,0x00000104, | 234 | 0x00000c49,0x00000c48,0x000500c7,0x00000006, |
| 234 | 0x00000ad3,0x000200f9,0x00000acb,0x000200f8, | 235 | 0x00000c4a,0x00000c49,0x000000b0,0x000500aa, |
| 235 | 0x00000acb,0x000700f5,0x00000006,0x00002b53, | 236 | 0x0000002f,0x00000c4b,0x00000c4a,0x000000a6, |
| 236 | 0x00000104,0x00000ac7,0x00000ad4,0x00000ac9, | 237 | 0x000300f7,0x00000c50,0x00000000,0x000400fa, |
| 237 | 0x00050084,0x00000006,0x00000aa2,0x00000107, | 238 | 0x00000c4b,0x00000c4c,0x00000c4e,0x000200f8, |
| 238 | 0x00002b52,0x00050080,0x00000006,0x00000aa3, | 239 | 0x00000c4c,0x000200f9,0x00000c50,0x000200f8, |
| 239 | 0x00002b53,0x00000aa2,0x00050041,0x00000153, | 240 | 0x00000c4e,0x00050084,0x00000006,0x00000c58, |
| 240 | 0x00000aa4,0x000000f9,0x00000151,0x0004003d, | 241 | 0x00000111,0x00000c1a,0x00050080,0x00000006, |
| 241 | 0x00000007,0x00000aa5,0x00000aa4,0x00050051, | 242 | 0x00000c59,0x00000107,0x00000c58,0x000200f9, |
| 242 | 0x00000006,0x00000aeb,0x00000aa5,0x00000000, | 243 | 0x00000c50,0x000200f8,0x00000c50,0x000700f5, |
| 243 | 0x00050095,0x000000a8,0x00000aed,0x00000aeb, | 244 | 0x00000006,0x00003284,0x00000107,0x00000c4c, |
| 244 | 0x00000aa3,0x00050051,0x00000006,0x00000aee, | 245 | 0x00000c59,0x00000c4e,0x00050084,0x00000006, |
| 245 | 0x00000aed,0x00000001,0x00050051,0x00000006, | 246 | 0x00000c27,0x0000010a,0x00003283,0x00050080, |
| 246 | 0x00000aef,0x00000aed,0x00000000,0x00050051, | 247 | 0x00000006,0x00000c28,0x00003284,0x00000c27, |
| 247 | 0x00000006,0x00000af2,0x00000aa5,0x00000001, | 248 | 0x00050041,0x00000156,0x00000c29,0x000000fc, |
| 248 | 0x00050080,0x00000006,0x00000af4,0x00000af2, | 249 | 0x00000154,0x0004003d,0x00000007,0x00000c2a, |
| 249 | 0x00000aee,0x00050050,0x00000007,0x00000af5, | 250 | 0x00000c29,0x00050051,0x00000006,0x00000c70, |
| 250 | 0x00000aef,0x00000af4,0x0004007c,0x00000014, | 251 | 0x00000c2a,0x00000000,0x00050095,0x000000ab, |
| 251 | 0x00000ae5,0x00000af5,0x00060041,0x000000d8, | 252 | 0x00000c72,0x00000c70,0x00000c28,0x00050051, |
| 252 | 0x00000adc,0x00000ae5,0x000000d7,0x000000d7, | 253 | 0x00000006,0x00000c73,0x00000c72,0x00000001, |
| 253 | 0x0006003d,0x00000006,0x00000add,0x00000adc, | 254 | 0x00050051,0x00000006,0x00000c74,0x00000c72, |
| 255 | 0x00000000,0x00050051,0x00000006,0x00000c77, | ||
| 256 | 0x00000c2a,0x00000001,0x00050080,0x00000006, | ||
| 257 | 0x00000c79,0x00000c77,0x00000c73,0x00050050, | ||
| 258 | 0x00000007,0x00000c7a,0x00000c74,0x00000c79, | ||
| 259 | 0x0004007c,0x00000014,0x00000c6a,0x00000c7a, | ||
| 260 | 0x00060041,0x000000db,0x00000c61,0x00000c6a, | ||
| 261 | 0x000000da,0x000000da,0x0006003d,0x00000006, | ||
| 262 | 0x00000c62,0x00000c61,0x00000002,0x00000004, | ||
| 263 | 0x00050084,0x00000006,0x00000c80,0x0000010a, | ||
| 264 | 0x00000c49,0x000500c2,0x00000006,0x00000c81, | ||
| 265 | 0x00000c62,0x00000c80,0x000500c7,0x00000006, | ||
| 266 | 0x00000c82,0x00000c81,0x00000799,0x00050041, | ||
| 267 | 0x000006c2,0x00000c2d,0x000007a3,0x00000c82, | ||
| 268 | 0x000700ea,0x00000006,0x00000c2e,0x00000c2d, | ||
| 269 | 0x000000b0,0x000000a6,0x000000b0,0x000200f9, | ||
| 270 | 0x00000c2f,0x000200f8,0x00000c2f,0x00050080, | ||
| 271 | 0x00000006,0x00000c31,0x00003283,0x00000107, | ||
| 272 | 0x000200f9,0x00000c1f,0x000200f8,0x00000c32, | ||
| 273 | 0x000400e0,0x00000170,0x00000170,0x000006da, | ||
| 274 | 0x000300f7,0x00000c44,0x00000000,0x000400fa, | ||
| 275 | 0x00000c10,0x00000c35,0x00000c44,0x000200f8, | ||
| 276 | 0x00000c35,0x00050084,0x00000006,0x00000c87, | ||
| 277 | 0x0000011f,0x00000c1a,0x00050080,0x00000006, | ||
| 278 | 0x00000c88,0x00000107,0x00000c87,0x00050080, | ||
| 279 | 0x00000006,0x00000c8e,0x00000c1a,0x000032a8, | ||
| 280 | 0x00050086,0x00000006,0x00000c8f,0x00000c8e, | ||
| 281 | 0x00000101,0x00050084,0x00000006,0x00000c39, | ||
| 282 | 0x00000b1e,0x00000c8f,0x00050080,0x00000006, | ||
| 283 | 0x00000c3b,0x00000c39,0x00000b1b,0x00050084, | ||
| 284 | 0x00000006,0x00000c3c,0x0000010a,0x00000c3b, | ||
| 285 | 0x00050080,0x00000006,0x00000c3d,0x00000c88, | ||
| 286 | 0x00000c3c,0x00050041,0x00000156,0x00000c3f, | ||
| 287 | 0x000000fc,0x00000154,0x0004003d,0x00000007, | ||
| 288 | 0x00000c40,0x00000c3f,0x00050041,0x000006c2, | ||
| 289 | 0x00000c41,0x000007a3,0x00000b1e,0x0004003d, | ||
| 290 | 0x00000006,0x00000c42,0x00000c41,0x00050051, | ||
| 291 | 0x00000006,0x00000ca5,0x00000c40,0x00000000, | ||
| 292 | 0x00050095,0x000000ab,0x00000ca7,0x00000ca5, | ||
| 293 | 0x00000c3d,0x00050051,0x00000006,0x00000ca8, | ||
| 294 | 0x00000ca7,0x00000001,0x00050051,0x00000006, | ||
| 295 | 0x00000ca9,0x00000ca7,0x00000000,0x00050051, | ||
| 296 | 0x00000006,0x00000cac,0x00000c40,0x00000001, | ||
| 297 | 0x00050080,0x00000006,0x00000cae,0x00000cac, | ||
| 298 | 0x00000ca8,0x00050050,0x00000007,0x00000caf, | ||
| 299 | 0x00000ca9,0x00000cae,0x0004007c,0x00000014, | ||
| 300 | 0x00000c9f,0x00000caf,0x00060041,0x000000db, | ||
| 301 | 0x00000c97,0x00000c9f,0x000000da,0x000000da, | ||
| 302 | 0x0005003e,0x00000c97,0x00000c42,0x00000002, | ||
| 303 | 0x00000004,0x000200f9,0x00000c44,0x000200f8, | ||
| 304 | 0x00000c44,0x000200f9,0x00000bf3,0x000200f8, | ||
| 305 | 0x00000b16,0x000500aa,0x0000002f,0x00000b23, | ||
| 306 | 0x00000b13,0x00000111,0x000300f7,0x00000b25, | ||
| 307 | 0x00000000,0x000400fa,0x00000b23,0x00000b24, | ||
| 308 | 0x00000b25,0x000200f8,0x00000b24,0x00050041, | ||
| 309 | 0x00000b0f,0x00000b27,0x00000b18,0x000000a6, | ||
| 310 | 0x0004003d,0x00000006,0x00000b28,0x00000b27, | ||
| 311 | 0x00050041,0x000000fe,0x00000d22,0x000000fc, | ||
| 312 | 0x000000fd,0x0004003d,0x00000006,0x00000d23, | ||
| 313 | 0x00000d22,0x00050080,0x00000006,0x00000d25, | ||
| 314 | 0x00000d23,0x000032a8,0x00050086,0x00000006, | ||
| 315 | 0x00000d26,0x00000d25,0x00000101,0x00050084, | ||
| 316 | 0x00000006,0x00000cc5,0x0000011f,0x00000d26, | ||
| 317 | 0x00050080,0x00000006,0x00000cc7,0x00000cc5, | ||
| 318 | 0x000007e4,0x00050086,0x00000006,0x00000cc8, | ||
| 319 | 0x00000cc7,0x00000107,0x00050084,0x00000006, | ||
| 320 | 0x00000ccb,0x00000b28,0x00000cc8,0x0007000c, | ||
| 321 | 0x00000006,0x00000ccd,0x00000001,0x00000026, | ||
| 322 | 0x00000ccb,0x00000cc5,0x00050080,0x00000006, | ||
| 323 | 0x00000cd0,0x00000ccd,0x00000cc8,0x0007000c, | ||
| 324 | 0x00000006,0x00000cd2,0x00000001,0x00000026, | ||
| 325 | 0x00000cd0,0x00000cc5,0x000200f9,0x00000cd4, | ||
| 326 | 0x000200f8,0x00000cd4,0x000700f5,0x00000006, | ||
| 327 | 0x0000327e,0x000000a6,0x00000b24,0x00000ce2, | ||
| 328 | 0x00000cd9,0x000700f5,0x00000006,0x0000327d, | ||
| 329 | 0x00000ccd,0x00000b24,0x00000ce5,0x00000cd9, | ||
| 330 | 0x000500b0,0x0000002f,0x00000cd8,0x0000327d, | ||
| 331 | 0x00000cd2,0x000400f6,0x00000ce6,0x00000cd9, | ||
| 332 | 0x00000000,0x000400fa,0x00000cd8,0x00000cd9, | ||
| 333 | 0x00000ce6,0x000200f8,0x00000cd9,0x00050084, | ||
| 334 | 0x00000006,0x00000d2b,0x0000011f,0x00000d23, | ||
| 335 | 0x00050080,0x00000006,0x00000d2c,0x00000107, | ||
| 336 | 0x00000d2b,0x00050084,0x00000006,0x00000cdc, | ||
| 337 | 0x0000010a,0x0000327d,0x00050080,0x00000006, | ||
| 338 | 0x00000cdd,0x00000d2c,0x00000cdc,0x00050041, | ||
| 339 | 0x00000156,0x00000cde,0x000000fc,0x00000154, | ||
| 340 | 0x0004003d,0x00000007,0x00000cdf,0x00000cde, | ||
| 341 | 0x00050051,0x00000006,0x00000d43,0x00000cdf, | ||
| 342 | 0x00000000,0x00050095,0x000000ab,0x00000d45, | ||
| 343 | 0x00000d43,0x00000cdd,0x00050051,0x00000006, | ||
| 344 | 0x00000d46,0x00000d45,0x00000001,0x00050051, | ||
| 345 | 0x00000006,0x00000d47,0x00000d45,0x00000000, | ||
| 346 | 0x00050051,0x00000006,0x00000d4a,0x00000cdf, | ||
| 347 | 0x00000001,0x00050080,0x00000006,0x00000d4c, | ||
| 348 | 0x00000d4a,0x00000d46,0x00050050,0x00000007, | ||
| 349 | 0x00000d4d,0x00000d47,0x00000d4c,0x0004007c, | ||
| 350 | 0x00000014,0x00000d3d,0x00000d4d,0x00060041, | ||
| 351 | 0x000000db,0x00000d34,0x00000d3d,0x000000da, | ||
| 352 | 0x000000da,0x0006003d,0x00000006,0x00000d35, | ||
| 353 | 0x00000d34,0x00000002,0x00000004,0x00050080, | ||
| 354 | 0x00000006,0x00000ce2,0x0000327e,0x00000d35, | ||
| 355 | 0x00050080,0x00000006,0x00000ce5,0x0000327d, | ||
| 356 | 0x00000154,0x000200f9,0x00000cd4,0x000200f8, | ||
| 357 | 0x00000ce6,0x00050041,0x000006c2,0x00000ce9, | ||
| 358 | 0x0000080d,0x00000b28,0x0003003e,0x00000ce9, | ||
| 359 | 0x0000327e,0x000400e0,0x00000170,0x00000170, | ||
| 360 | 0x000006da,0x000500aa,0x0000002f,0x00000ceb, | ||
| 361 | 0x00000b28,0x000000a6,0x000300f7,0x00000cff, | ||
| 362 | 0x00000000,0x000400fa,0x00000ceb,0x00000cec, | ||
| 363 | 0x00000cff,0x000200f8,0x00000cec,0x000200f9, | ||
| 364 | 0x00000ced,0x000200f8,0x00000ced,0x000700f5, | ||
| 365 | 0x00000006,0x00003282,0x000000a6,0x00000cec, | ||
| 366 | 0x00000cfa,0x00000cf1,0x000700f5,0x00000006, | ||
| 367 | 0x0000327f,0x000000a6,0x00000cec,0x00000cfd, | ||
| 368 | 0x00000cf1,0x000500b0,0x0000002f,0x00000cf0, | ||
| 369 | 0x0000327f,0x00000107,0x000400f6,0x00000cfe, | ||
| 370 | 0x00000cf1,0x00000000,0x000400fa,0x00000cf0, | ||
| 371 | 0x00000cf1,0x00000cfe,0x000200f8,0x00000cf1, | ||
| 372 | 0x00050041,0x000006c2,0x00000cf3,0x0000080d, | ||
| 373 | 0x0000327f,0x0004003d,0x00000006,0x00000cf4, | ||
| 374 | 0x00000cf3,0x0003003e,0x00000cf3,0x00003282, | ||
| 375 | 0x00050080,0x00000006,0x00000cfa,0x00003282, | ||
| 376 | 0x00000cf4,0x00050080,0x00000006,0x00000cfd, | ||
| 377 | 0x0000327f,0x00000154,0x000200f9,0x00000ced, | ||
| 378 | 0x000200f8,0x00000cfe,0x000200f9,0x00000cff, | ||
| 379 | 0x000200f8,0x00000cff,0x000400e0,0x00000170, | ||
| 380 | 0x00000170,0x000006da,0x0004003d,0x00000006, | ||
| 381 | 0x00000d02,0x00000ce9,0x000200f9,0x00000d04, | ||
| 382 | 0x000200f8,0x00000d04,0x000700f5,0x00000006, | ||
| 383 | 0x00003281,0x00000d02,0x00000cff,0x00000d1b, | ||
| 384 | 0x00000d09,0x000700f5,0x00000006,0x00003280, | ||
| 385 | 0x00000ccd,0x00000cff,0x00000d1e,0x00000d09, | ||
| 386 | 0x000500b0,0x0000002f,0x00000d08,0x00003280, | ||
| 387 | 0x00000cd2,0x000400f6,0x00000d1f,0x00000d09, | ||
| 388 | 0x00000000,0x000400fa,0x00000d08,0x00000d09, | ||
| 389 | 0x00000d1f,0x000200f8,0x00000d09,0x00050084, | ||
| 390 | 0x00000006,0x00000d52,0x0000011f,0x00000d23, | ||
| 391 | 0x00050080,0x00000006,0x00000d53,0x00000107, | ||
| 392 | 0x00000d52,0x00050084,0x00000006,0x00000d0c, | ||
| 393 | 0x0000010a,0x00003280,0x00050080,0x00000006, | ||
| 394 | 0x00000d0d,0x00000d53,0x00000d0c,0x00050041, | ||
| 395 | 0x00000156,0x00000d0e,0x000000fc,0x00000154, | ||
| 396 | 0x0004003d,0x00000007,0x00000d0f,0x00000d0e, | ||
| 397 | 0x00050051,0x00000006,0x00000d6a,0x00000d0f, | ||
| 398 | 0x00000000,0x00050095,0x000000ab,0x00000d6c, | ||
| 399 | 0x00000d6a,0x00000d0d,0x00050051,0x00000006, | ||
| 400 | 0x00000d6d,0x00000d6c,0x00000001,0x00050051, | ||
| 401 | 0x00000006,0x00000d6e,0x00000d6c,0x00000000, | ||
| 402 | 0x00050051,0x00000006,0x00000d71,0x00000d0f, | ||
| 403 | 0x00000001,0x00050080,0x00000006,0x00000d73, | ||
| 404 | 0x00000d71,0x00000d6d,0x00050050,0x00000007, | ||
| 405 | 0x00000d74,0x00000d6e,0x00000d73,0x0004007c, | ||
| 406 | 0x00000014,0x00000d64,0x00000d74,0x00060041, | ||
| 407 | 0x000000db,0x00000d5b,0x00000d64,0x000000da, | ||
| 408 | 0x000000da,0x0006003d,0x00000006,0x00000d5c, | ||
| 409 | 0x00000d5b,0x00000002,0x00000004,0x0005003e, | ||
| 410 | 0x00000d5b,0x00003281,0x00000002,0x00000004, | ||
| 411 | 0x00050080,0x00000006,0x00000d1b,0x00003281, | ||
| 412 | 0x00000d5c,0x00050080,0x00000006,0x00000d1e, | ||
| 413 | 0x00003280,0x00000154,0x000200f9,0x00000d04, | ||
| 414 | 0x000200f8,0x00000d1f,0x000200f9,0x00000bf3, | ||
| 415 | 0x000200f8,0x00000b25,0x000500aa,0x0000002f, | ||
| 416 | 0x00000b2d,0x00000b13,0x0000038a,0x000300f7, | ||
| 417 | 0x00000b2f,0x00000000,0x000400fa,0x00000b2d, | ||
| 418 | 0x00000b2e,0x00000b2f,0x000200f8,0x00000b2e, | ||
| 419 | 0x00050041,0x00000b0f,0x00000b31,0x00000b17, | ||
| 420 | 0x000000a6,0x0004003d,0x00000006,0x00000b32, | ||
| 421 | 0x00000b31,0x00050041,0x00000b0f,0x00000b34, | ||
| 422 | 0x00000b18,0x000000a6,0x0004003d,0x00000006, | ||
| 423 | 0x00000b35,0x00000b34,0x000500b0,0x0000002f, | ||
| 424 | 0x00000dbb,0x00000b35,0x0000011f,0x000300f7, | ||
| 425 | 0x00000dca,0x00000000,0x000400fa,0x00000dbb, | ||
| 426 | 0x00000dbc,0x00000dca,0x000200f8,0x00000dbc, | ||
| 427 | 0x00050041,0x000000fe,0x00000e6c,0x000000fc, | ||
| 428 | 0x000000fd,0x0004003d,0x00000006,0x00000e6d, | ||
| 429 | 0x00000e6c,0x00050084,0x00000006,0x00000e6e, | ||
| 430 | 0x0000011f,0x00000e6d,0x00050080,0x00000006, | ||
| 431 | 0x00000e6f,0x00000107,0x00000e6e,0x00050080, | ||
| 432 | 0x00000006,0x00000e75,0x00000e6d,0x000032a8, | ||
| 433 | 0x00050086,0x00000006,0x00000e76,0x00000e75, | ||
| 434 | 0x00000101,0x00050084,0x00000006,0x00000dc1, | ||
| 435 | 0x00000b35,0x00000e76,0x00050080,0x00000006, | ||
| 436 | 0x00000dc3,0x00000dc1,0x00000b32,0x00050084, | ||
| 437 | 0x00000006,0x00000dc4,0x0000010a,0x00000dc3, | ||
| 438 | 0x00050080,0x00000006,0x00000dc5,0x00000e6f, | ||
| 439 | 0x00000dc4,0x00050041,0x00000156,0x00000dc6, | ||
| 440 | 0x000000fc,0x00000154,0x0004003d,0x00000007, | ||
| 441 | 0x00000dc7,0x00000dc6,0x00050051,0x00000006, | ||
| 442 | 0x00000e8d,0x00000dc7,0x00000000,0x00050095, | ||
| 443 | 0x000000ab,0x00000e8f,0x00000e8d,0x00000dc5, | ||
| 444 | 0x00050051,0x00000006,0x00000e90,0x00000e8f, | ||
| 445 | 0x00000001,0x00050051,0x00000006,0x00000e91, | ||
| 446 | 0x00000e8f,0x00000000,0x00050051,0x00000006, | ||
| 447 | 0x00000e94,0x00000dc7,0x00000001,0x00050080, | ||
| 448 | 0x00000006,0x00000e96,0x00000e94,0x00000e90, | ||
| 449 | 0x00050050,0x00000007,0x00000e97,0x00000e91, | ||
| 450 | 0x00000e96,0x0004007c,0x00000014,0x00000e87, | ||
| 451 | 0x00000e97,0x00060041,0x000000db,0x00000e7e, | ||
| 452 | 0x00000e87,0x000000da,0x000000da,0x0006003d, | ||
| 453 | 0x00000006,0x00000e7f,0x00000e7e,0x00000002, | ||
| 454 | 0x00000004,0x00050041,0x000006c2,0x00000dc9, | ||
| 455 | 0x00000856,0x00000b35,0x0003003e,0x00000dc9, | ||
| 456 | 0x00000e7f,0x000200f9,0x00000dca,0x000200f8, | ||
| 457 | 0x00000dca,0x00050084,0x00000006,0x00000dcc, | ||
| 458 | 0x00000b32,0x00000101,0x00050080,0x00000006, | ||
| 459 | 0x00000dce,0x00000dcc,0x00000101,0x00050041, | ||
| 460 | 0x000000fe,0x00000dcf,0x000000fc,0x000000fd, | ||
| 461 | 0x0004003d,0x00000006,0x00000dd0,0x00000dcf, | ||
| 462 | 0x0007000c,0x00000006,0x00000dd1,0x00000001, | ||
| 463 | 0x00000026,0x00000dce,0x00000dd0,0x000200f9, | ||
| 464 | 0x00000dd3,0x000200f8,0x00000dd3,0x000700f5, | ||
| 465 | 0x00000006,0x00003264,0x00000dcc,0x00000dca, | ||
| 466 | 0x00000e68,0x00000e66,0x000500b0,0x0000002f, | ||
| 467 | 0x00000dd7,0x00003264,0x00000dd1,0x000400f6, | ||
| 468 | 0x00000e69,0x00000e66,0x00000000,0x000400fa, | ||
| 469 | 0x00000dd7,0x00000dd8,0x00000e69,0x000200f8, | ||
| 470 | 0x00000dd8,0x00050080,0x00000006,0x00000ddb, | ||
| 471 | 0x00003264,0x00000b35,0x000500b0,0x0000002f, | ||
| 472 | 0x00000dde,0x00000ddb,0x00000dd1,0x000300f7, | ||
| 473 | 0x00000de9,0x00000000,0x000400fa,0x00000dde, | ||
| 474 | 0x00000de0,0x00000de8,0x000200f8,0x00000de0, | ||
| 475 | 0x00050041,0x000000fe,0x00000e9b,0x000000fc, | ||
| 476 | 0x00000308,0x0004003d,0x00000006,0x00000e9c, | ||
| 477 | 0x00000e9b,0x000500c7,0x00000006,0x00000e9d, | ||
| 478 | 0x00000e9c,0x000000b0,0x000500aa,0x0000002f, | ||
| 479 | 0x00000e9e,0x00000e9d,0x000000a6,0x000300f7, | ||
| 480 | 0x00000ea3,0x00000000,0x000400fa,0x00000e9e, | ||
| 481 | 0x00000e9f,0x00000ea1,0x000200f8,0x00000e9f, | ||
| 482 | 0x000200f9,0x00000ea3,0x000200f8,0x00000ea1, | ||
| 483 | 0x00050084,0x00000006,0x00000eab,0x00000111, | ||
| 484 | 0x00000dd0,0x00050080,0x00000006,0x00000eac, | ||
| 485 | 0x00000107,0x00000eab,0x000200f9,0x00000ea3, | ||
| 486 | 0x000200f8,0x00000ea3,0x000700f5,0x00000006, | ||
| 487 | 0x00003265,0x00000107,0x00000e9f,0x00000eac, | ||
| 488 | 0x00000ea1,0x00050084,0x00000006,0x00000de3, | ||
| 489 | 0x0000010a,0x00000ddb,0x00050080,0x00000006, | ||
| 490 | 0x00000de4,0x00003265,0x00000de3,0x00050041, | ||
| 491 | 0x00000156,0x00000de5,0x000000fc,0x00000154, | ||
| 492 | 0x0004003d,0x00000007,0x00000de6,0x00000de5, | ||
| 493 | 0x00050051,0x00000006,0x00000ec3,0x00000de6, | ||
| 494 | 0x00000000,0x00050095,0x000000ab,0x00000ec5, | ||
| 495 | 0x00000ec3,0x00000de4,0x00050051,0x00000006, | ||
| 496 | 0x00000ec6,0x00000ec5,0x00000001,0x00050051, | ||
| 497 | 0x00000006,0x00000ec7,0x00000ec5,0x00000000, | ||
| 498 | 0x00050051,0x00000006,0x00000eca,0x00000de6, | ||
| 499 | 0x00000001,0x00050080,0x00000006,0x00000ecc, | ||
| 500 | 0x00000eca,0x00000ec6,0x00050050,0x00000007, | ||
| 501 | 0x00000ecd,0x00000ec7,0x00000ecc,0x0004007c, | ||
| 502 | 0x00000014,0x00000ebd,0x00000ecd,0x00060041, | ||
| 503 | 0x000000db,0x00000eb4,0x00000ebd,0x000000da, | ||
| 504 | 0x000000da,0x0006003d,0x00000006,0x00000eb5, | ||
| 505 | 0x00000eb4,0x00000002,0x00000004,0x000200f9, | ||
| 506 | 0x00000de9,0x000200f8,0x00000de8,0x000200f9, | ||
| 507 | 0x00000de9,0x000200f8,0x00000de9,0x000700f5, | ||
| 508 | 0x00000006,0x00003266,0x00000eb5,0x00000ea3, | ||
| 509 | 0x000000a6,0x00000de8,0x000300f7,0x00000df5, | ||
| 510 | 0x00000000,0x000400fa,0x00000dde,0x00000dec, | ||
| 511 | 0x00000df4,0x000200f8,0x00000dec,0x00050041, | ||
| 512 | 0x000000fe,0x00000ed1,0x000000fc,0x00000308, | ||
| 513 | 0x0004003d,0x00000006,0x00000ed2,0x00000ed1, | ||
| 514 | 0x000500c7,0x00000006,0x00000ed3,0x00000ed2, | ||
| 515 | 0x000000b0,0x000500aa,0x0000002f,0x00000ed4, | ||
| 516 | 0x00000ed3,0x000000a6,0x000300f7,0x00000ed9, | ||
| 517 | 0x00000000,0x000400fa,0x00000ed4,0x00000ed5, | ||
| 518 | 0x00000ed7,0x000200f8,0x00000ed5,0x00050084, | ||
| 519 | 0x00000006,0x00000edf,0x0000010a,0x00000dd0, | ||
| 520 | 0x00050080,0x00000006,0x00000ee0,0x00000107, | ||
| 521 | 0x00000edf,0x000200f9,0x00000ed9,0x000200f8, | ||
| 522 | 0x00000ed7,0x00050084,0x00000006,0x00000ee5, | ||
| 523 | 0x00000118,0x00000dd0,0x00050080,0x00000006, | ||
| 524 | 0x00000ee6,0x00000107,0x00000ee5,0x000200f9, | ||
| 525 | 0x00000ed9,0x000200f8,0x00000ed9,0x000700f5, | ||
| 526 | 0x00000006,0x00003267,0x00000ee0,0x00000ed5, | ||
| 527 | 0x00000ee6,0x00000ed7,0x00050084,0x00000006, | ||
| 528 | 0x00000def,0x0000010a,0x00000ddb,0x00050080, | ||
| 529 | 0x00000006,0x00000df0,0x00003267,0x00000def, | ||
| 530 | 0x00050041,0x00000156,0x00000df1,0x000000fc, | ||
| 531 | 0x00000154,0x0004003d,0x00000007,0x00000df2, | ||
| 532 | 0x00000df1,0x00050051,0x00000006,0x00000efd, | ||
| 533 | 0x00000df2,0x00000000,0x00050095,0x000000ab, | ||
| 534 | 0x00000eff,0x00000efd,0x00000df0,0x00050051, | ||
| 535 | 0x00000006,0x00000f00,0x00000eff,0x00000001, | ||
| 536 | 0x00050051,0x00000006,0x00000f01,0x00000eff, | ||
| 537 | 0x00000000,0x00050051,0x00000006,0x00000f04, | ||
| 538 | 0x00000df2,0x00000001,0x00050080,0x00000006, | ||
| 539 | 0x00000f06,0x00000f04,0x00000f00,0x00050050, | ||
| 540 | 0x00000007,0x00000f07,0x00000f01,0x00000f06, | ||
| 541 | 0x0004007c,0x00000014,0x00000ef7,0x00000f07, | ||
| 542 | 0x00060041,0x000000db,0x00000eee,0x00000ef7, | ||
| 543 | 0x000000da,0x000000da,0x0006003d,0x00000006, | ||
| 544 | 0x00000eef,0x00000eee,0x00000002,0x00000004, | ||
| 545 | 0x000200f9,0x00000df5,0x000200f8,0x00000df4, | ||
| 546 | 0x000200f9,0x00000df5,0x000200f8,0x00000df5, | ||
| 547 | 0x000700f5,0x00000006,0x00003268,0x00000eef, | ||
| 548 | 0x00000ed9,0x000000a6,0x00000df4,0x00050041, | ||
| 549 | 0x000000fe,0x00000f0b,0x000000fc,0x00000308, | ||
| 550 | 0x0004003d,0x00000006,0x00000f0c,0x00000f0b, | ||
| 551 | 0x00050084,0x00000006,0x00000f0d,0x0000010a, | ||
| 552 | 0x00000f0c,0x000500c2,0x00000006,0x00000f0e, | ||
| 553 | 0x00003266,0x00000f0d,0x000500c7,0x00000006, | ||
| 554 | 0x00000f0f,0x00000f0e,0x00000799,0x000200f9, | ||
| 555 | 0x00000df9,0x000200f8,0x00000df9,0x000700f5, | ||
| 556 | 0x00000006,0x00003269,0x000000a6,0x00000df5, | ||
| 557 | 0x00000e09,0x00000dfd,0x000500b0,0x0000002f, | ||
| 558 | 0x00000dfc,0x00003269,0x0000011f,0x000400f6, | ||
| 559 | 0x00000e0a,0x00000dfd,0x00000000,0x000400fa, | ||
| 560 | 0x00000dfc,0x00000dfd,0x00000e0a,0x000200f8, | ||
| 561 | 0x00000dfd,0x000500aa,0x0000002f,0x00000e03, | ||
| 562 | 0x00003269,0x00000f0f,0x000500a7,0x0000002f, | ||
| 563 | 0x00000e04,0x00000dde,0x00000e03,0x000600a9, | ||
| 564 | 0x00000006,0x00000e05,0x00000e04,0x000000b0, | ||
| 565 | 0x000000a6,0x00060041,0x000006c2,0x00000e06, | ||
| 566 | 0x000008af,0x00003269,0x00000b35,0x0003003e, | ||
| 567 | 0x00000e06,0x00000e05,0x00050080,0x00000006, | ||
| 568 | 0x00000e09,0x00003269,0x00000154,0x000200f9, | ||
| 569 | 0x00000df9,0x000200f8,0x00000e0a,0x000400e0, | ||
| 570 | 0x00000170,0x00000170,0x000006da,0x000200f9, | ||
| 571 | 0x00000e0b,0x000200f8,0x00000e0b,0x000700f5, | ||
| 572 | 0x00000006,0x0000326a,0x000000b0,0x00000e0a, | ||
| 573 | 0x00000e3c,0x00000e3a,0x000500b0,0x0000002f, | ||
| 574 | 0x00000e0e,0x0000326a,0x00000107,0x000400f6, | ||
| 575 | 0x00000e3d,0x00000e3a,0x00000000,0x000400fa, | ||
| 576 | 0x00000e0e,0x00000e0f,0x00000e3d,0x000200f8, | ||
| 577 | 0x00000e0f,0x000200f9,0x00000e10,0x000200f8, | ||
| 578 | 0x00000e10,0x000700f5,0x00000006,0x00003277, | ||
| 579 | 0x000000a6,0x00000e0f,0x00000e26,0x00000e24, | ||
| 580 | 0x000500b0,0x0000002f,0x00000e13,0x00003277, | ||
| 581 | 0x0000011f,0x000400f6,0x00000e27,0x00000e24, | ||
| 582 | 0x00000000,0x000400fa,0x00000e13,0x00000e14, | ||
| 583 | 0x00000e27,0x000200f8,0x00000e14,0x000500ae, | ||
| 584 | 0x0000002f,0x00000e18,0x00000b35,0x0000326a, | ||
| 585 | 0x000300f7,0x00000e21,0x00000000,0x000400fa, | ||
| 586 | 0x00000e18,0x00000e19,0x00000e20,0x000200f8, | ||
| 587 | 0x00000e19,0x00050082,0x00000006,0x00000e1d, | ||
| 588 | 0x00000b35,0x0000326a,0x00060041,0x000006c2, | ||
| 589 | 0x00000e1e,0x000008af,0x00003277,0x00000e1d, | ||
| 590 | 0x0004003d,0x00000006,0x00000e1f,0x00000e1e, | ||
| 591 | 0x000200f9,0x00000e21,0x000200f8,0x00000e20, | ||
| 592 | 0x000200f9,0x00000e21,0x000200f8,0x00000e21, | ||
| 593 | 0x000700f5,0x00000006,0x0000327b,0x00000e1f, | ||
| 594 | 0x00000e19,0x000000a6,0x00000e20,0x00050041, | ||
| 595 | 0x00000009,0x00000e23,0x00000daf,0x00003277, | ||
| 596 | 0x0003003e,0x00000e23,0x0000327b,0x000200f9, | ||
| 597 | 0x00000e24,0x000200f8,0x00000e24,0x00050080, | ||
| 598 | 0x00000006,0x00000e26,0x00003277,0x00000154, | ||
| 599 | 0x000200f9,0x00000e10,0x000200f8,0x00000e27, | ||
| 600 | 0x000400e0,0x00000170,0x00000170,0x000006da, | ||
| 601 | 0x000200f9,0x00000e28,0x000200f8,0x00000e28, | ||
| 602 | 0x000700f5,0x00000006,0x00003278,0x000000a6, | ||
| 603 | 0x00000e27,0x00000e38,0x00000e2c,0x000500b0, | ||
| 604 | 0x0000002f,0x00000e2b,0x00003278,0x0000011f, | ||
| 605 | 0x000400f6,0x00000e39,0x00000e2c,0x00000000, | ||
| 606 | 0x000400fa,0x00000e2b,0x00000e2c,0x00000e39, | ||
| 607 | 0x000200f8,0x00000e2c,0x00050041,0x00000009, | ||
| 608 | 0x00000e30,0x00000daf,0x00003278,0x0004003d, | ||
| 609 | 0x00000006,0x00000e31,0x00000e30,0x00060041, | ||
| 610 | 0x000006c2,0x00000e32,0x000008af,0x00003278, | ||
| 611 | 0x00000b35,0x0004003d,0x00000006,0x00000e33, | ||
| 612 | 0x00000e32,0x00050080,0x00000006,0x00000e34, | ||
| 613 | 0x00000e33,0x00000e31,0x0003003e,0x00000e32, | ||
| 614 | 0x00000e34,0x00050080,0x00000006,0x00000e38, | ||
| 615 | 0x00003278,0x00000154,0x000200f9,0x00000e28, | ||
| 616 | 0x000200f8,0x00000e39,0x000400e0,0x00000170, | ||
| 617 | 0x00000170,0x000006da,0x000200f9,0x00000e3a, | ||
| 618 | 0x000200f8,0x00000e3a,0x000500c4,0x00000006, | ||
| 619 | 0x00000e3c,0x0000326a,0x00000154,0x000200f9, | ||
| 620 | 0x00000e0b,0x000200f8,0x00000e3d,0x000300f7, | ||
| 621 | 0x00000e59,0x00000000,0x000400fa,0x00000dde, | ||
| 622 | 0x00000e3f,0x00000e59,0x000200f8,0x00000e3f, | ||
| 623 | 0x00050041,0x000006c2,0x00000e41,0x00000856, | ||
| 624 | 0x00000f0f,0x0004003d,0x00000006,0x00000e42, | ||
| 625 | 0x00000e41,0x00060041,0x000006c2,0x00000e45, | ||
| 626 | 0x000008af,0x00000f0f,0x00000b35,0x0004003d, | ||
| 627 | 0x00000006,0x00000e46,0x00000e45,0x00050080, | ||
| 628 | 0x00000006,0x00000e47,0x00000e42,0x00000e46, | ||
| 629 | 0x00050082,0x00000006,0x00000e48,0x00000e47, | ||
| 630 | 0x000000b0,0x000500c7,0x00000006,0x00000f15, | ||
| 631 | 0x00000f0c,0x000000b0,0x000500aa,0x0000002f, | ||
| 632 | 0x00000f16,0x00000f15,0x000000a6,0x000300f7, | ||
| 633 | 0x00000f1b,0x00000000,0x000400fa,0x00000f16, | ||
| 634 | 0x00000f17,0x00000f19,0x000200f8,0x00000f17, | ||
| 635 | 0x00050084,0x00000006,0x00000f21,0x00000111, | ||
| 636 | 0x00000dd0,0x00050080,0x00000006,0x00000f22, | ||
| 637 | 0x00000107,0x00000f21,0x000200f9,0x00000f1b, | ||
| 638 | 0x000200f8,0x00000f19,0x000200f9,0x00000f1b, | ||
| 639 | 0x000200f8,0x00000f1b,0x000700f5,0x00000006, | ||
| 640 | 0x0000326b,0x00000f22,0x00000f17,0x00000107, | ||
| 641 | 0x00000f19,0x00050084,0x00000006,0x00000e4b, | ||
| 642 | 0x0000010a,0x00000e48,0x00050080,0x00000006, | ||
| 643 | 0x00000e4c,0x0000326b,0x00000e4b,0x00050041, | ||
| 644 | 0x00000156,0x00000e4d,0x000000fc,0x00000154, | ||
| 645 | 0x0004003d,0x00000007,0x00000e4e,0x00000e4d, | ||
| 646 | 0x00050051,0x00000006,0x00000f3a,0x00000e4e, | ||
| 647 | 0x00000000,0x00050095,0x000000ab,0x00000f3c, | ||
| 648 | 0x00000f3a,0x00000e4c,0x00050051,0x00000006, | ||
| 649 | 0x00000f3d,0x00000f3c,0x00000001,0x00050051, | ||
| 650 | 0x00000006,0x00000f3e,0x00000f3c,0x00000000, | ||
| 651 | 0x00050051,0x00000006,0x00000f41,0x00000e4e, | ||
| 652 | 0x00000001,0x00050080,0x00000006,0x00000f43, | ||
| 653 | 0x00000f41,0x00000f3d,0x00050050,0x00000007, | ||
| 654 | 0x00000f44,0x00000f3e,0x00000f43,0x0004007c, | ||
| 655 | 0x00000014,0x00000f34,0x00000f44,0x00060041, | ||
| 656 | 0x000000db,0x00000f2c,0x00000f34,0x000000da, | ||
| 657 | 0x000000da,0x0005003e,0x00000f2c,0x00003266, | ||
| 658 | 0x00000002,0x00000004,0x000300f7,0x00000f50, | ||
| 659 | 0x00000000,0x000400fa,0x00000f16,0x00000f4c, | ||
| 660 | 0x00000f4e,0x000200f8,0x00000f4c,0x00050084, | ||
| 661 | 0x00000006,0x00000f56,0x00000118,0x00000dd0, | ||
| 662 | 0x00050080,0x00000006,0x00000f57,0x00000107, | ||
| 663 | 0x00000f56,0x000200f9,0x00000f50,0x000200f8, | ||
| 664 | 0x00000f4e,0x00050084,0x00000006,0x00000f5c, | ||
| 665 | 0x0000010a,0x00000dd0,0x00050080,0x00000006, | ||
| 666 | 0x00000f5d,0x00000107,0x00000f5c,0x000200f9, | ||
| 667 | 0x00000f50,0x000200f8,0x00000f50,0x000700f5, | ||
| 668 | 0x00000006,0x0000326c,0x00000f57,0x00000f4c, | ||
| 669 | 0x00000f5d,0x00000f4e,0x00050080,0x00000006, | ||
| 670 | 0x00000e54,0x0000326c,0x00000e4b,0x00050095, | ||
| 671 | 0x000000ab,0x00000f75,0x00000f3a,0x00000e54, | ||
| 672 | 0x00050051,0x00000006,0x00000f76,0x00000f75, | ||
| 673 | 0x00000001,0x00050051,0x00000006,0x00000f77, | ||
| 674 | 0x00000f75,0x00000000,0x00050080,0x00000006, | ||
| 675 | 0x00000f7c,0x00000f41,0x00000f76,0x00050050, | ||
| 676 | 0x00000007,0x00000f7d,0x00000f77,0x00000f7c, | ||
| 677 | 0x0004007c,0x00000014,0x00000f6d,0x00000f7d, | ||
| 678 | 0x00060041,0x000000db,0x00000f65,0x00000f6d, | ||
| 679 | 0x000000da,0x000000da,0x0005003e,0x00000f65, | ||
| 680 | 0x00003268,0x00000002,0x00000004,0x000200f9, | ||
| 681 | 0x00000e59,0x000200f8,0x00000e59,0x000400e0, | ||
| 682 | 0x00000170,0x00000170,0x000006da,0x000300f7, | ||
| 683 | 0x00000e65,0x00000000,0x000400fa,0x00000dbb, | ||
| 684 | 0x00000e5c,0x00000e65,0x000200f8,0x00000e5c, | ||
| 685 | 0x00060041,0x000006c2,0x00000e5f,0x000008af, | ||
| 686 | 0x00000b35,0x0000091d,0x0004003d,0x00000006, | ||
| 687 | 0x00000e60,0x00000e5f,0x00050041,0x000006c2, | ||
| 688 | 0x00000e61,0x00000856,0x00000b35,0x0004003d, | ||
| 689 | 0x00000006,0x00000e62,0x00000e61,0x00050080, | ||
| 690 | 0x00000006,0x00000e63,0x00000e62,0x00000e60, | ||
| 691 | 0x0003003e,0x00000e61,0x00000e63,0x000200f9, | ||
| 692 | 0x00000e65,0x000200f8,0x00000e65,0x000400e0, | ||
| 693 | 0x00000170,0x00000170,0x000006da,0x000200f9, | ||
| 694 | 0x00000e66,0x000200f8,0x00000e66,0x00050080, | ||
| 695 | 0x00000006,0x00000e68,0x00003264,0x00000107, | ||
| 696 | 0x000200f9,0x00000dd3,0x000200f8,0x00000e69, | ||
| 697 | 0x000200f9,0x00000bf3,0x000200f8,0x00000b2f, | ||
| 698 | 0x000500aa,0x0000002f,0x00000b3b,0x00000b13, | ||
| 699 | 0x00000b3a,0x000300f7,0x00000b3d,0x00000000, | ||
| 700 | 0x000400fa,0x00000b3b,0x00000b3c,0x00000b3d, | ||
| 701 | 0x000200f8,0x00000b3c,0x00050041,0x00000b0f, | ||
| 702 | 0x00000b3f,0x00000b18,0x000000a6,0x0004003d, | ||
| 703 | 0x00000006,0x00000b40,0x00000b3f,0x00050041, | ||
| 704 | 0x000000fe,0x00000f98,0x000000fc,0x000000fd, | ||
| 705 | 0x0004003d,0x00000006,0x00000f99,0x00000f98, | ||
| 706 | 0x000200f9,0x00000f9a,0x000200f8,0x00000f9a, | ||
| 707 | 0x000700f5,0x00000006,0x0000324f,0x000000b0, | ||
| 708 | 0x00000b3c,0x00000fa1,0x00000f9f,0x000500b0, | ||
| 709 | 0x0000002f,0x00000f9e,0x0000324f,0x00000f99, | ||
| 710 | 0x000400f6,0x00000fa3,0x00000f9f,0x00000000, | ||
| 711 | 0x000400fa,0x00000f9e,0x00000f9f,0x00000fa3, | ||
| 712 | 0x000200f8,0x00000f9f,0x000500c4,0x00000006, | ||
| 713 | 0x00000fa1,0x0000324f,0x00000154,0x000200f9, | ||
| 714 | 0x00000f9a,0x000200f8,0x00000fa3,0x000200f9, | ||
| 715 | 0x00000fa5,0x000200f8,0x00000fa5,0x000700f5, | ||
| 716 | 0x00000006,0x00003250,0x00000b40,0x00000fa3, | ||
| 717 | 0x00000fcd,0x00000fcb,0x000500b0,0x0000002f, | ||
| 718 | 0x00000fa9,0x00003250,0x0000324f,0x000400f6, | ||
| 719 | 0x00000fce,0x00000fcb,0x00000000,0x000400fa, | ||
| 720 | 0x00000fa9,0x00000faa,0x00000fce,0x000200f8, | ||
| 721 | 0x00000faa,0x000500b0,0x0000002f,0x00000fae, | ||
| 722 | 0x00003250,0x00000f99,0x000300f7,0x00000fb8, | ||
| 723 | 0x00000000,0x000400fa,0x00000fae,0x00000faf, | ||
| 724 | 0x00000fb7,0x000200f8,0x00000faf,0x00050084, | ||
| 725 | 0x00000006,0x00000fb2,0x0000010a,0x00003250, | ||
| 726 | 0x00050080,0x00000006,0x00000fb3,0x00000107, | ||
| 727 | 0x00000fb2,0x00050041,0x00000156,0x00000fb4, | ||
| 728 | 0x000000fc,0x00000154,0x0004003d,0x00000007, | ||
| 729 | 0x00000fb5,0x00000fb4,0x00050051,0x00000006, | ||
| 730 | 0x0000105c,0x00000fb5,0x00000000,0x00050095, | ||
| 731 | 0x000000ab,0x0000105e,0x0000105c,0x00000fb3, | ||
| 732 | 0x00050051,0x00000006,0x0000105f,0x0000105e, | ||
| 733 | 0x00000001,0x00050051,0x00000006,0x00001060, | ||
| 734 | 0x0000105e,0x00000000,0x00050051,0x00000006, | ||
| 735 | 0x00001063,0x00000fb5,0x00000001,0x00050080, | ||
| 736 | 0x00000006,0x00001065,0x00001063,0x0000105f, | ||
| 737 | 0x00050050,0x00000007,0x00001066,0x00001060, | ||
| 738 | 0x00001065,0x0004007c,0x00000014,0x00001056, | ||
| 739 | 0x00001066,0x00060041,0x000000db,0x0000104d, | ||
| 740 | 0x00001056,0x000000da,0x000000da,0x0006003d, | ||
| 741 | 0x00000006,0x0000104e,0x0000104d,0x00000002, | ||
| 742 | 0x00000004,0x000200f9,0x00000fb8,0x000200f8, | ||
| 743 | 0x00000fb7,0x000200f9,0x00000fb8,0x000200f8, | ||
| 744 | 0x00000fb8,0x000700f5,0x00000006,0x00003260, | ||
| 745 | 0x0000104e,0x00000faf,0x00000380,0x00000fb7, | ||
| 746 | 0x00050041,0x000006c2,0x00000fba,0x000006af, | ||
| 747 | 0x00003250,0x0003003e,0x00000fba,0x00003260, | ||
| 748 | 0x000300f7,0x00000fc8,0x00000000,0x000400fa, | ||
| 749 | 0x00000fae,0x00000fbf,0x00000fc7,0x000200f8, | ||
| 750 | 0x00000fbf,0x00050084,0x00000006,0x0000106b, | ||
| 751 | 0x0000010a,0x00000f99,0x00050080,0x00000006, | ||
| 752 | 0x0000106c,0x00000107,0x0000106b,0x00050084, | ||
| 753 | 0x00000006,0x00000fc2,0x0000010a,0x00003250, | ||
| 754 | 0x00050080,0x00000006,0x00000fc3,0x0000106c, | ||
| 755 | 0x00000fc2,0x00050041,0x00000156,0x00000fc4, | ||
| 756 | 0x000000fc,0x00000154,0x0004003d,0x00000007, | ||
| 757 | 0x00000fc5,0x00000fc4,0x00050051,0x00000006, | ||
| 758 | 0x00001083,0x00000fc5,0x00000000,0x00050095, | ||
| 759 | 0x000000ab,0x00001085,0x00001083,0x00000fc3, | ||
| 760 | 0x00050051,0x00000006,0x00001086,0x00001085, | ||
| 761 | 0x00000001,0x00050051,0x00000006,0x00001087, | ||
| 762 | 0x00001085,0x00000000,0x00050051,0x00000006, | ||
| 763 | 0x0000108a,0x00000fc5,0x00000001,0x00050080, | ||
| 764 | 0x00000006,0x0000108c,0x0000108a,0x00001086, | ||
| 765 | 0x00050050,0x00000007,0x0000108d,0x00001087, | ||
| 766 | 0x0000108c,0x0004007c,0x00000014,0x0000107d, | ||
| 767 | 0x0000108d,0x00060041,0x000000db,0x00001074, | ||
| 768 | 0x0000107d,0x000000da,0x000000da,0x0006003d, | ||
| 769 | 0x00000006,0x00001075,0x00001074,0x00000002, | ||
| 770 | 0x00000004,0x000200f9,0x00000fc8,0x000200f8, | ||
| 771 | 0x00000fc7,0x000200f9,0x00000fc8,0x000200f8, | ||
| 772 | 0x00000fc8,0x000700f5,0x00000006,0x00003262, | ||
| 773 | 0x00001075,0x00000fbf,0x00000380,0x00000fc7, | ||
| 774 | 0x00050041,0x000006c2,0x00000fca,0x000006c4, | ||
| 775 | 0x00003250,0x0003003e,0x00000fca,0x00003262, | ||
| 776 | 0x000200f9,0x00000fcb,0x000200f8,0x00000fcb, | ||
| 777 | 0x00050080,0x00000006,0x00000fcd,0x00003250, | ||
| 778 | 0x00000107,0x000200f9,0x00000fa5,0x000200f8, | ||
| 779 | 0x00000fce,0x000400e0,0x00000170,0x00000170, | ||
| 780 | 0x000006da,0x000200f9,0x00000fcf,0x000200f8, | ||
| 781 | 0x00000fcf,0x000700f5,0x00000006,0x00003252, | ||
| 782 | 0x00000170,0x00000fce,0x00001023,0x00001021, | ||
| 783 | 0x000500b2,0x0000002f,0x00000fd3,0x00003252, | ||
| 784 | 0x0000324f,0x000400f6,0x00001024,0x00001021, | ||
| 785 | 0x00000000,0x000400fa,0x00000fd3,0x00000fd4, | ||
| 786 | 0x00001024,0x000200f8,0x00000fd4,0x000500c2, | ||
| 787 | 0x00000006,0x00000fd6,0x00003252,0x00000154, | ||
| 788 | 0x000200f9,0x00000fd7,0x000200f8,0x00000fd7, | ||
| 789 | 0x000700f5,0x00000006,0x00003255,0x00000fd6, | ||
| 790 | 0x00000fd4,0x0000101f,0x0000101d,0x000500ac, | ||
| 791 | 0x0000002f,0x00000fda,0x00003255,0x000000a6, | ||
| 792 | 0x000400f6,0x00001020,0x0000101d,0x00000000, | ||
| 793 | 0x000400fa,0x00000fda,0x00000fdb,0x00001020, | ||
| 794 | 0x000200f8,0x00000fdb,0x000200f9,0x00000fdd, | ||
| 795 | 0x000200f8,0x00000fdd,0x000700f5,0x00000006, | ||
| 796 | 0x00003257,0x00000b40,0x00000fdb,0x0000101b, | ||
| 797 | 0x00001019,0x000500b0,0x0000002f,0x00000fe1, | ||
| 798 | 0x00003257,0x0000324f,0x000400f6,0x0000101c, | ||
| 799 | 0x00001019,0x00000000,0x000400fa,0x00000fe1, | ||
| 800 | 0x00000fe2,0x0000101c,0x000200f8,0x00000fe2, | ||
| 801 | 0x000500c6,0x00000006,0x00000fe5,0x00003257, | ||
| 802 | 0x00003255,0x000500ac,0x0000002f,0x00000fe8, | ||
| 803 | 0x00000fe5,0x00003257,0x000300f7,0x00001018, | ||
| 804 | 0x00000000,0x000400fa,0x00000fe8,0x00000fe9, | ||
| 805 | 0x00001018,0x000200f8,0x00000fe9,0x00050041, | ||
| 806 | 0x000006c2,0x00000feb,0x000006af,0x00003257, | ||
| 807 | 0x0004003d,0x00000006,0x00000fec,0x00000feb, | ||
| 808 | 0x00050041,0x000006c2,0x00000fee,0x000006af, | ||
| 809 | 0x00000fe5,0x0004003d,0x00000006,0x00000fef, | ||
| 810 | 0x00000fee,0x00050041,0x000006c2,0x00000ff1, | ||
| 811 | 0x000006c4,0x00003257,0x0004003d,0x00000006, | ||
| 812 | 0x00000ff2,0x00000ff1,0x00050041,0x000006c2, | ||
| 813 | 0x00000ff4,0x000006c4,0x00000fe5,0x0004003d, | ||
| 814 | 0x00000006,0x00000ff5,0x00000ff4,0x000500ac, | ||
| 815 | 0x0000002f,0x00000ff8,0x00000fec,0x00000fef, | ||
| 816 | 0x000400a8,0x0000002f,0x00000ff9,0x00000ff8, | ||
| 817 | 0x000300f7,0x00001002,0x00000000,0x000400fa, | ||
| 818 | 0x00000ff9,0x00000ffa,0x00001002,0x000200f8, | ||
| 819 | 0x00000ffa,0x000500aa,0x0000002f,0x00000ffd, | ||
| 820 | 0x00000fec,0x00000fef,0x000500ac,0x0000002f, | ||
| 821 | 0x00001000,0x00000ff2,0x00000ff5,0x000500a7, | ||
| 822 | 0x0000002f,0x00001001,0x00000ffd,0x00001000, | ||
| 823 | 0x000200f9,0x00001002,0x000200f8,0x00001002, | ||
| 824 | 0x000700f5,0x0000002f,0x00001003,0x00000ff8, | ||
| 825 | 0x00000fe9,0x00001001,0x00000ffa,0x000500c7, | ||
| 826 | 0x00000006,0x00001007,0x00003257,0x00003252, | ||
| 827 | 0x000500aa,0x0000002f,0x00001008,0x00001007, | ||
| 828 | 0x000000a6,0x000500a4,0x0000002f,0x00001009, | ||
| 829 | 0x00001003,0x00001008,0x000300f7,0x00001017, | ||
| 830 | 0x00000000,0x000400fa,0x00001009,0x0000100a, | ||
| 831 | 0x00001017,0x000200f8,0x0000100a,0x0003003e, | ||
| 832 | 0x00000feb,0x00000fef,0x0003003e,0x00000fee, | ||
| 833 | 0x00000fec,0x0003003e,0x00000ff1,0x00000ff5, | ||
| 834 | 0x0003003e,0x00000ff4,0x00000ff2,0x000200f9, | ||
| 835 | 0x00001017,0x000200f8,0x00001017,0x000200f9, | ||
| 836 | 0x00001018,0x000200f8,0x00001018,0x000200f9, | ||
| 837 | 0x00001019,0x000200f8,0x00001019,0x00050080, | ||
| 838 | 0x00000006,0x0000101b,0x00003257,0x00000107, | ||
| 839 | 0x000200f9,0x00000fdd,0x000200f8,0x0000101c, | ||
| 840 | 0x000400e0,0x00000170,0x00000170,0x000006da, | ||
| 841 | 0x000200f9,0x0000101d,0x000200f8,0x0000101d, | ||
| 842 | 0x000500c2,0x00000006,0x0000101f,0x00003255, | ||
| 843 | 0x00000154,0x000200f9,0x00000fd7,0x000200f8, | ||
| 844 | 0x00001020,0x000200f9,0x00001021,0x000200f8, | ||
| 845 | 0x00001021,0x000500c4,0x00000006,0x00001023, | ||
| 846 | 0x00003252,0x00000154,0x000200f9,0x00000fcf, | ||
| 847 | 0x000200f8,0x00001024,0x000200f9,0x00001026, | ||
| 848 | 0x000200f8,0x00001026,0x000700f5,0x00000006, | ||
| 849 | 0x00003254,0x00000b40,0x00001024,0x00001042, | ||
| 850 | 0x0000102b,0x000500b0,0x0000002f,0x0000102a, | ||
| 851 | 0x00003254,0x00000f99,0x000400f6,0x00001043, | ||
| 852 | 0x0000102b,0x00000000,0x000400fa,0x0000102a, | ||
| 853 | 0x0000102b,0x00001043,0x000200f8,0x0000102b, | ||
| 854 | 0x00050084,0x00000006,0x0000102e,0x0000010a, | ||
| 855 | 0x00003254,0x00050080,0x00000006,0x0000102f, | ||
| 856 | 0x00000107,0x0000102e,0x00050041,0x00000156, | ||
| 857 | 0x00001031,0x000000fc,0x00000154,0x0004003d, | ||
| 858 | 0x00000007,0x00001032,0x00001031,0x00050041, | ||
| 859 | 0x000006c2,0x00001033,0x000006af,0x00003254, | ||
| 860 | 0x0004003d,0x00000006,0x00001034,0x00001033, | ||
| 861 | 0x00050051,0x00000006,0x000010a5,0x00001032, | ||
| 862 | 0x00000000,0x00050095,0x000000ab,0x000010a7, | ||
| 863 | 0x000010a5,0x0000102f,0x00050051,0x00000006, | ||
| 864 | 0x000010a8,0x000010a7,0x00000001,0x00050051, | ||
| 865 | 0x00000006,0x000010a9,0x000010a7,0x00000000, | ||
| 866 | 0x00050051,0x00000006,0x000010ac,0x00001032, | ||
| 867 | 0x00000001,0x00050080,0x00000006,0x000010ae, | ||
| 868 | 0x000010ac,0x000010a8,0x00050050,0x00000007, | ||
| 869 | 0x000010af,0x000010a9,0x000010ae,0x0004007c, | ||
| 870 | 0x00000014,0x0000109f,0x000010af,0x00060041, | ||
| 871 | 0x000000db,0x00001097,0x0000109f,0x000000da, | ||
| 872 | 0x000000da,0x0005003e,0x00001097,0x00001034, | ||
| 254 | 0x00000002,0x00000004,0x00050084,0x00000006, | 873 | 0x00000002,0x00000004,0x00050084,0x00000006, |
| 255 | 0x00000afb,0x00000107,0x00000ac4,0x000500c2, | 874 | 0x000010b4,0x0000010a,0x00000f99,0x00050080, |
| 256 | 0x00000006,0x00000afc,0x00000add,0x00000afb, | 875 | 0x00000006,0x000010b5,0x00000107,0x000010b4, |
| 257 | 0x000500c7,0x00000006,0x00000afd,0x00000afc, | 876 | 0x00050080,0x00000006,0x00001039,0x000010b5, |
| 258 | 0x000006ca,0x00050041,0x000006d6,0x00000aa8, | 877 | 0x0000102e,0x00050041,0x000006c2,0x0000103d, |
| 259 | 0x000006d4,0x00000afd,0x000700ea,0x00000006, | 878 | 0x000006c4,0x00003254,0x0004003d,0x00000006, |
| 260 | 0x00000aa9,0x00000aa8,0x000000ad,0x000000a3, | 879 | 0x0000103e,0x0000103d,0x00050095,0x000000ab, |
| 261 | 0x000000ad,0x000200f9,0x00000aaa,0x000200f8, | 880 | 0x000010cd,0x000010a5,0x00001039,0x00050051, |
| 262 | 0x00000aaa,0x00050080,0x00000006,0x00000aac, | 881 | 0x00000006,0x000010ce,0x000010cd,0x00000001, |
| 263 | 0x00002b52,0x00000104,0x000200f9,0x00000a9a, | 882 | 0x00050051,0x00000006,0x000010cf,0x000010cd, |
| 264 | 0x000200f8,0x00000aad,0x000400e0,0x0000016d, | 883 | 0x00000000,0x00050080,0x00000006,0x000010d4, |
| 265 | 0x0000016d,0x000006d8,0x000300f7,0x00000abf, | 884 | 0x000010ac,0x000010ce,0x00050050,0x00000007, |
| 266 | 0x00000000,0x000400fa,0x00000a8b,0x00000ab0, | 885 | 0x000010d5,0x000010cf,0x000010d4,0x0004007c, |
| 267 | 0x00000abf,0x000200f8,0x00000ab0,0x00050084, | 886 | 0x00000014,0x000010c5,0x000010d5,0x00060041, |
| 268 | 0x00000006,0x00000b02,0x0000011c,0x00000a95, | 887 | 0x000000db,0x000010bd,0x000010c5,0x000000da, |
| 269 | 0x00050080,0x00000006,0x00000b03,0x00000104, | 888 | 0x000000da,0x0005003e,0x000010bd,0x0000103e, |
| 270 | 0x00000b02,0x00050080,0x00000006,0x00000b09, | ||
| 271 | 0x00000a95,0x00002b67,0x00050086,0x00000006, | ||
| 272 | 0x00000b0a,0x00000b09,0x000000fe,0x00050084, | ||
| 273 | 0x00000006,0x00000ab4,0x000009f7,0x00000b0a, | ||
| 274 | 0x00050080,0x00000006,0x00000ab6,0x00000ab4, | ||
| 275 | 0x000009f4,0x00050084,0x00000006,0x00000ab7, | ||
| 276 | 0x00000107,0x00000ab6,0x00050080,0x00000006, | ||
| 277 | 0x00000ab8,0x00000b03,0x00000ab7,0x00050041, | ||
| 278 | 0x00000153,0x00000aba,0x000000f9,0x00000151, | ||
| 279 | 0x0004003d,0x00000007,0x00000abb,0x00000aba, | ||
| 280 | 0x00050041,0x000006d6,0x00000abc,0x000006d4, | ||
| 281 | 0x000009f7,0x0004003d,0x00000006,0x00000abd, | ||
| 282 | 0x00000abc,0x00050051,0x00000006,0x00000b20, | ||
| 283 | 0x00000abb,0x00000000,0x00050095,0x000000a8, | ||
| 284 | 0x00000b22,0x00000b20,0x00000ab8,0x00050051, | ||
| 285 | 0x00000006,0x00000b23,0x00000b22,0x00000001, | ||
| 286 | 0x00050051,0x00000006,0x00000b24,0x00000b22, | ||
| 287 | 0x00000000,0x00050051,0x00000006,0x00000b27, | ||
| 288 | 0x00000abb,0x00000001,0x00050080,0x00000006, | ||
| 289 | 0x00000b29,0x00000b27,0x00000b23,0x00050050, | ||
| 290 | 0x00000007,0x00000b2a,0x00000b24,0x00000b29, | ||
| 291 | 0x0004007c,0x00000014,0x00000b1a,0x00000b2a, | ||
| 292 | 0x00060041,0x000000d8,0x00000b12,0x00000b1a, | ||
| 293 | 0x000000d7,0x000000d7,0x0005003e,0x00000b12, | ||
| 294 | 0x00000abd,0x00000002,0x00000004,0x000200f9, | ||
| 295 | 0x00000abf,0x000200f8,0x00000abf,0x000200f9, | ||
| 296 | 0x00000a6e,0x000200f8,0x000009ef,0x000500aa, | ||
| 297 | 0x0000002f,0x000009fc,0x000009eb,0x0000010e, | ||
| 298 | 0x000300f7,0x000009fe,0x00000000,0x000400fa, | ||
| 299 | 0x000009fc,0x000009fd,0x000009fe,0x000200f8, | ||
| 300 | 0x000009fd,0x00050041,0x000009e7,0x00000a00, | ||
| 301 | 0x000009f1,0x000000a3,0x0004003d,0x00000006, | ||
| 302 | 0x00000a01,0x00000a00,0x00050041,0x000000fb, | ||
| 303 | 0x00000b9d,0x000000f9,0x000000fa,0x0004003d, | ||
| 304 | 0x00000006,0x00000b9e,0x00000b9d,0x00050080, | ||
| 305 | 0x00000006,0x00000ba0,0x00000b9e,0x00002b67, | ||
| 306 | 0x00050086,0x00000006,0x00000ba1,0x00000ba0, | ||
| 307 | 0x000000fe,0x00050084,0x00000006,0x00000b40, | ||
| 308 | 0x0000011c,0x00000ba1,0x00050080,0x00000006, | ||
| 309 | 0x00000b42,0x00000b40,0x00000717,0x00050086, | ||
| 310 | 0x00000006,0x00000b43,0x00000b42,0x00000104, | ||
| 311 | 0x00050084,0x00000006,0x00000b46,0x00000a01, | ||
| 312 | 0x00000b43,0x0007000c,0x00000006,0x00000b48, | ||
| 313 | 0x00000001,0x00000026,0x00000b46,0x00000b40, | ||
| 314 | 0x00050080,0x00000006,0x00000b4b,0x00000b48, | ||
| 315 | 0x00000b43,0x0007000c,0x00000006,0x00000b4d, | ||
| 316 | 0x00000001,0x00000026,0x00000b4b,0x00000b40, | ||
| 317 | 0x000200f9,0x00000b4f,0x000200f8,0x00000b4f, | ||
| 318 | 0x000700f5,0x00000006,0x00002b4d,0x000000a3, | ||
| 319 | 0x000009fd,0x00000b5d,0x00000b54,0x000700f5, | ||
| 320 | 0x00000006,0x00002b4c,0x00000b48,0x000009fd, | ||
| 321 | 0x00000b60,0x00000b54,0x000500b0,0x0000002f, | ||
| 322 | 0x00000b53,0x00002b4c,0x00000b4d,0x000400f6, | ||
| 323 | 0x00000b61,0x00000b54,0x00000000,0x000400fa, | ||
| 324 | 0x00000b53,0x00000b54,0x00000b61,0x000200f8, | ||
| 325 | 0x00000b54,0x00050084,0x00000006,0x00000ba6, | ||
| 326 | 0x0000011c,0x00000b9e,0x00050080,0x00000006, | ||
| 327 | 0x00000ba7,0x00000104,0x00000ba6,0x00050084, | ||
| 328 | 0x00000006,0x00000b57,0x00000107,0x00002b4c, | ||
| 329 | 0x00050080,0x00000006,0x00000b58,0x00000ba7, | ||
| 330 | 0x00000b57,0x00050041,0x00000153,0x00000b59, | ||
| 331 | 0x000000f9,0x00000151,0x0004003d,0x00000007, | ||
| 332 | 0x00000b5a,0x00000b59,0x00050051,0x00000006, | ||
| 333 | 0x00000bbe,0x00000b5a,0x00000000,0x00050095, | ||
| 334 | 0x000000a8,0x00000bc0,0x00000bbe,0x00000b58, | ||
| 335 | 0x00050051,0x00000006,0x00000bc1,0x00000bc0, | ||
| 336 | 0x00000001,0x00050051,0x00000006,0x00000bc2, | ||
| 337 | 0x00000bc0,0x00000000,0x00050051,0x00000006, | ||
| 338 | 0x00000bc5,0x00000b5a,0x00000001,0x00050080, | ||
| 339 | 0x00000006,0x00000bc7,0x00000bc5,0x00000bc1, | ||
| 340 | 0x00050050,0x00000007,0x00000bc8,0x00000bc2, | ||
| 341 | 0x00000bc7,0x0004007c,0x00000014,0x00000bb8, | ||
| 342 | 0x00000bc8,0x00060041,0x000000d8,0x00000baf, | ||
| 343 | 0x00000bb8,0x000000d7,0x000000d7,0x0006003d, | ||
| 344 | 0x00000006,0x00000bb0,0x00000baf,0x00000002, | ||
| 345 | 0x00000004,0x00050080,0x00000006,0x00000b5d, | ||
| 346 | 0x00002b4d,0x00000bb0,0x00050080,0x00000006, | ||
| 347 | 0x00000b60,0x00002b4c,0x00000151,0x000200f9, | ||
| 348 | 0x00000b4f,0x000200f8,0x00000b61,0x00050041, | ||
| 349 | 0x000006d6,0x00000b64,0x00000740,0x00000a01, | ||
| 350 | 0x0003003e,0x00000b64,0x00002b4d,0x000400e0, | ||
| 351 | 0x0000016d,0x0000016d,0x000006d8,0x000500aa, | ||
| 352 | 0x0000002f,0x00000b66,0x00000a01,0x000000a3, | ||
| 353 | 0x000300f7,0x00000b7a,0x00000000,0x000400fa, | ||
| 354 | 0x00000b66,0x00000b67,0x00000b7a,0x000200f8, | ||
| 355 | 0x00000b67,0x000200f9,0x00000b68,0x000200f8, | ||
| 356 | 0x00000b68,0x000700f5,0x00000006,0x00002b51, | ||
| 357 | 0x000000a3,0x00000b67,0x00000b75,0x00000b6c, | ||
| 358 | 0x000700f5,0x00000006,0x00002b4e,0x000000a3, | ||
| 359 | 0x00000b67,0x00000b78,0x00000b6c,0x000500b0, | ||
| 360 | 0x0000002f,0x00000b6b,0x00002b4e,0x00000104, | ||
| 361 | 0x000400f6,0x00000b79,0x00000b6c,0x00000000, | ||
| 362 | 0x000400fa,0x00000b6b,0x00000b6c,0x00000b79, | ||
| 363 | 0x000200f8,0x00000b6c,0x00050041,0x000006d6, | ||
| 364 | 0x00000b6e,0x00000740,0x00002b4e,0x0004003d, | ||
| 365 | 0x00000006,0x00000b6f,0x00000b6e,0x0003003e, | ||
| 366 | 0x00000b6e,0x00002b51,0x00050080,0x00000006, | ||
| 367 | 0x00000b75,0x00002b51,0x00000b6f,0x00050080, | ||
| 368 | 0x00000006,0x00000b78,0x00002b4e,0x00000151, | ||
| 369 | 0x000200f9,0x00000b68,0x000200f8,0x00000b79, | ||
| 370 | 0x000200f9,0x00000b7a,0x000200f8,0x00000b7a, | ||
| 371 | 0x000400e0,0x0000016d,0x0000016d,0x000006d8, | ||
| 372 | 0x0004003d,0x00000006,0x00000b7d,0x00000b64, | ||
| 373 | 0x000200f9,0x00000b7f,0x000200f8,0x00000b7f, | ||
| 374 | 0x000700f5,0x00000006,0x00002b50,0x00000b7d, | ||
| 375 | 0x00000b7a,0x00000b96,0x00000b84,0x000700f5, | ||
| 376 | 0x00000006,0x00002b4f,0x00000b48,0x00000b7a, | ||
| 377 | 0x00000b99,0x00000b84,0x000500b0,0x0000002f, | ||
| 378 | 0x00000b83,0x00002b4f,0x00000b4d,0x000400f6, | ||
| 379 | 0x00000b9a,0x00000b84,0x00000000,0x000400fa, | ||
| 380 | 0x00000b83,0x00000b84,0x00000b9a,0x000200f8, | ||
| 381 | 0x00000b84,0x00050084,0x00000006,0x00000bcd, | ||
| 382 | 0x0000011c,0x00000b9e,0x00050080,0x00000006, | ||
| 383 | 0x00000bce,0x00000104,0x00000bcd,0x00050084, | ||
| 384 | 0x00000006,0x00000b87,0x00000107,0x00002b4f, | ||
| 385 | 0x00050080,0x00000006,0x00000b88,0x00000bce, | ||
| 386 | 0x00000b87,0x00050041,0x00000153,0x00000b89, | ||
| 387 | 0x000000f9,0x00000151,0x0004003d,0x00000007, | ||
| 388 | 0x00000b8a,0x00000b89,0x00050051,0x00000006, | ||
| 389 | 0x00000be5,0x00000b8a,0x00000000,0x00050095, | ||
| 390 | 0x000000a8,0x00000be7,0x00000be5,0x00000b88, | ||
| 391 | 0x00050051,0x00000006,0x00000be8,0x00000be7, | ||
| 392 | 0x00000001,0x00050051,0x00000006,0x00000be9, | ||
| 393 | 0x00000be7,0x00000000,0x00050051,0x00000006, | ||
| 394 | 0x00000bec,0x00000b8a,0x00000001,0x00050080, | ||
| 395 | 0x00000006,0x00000bee,0x00000bec,0x00000be8, | ||
| 396 | 0x00050050,0x00000007,0x00000bef,0x00000be9, | ||
| 397 | 0x00000bee,0x0004007c,0x00000014,0x00000bdf, | ||
| 398 | 0x00000bef,0x00060041,0x000000d8,0x00000bd6, | ||
| 399 | 0x00000bdf,0x000000d7,0x000000d7,0x0006003d, | ||
| 400 | 0x00000006,0x00000bd7,0x00000bd6,0x00000002, | ||
| 401 | 0x00000004,0x0005003e,0x00000bd6,0x00002b50, | ||
| 402 | 0x00000002,0x00000004,0x00050080,0x00000006, | ||
| 403 | 0x00000b96,0x00002b50,0x00000bd7,0x00050080, | ||
| 404 | 0x00000006,0x00000b99,0x00002b4f,0x00000151, | ||
| 405 | 0x000200f9,0x00000b7f,0x000200f8,0x00000b9a, | ||
| 406 | 0x000200f9,0x00000a6e,0x000200f8,0x000009fe, | ||
| 407 | 0x000500aa,0x0000002f,0x00000a06,0x000009eb, | ||
| 408 | 0x00000387,0x000300f7,0x00000a08,0x00000000, | ||
| 409 | 0x000400fa,0x00000a06,0x00000a07,0x00000a08, | ||
| 410 | 0x000200f8,0x00000a07,0x00050041,0x000009e7, | ||
| 411 | 0x00000a0a,0x000009f0,0x000000a3,0x0004003d, | ||
| 412 | 0x00000006,0x00000a0b,0x00000a0a,0x00050041, | ||
| 413 | 0x000009e7,0x00000a0d,0x000009f1,0x000000a3, | ||
| 414 | 0x0004003d,0x00000006,0x00000a0e,0x00000a0d, | ||
| 415 | 0x000500b0,0x0000002f,0x00000c36,0x00000a0e, | ||
| 416 | 0x0000011c,0x000300f7,0x00000c45,0x00000000, | ||
| 417 | 0x000400fa,0x00000c36,0x00000c37,0x00000c45, | ||
| 418 | 0x000200f8,0x00000c37,0x00050041,0x000000fb, | ||
| 419 | 0x00000ce7,0x000000f9,0x000000fa,0x0004003d, | ||
| 420 | 0x00000006,0x00000ce8,0x00000ce7,0x00050084, | ||
| 421 | 0x00000006,0x00000ce9,0x0000011c,0x00000ce8, | ||
| 422 | 0x00050080,0x00000006,0x00000cea,0x00000104, | ||
| 423 | 0x00000ce9,0x00050080,0x00000006,0x00000cf0, | ||
| 424 | 0x00000ce8,0x00002b67,0x00050086,0x00000006, | ||
| 425 | 0x00000cf1,0x00000cf0,0x000000fe,0x00050084, | ||
| 426 | 0x00000006,0x00000c3c,0x00000a0e,0x00000cf1, | ||
| 427 | 0x00050080,0x00000006,0x00000c3e,0x00000c3c, | ||
| 428 | 0x00000a0b,0x00050084,0x00000006,0x00000c3f, | ||
| 429 | 0x00000107,0x00000c3e,0x00050080,0x00000006, | ||
| 430 | 0x00000c40,0x00000cea,0x00000c3f,0x00050041, | ||
| 431 | 0x00000153,0x00000c41,0x000000f9,0x00000151, | ||
| 432 | 0x0004003d,0x00000007,0x00000c42,0x00000c41, | ||
| 433 | 0x00050051,0x00000006,0x00000d08,0x00000c42, | ||
| 434 | 0x00000000,0x00050095,0x000000a8,0x00000d0a, | ||
| 435 | 0x00000d08,0x00000c40,0x00050051,0x00000006, | ||
| 436 | 0x00000d0b,0x00000d0a,0x00000001,0x00050051, | ||
| 437 | 0x00000006,0x00000d0c,0x00000d0a,0x00000000, | ||
| 438 | 0x00050051,0x00000006,0x00000d0f,0x00000c42, | ||
| 439 | 0x00000001,0x00050080,0x00000006,0x00000d11, | ||
| 440 | 0x00000d0f,0x00000d0b,0x00050050,0x00000007, | ||
| 441 | 0x00000d12,0x00000d0c,0x00000d11,0x0004007c, | ||
| 442 | 0x00000014,0x00000d02,0x00000d12,0x00060041, | ||
| 443 | 0x000000d8,0x00000cf9,0x00000d02,0x000000d7, | ||
| 444 | 0x000000d7,0x0006003d,0x00000006,0x00000cfa, | ||
| 445 | 0x00000cf9,0x00000002,0x00000004,0x00050041, | ||
| 446 | 0x000006d6,0x00000c44,0x00000789,0x00000a0e, | ||
| 447 | 0x0003003e,0x00000c44,0x00000cfa,0x000200f9, | ||
| 448 | 0x00000c45,0x000200f8,0x00000c45,0x00050084, | ||
| 449 | 0x00000006,0x00000c47,0x00000a0b,0x000000fe, | ||
| 450 | 0x00050080,0x00000006,0x00000c49,0x00000c47, | ||
| 451 | 0x000000fe,0x00050041,0x000000fb,0x00000c4a, | ||
| 452 | 0x000000f9,0x000000fa,0x0004003d,0x00000006, | ||
| 453 | 0x00000c4b,0x00000c4a,0x0007000c,0x00000006, | ||
| 454 | 0x00000c4c,0x00000001,0x00000026,0x00000c49, | ||
| 455 | 0x00000c4b,0x000200f9,0x00000c4e,0x000200f8, | ||
| 456 | 0x00000c4e,0x000700f5,0x00000006,0x00002b33, | ||
| 457 | 0x00000c47,0x00000c45,0x00000ce3,0x00000ce1, | ||
| 458 | 0x000500b0,0x0000002f,0x00000c52,0x00002b33, | ||
| 459 | 0x00000c4c,0x000400f6,0x00000ce4,0x00000ce1, | ||
| 460 | 0x00000000,0x000400fa,0x00000c52,0x00000c53, | ||
| 461 | 0x00000ce4,0x000200f8,0x00000c53,0x00050080, | ||
| 462 | 0x00000006,0x00000c56,0x00002b33,0x00000a0e, | ||
| 463 | 0x000500b0,0x0000002f,0x00000c59,0x00000c56, | ||
| 464 | 0x00000c4c,0x000300f7,0x00000c64,0x00000000, | ||
| 465 | 0x000400fa,0x00000c59,0x00000c5b,0x00000c63, | ||
| 466 | 0x000200f8,0x00000c5b,0x00050041,0x000000fb, | ||
| 467 | 0x00000d16,0x000000f9,0x00000305,0x0004003d, | ||
| 468 | 0x00000006,0x00000d17,0x00000d16,0x000500c7, | ||
| 469 | 0x00000006,0x00000d18,0x00000d17,0x000000ad, | ||
| 470 | 0x000500aa,0x0000002f,0x00000d19,0x00000d18, | ||
| 471 | 0x000000a3,0x000300f7,0x00000d1e,0x00000000, | ||
| 472 | 0x000400fa,0x00000d19,0x00000d1a,0x00000d1c, | ||
| 473 | 0x000200f8,0x00000d1a,0x000200f9,0x00000d1e, | ||
| 474 | 0x000200f8,0x00000d1c,0x00050084,0x00000006, | ||
| 475 | 0x00000d26,0x0000010e,0x00000c4b,0x00050080, | ||
| 476 | 0x00000006,0x00000d27,0x00000104,0x00000d26, | ||
| 477 | 0x000200f9,0x00000d1e,0x000200f8,0x00000d1e, | ||
| 478 | 0x000700f5,0x00000006,0x00002b34,0x00000104, | ||
| 479 | 0x00000d1a,0x00000d27,0x00000d1c,0x00050084, | ||
| 480 | 0x00000006,0x00000c5e,0x00000107,0x00000c56, | ||
| 481 | 0x00050080,0x00000006,0x00000c5f,0x00002b34, | ||
| 482 | 0x00000c5e,0x00050041,0x00000153,0x00000c60, | ||
| 483 | 0x000000f9,0x00000151,0x0004003d,0x00000007, | ||
| 484 | 0x00000c61,0x00000c60,0x00050051,0x00000006, | ||
| 485 | 0x00000d3e,0x00000c61,0x00000000,0x00050095, | ||
| 486 | 0x000000a8,0x00000d40,0x00000d3e,0x00000c5f, | ||
| 487 | 0x00050051,0x00000006,0x00000d41,0x00000d40, | ||
| 488 | 0x00000001,0x00050051,0x00000006,0x00000d42, | ||
| 489 | 0x00000d40,0x00000000,0x00050051,0x00000006, | ||
| 490 | 0x00000d45,0x00000c61,0x00000001,0x00050080, | ||
| 491 | 0x00000006,0x00000d47,0x00000d45,0x00000d41, | ||
| 492 | 0x00050050,0x00000007,0x00000d48,0x00000d42, | ||
| 493 | 0x00000d47,0x0004007c,0x00000014,0x00000d38, | ||
| 494 | 0x00000d48,0x00060041,0x000000d8,0x00000d2f, | ||
| 495 | 0x00000d38,0x000000d7,0x000000d7,0x0006003d, | ||
| 496 | 0x00000006,0x00000d30,0x00000d2f,0x00000002, | ||
| 497 | 0x00000004,0x000200f9,0x00000c64,0x000200f8, | ||
| 498 | 0x00000c63,0x000200f9,0x00000c64,0x000200f8, | ||
| 499 | 0x00000c64,0x000700f5,0x00000006,0x00002b35, | ||
| 500 | 0x00000d30,0x00000d1e,0x000000a3,0x00000c63, | ||
| 501 | 0x000300f7,0x00000c70,0x00000000,0x000400fa, | ||
| 502 | 0x00000c59,0x00000c67,0x00000c6f,0x000200f8, | ||
| 503 | 0x00000c67,0x00050041,0x000000fb,0x00000d4c, | ||
| 504 | 0x000000f9,0x00000305,0x0004003d,0x00000006, | ||
| 505 | 0x00000d4d,0x00000d4c,0x000500c7,0x00000006, | ||
| 506 | 0x00000d4e,0x00000d4d,0x000000ad,0x000500aa, | ||
| 507 | 0x0000002f,0x00000d4f,0x00000d4e,0x000000a3, | ||
| 508 | 0x000300f7,0x00000d54,0x00000000,0x000400fa, | ||
| 509 | 0x00000d4f,0x00000d50,0x00000d52,0x000200f8, | ||
| 510 | 0x00000d50,0x00050084,0x00000006,0x00000d5a, | ||
| 511 | 0x00000107,0x00000c4b,0x00050080,0x00000006, | ||
| 512 | 0x00000d5b,0x00000104,0x00000d5a,0x000200f9, | ||
| 513 | 0x00000d54,0x000200f8,0x00000d52,0x00050084, | ||
| 514 | 0x00000006,0x00000d60,0x00000115,0x00000c4b, | ||
| 515 | 0x00050080,0x00000006,0x00000d61,0x00000104, | ||
| 516 | 0x00000d60,0x000200f9,0x00000d54,0x000200f8, | ||
| 517 | 0x00000d54,0x000700f5,0x00000006,0x00002b36, | ||
| 518 | 0x00000d5b,0x00000d50,0x00000d61,0x00000d52, | ||
| 519 | 0x00050084,0x00000006,0x00000c6a,0x00000107, | ||
| 520 | 0x00000c56,0x00050080,0x00000006,0x00000c6b, | ||
| 521 | 0x00002b36,0x00000c6a,0x00050041,0x00000153, | ||
| 522 | 0x00000c6c,0x000000f9,0x00000151,0x0004003d, | ||
| 523 | 0x00000007,0x00000c6d,0x00000c6c,0x00050051, | ||
| 524 | 0x00000006,0x00000d78,0x00000c6d,0x00000000, | ||
| 525 | 0x00050095,0x000000a8,0x00000d7a,0x00000d78, | ||
| 526 | 0x00000c6b,0x00050051,0x00000006,0x00000d7b, | ||
| 527 | 0x00000d7a,0x00000001,0x00050051,0x00000006, | ||
| 528 | 0x00000d7c,0x00000d7a,0x00000000,0x00050051, | ||
| 529 | 0x00000006,0x00000d7f,0x00000c6d,0x00000001, | ||
| 530 | 0x00050080,0x00000006,0x00000d81,0x00000d7f, | ||
| 531 | 0x00000d7b,0x00050050,0x00000007,0x00000d82, | ||
| 532 | 0x00000d7c,0x00000d81,0x0004007c,0x00000014, | ||
| 533 | 0x00000d72,0x00000d82,0x00060041,0x000000d8, | ||
| 534 | 0x00000d69,0x00000d72,0x000000d7,0x000000d7, | ||
| 535 | 0x0006003d,0x00000006,0x00000d6a,0x00000d69, | ||
| 536 | 0x00000002,0x00000004,0x000200f9,0x00000c70, | ||
| 537 | 0x000200f8,0x00000c6f,0x000200f9,0x00000c70, | ||
| 538 | 0x000200f8,0x00000c70,0x000700f5,0x00000006, | ||
| 539 | 0x00002b37,0x00000d6a,0x00000d54,0x000000a3, | ||
| 540 | 0x00000c6f,0x00050041,0x000000fb,0x00000d86, | ||
| 541 | 0x000000f9,0x00000305,0x0004003d,0x00000006, | ||
| 542 | 0x00000d87,0x00000d86,0x00050084,0x00000006, | ||
| 543 | 0x00000d88,0x00000107,0x00000d87,0x000500c2, | ||
| 544 | 0x00000006,0x00000d89,0x00002b35,0x00000d88, | ||
| 545 | 0x000500c7,0x00000006,0x00000d8a,0x00000d89, | ||
| 546 | 0x000006ca,0x000200f9,0x00000c74,0x000200f8, | ||
| 547 | 0x00000c74,0x000700f5,0x00000006,0x00002b38, | ||
| 548 | 0x000000a3,0x00000c70,0x00000c84,0x00000c78, | ||
| 549 | 0x000500b0,0x0000002f,0x00000c77,0x00002b38, | ||
| 550 | 0x0000011c,0x000400f6,0x00000c85,0x00000c78, | ||
| 551 | 0x00000000,0x000400fa,0x00000c77,0x00000c78, | ||
| 552 | 0x00000c85,0x000200f8,0x00000c78,0x000500aa, | ||
| 553 | 0x0000002f,0x00000c7e,0x00002b38,0x00000d8a, | ||
| 554 | 0x000500a7,0x0000002f,0x00000c7f,0x00000c59, | ||
| 555 | 0x00000c7e,0x000600a9,0x00000006,0x00000c80, | ||
| 556 | 0x00000c7f,0x000000ad,0x000000a3,0x00060041, | ||
| 557 | 0x000006d6,0x00000c81,0x000007e2,0x00002b38, | ||
| 558 | 0x00000a0e,0x0003003e,0x00000c81,0x00000c80, | ||
| 559 | 0x00050080,0x00000006,0x00000c84,0x00002b38, | ||
| 560 | 0x00000151,0x000200f9,0x00000c74,0x000200f8, | ||
| 561 | 0x00000c85,0x000400e0,0x0000016d,0x0000016d, | ||
| 562 | 0x000006d8,0x000200f9,0x00000c86,0x000200f8, | ||
| 563 | 0x00000c86,0x000700f5,0x00000006,0x00002b39, | ||
| 564 | 0x000000ad,0x00000c85,0x00000cb7,0x00000cb5, | ||
| 565 | 0x000500b0,0x0000002f,0x00000c89,0x00002b39, | ||
| 566 | 0x00000104,0x000400f6,0x00000cb8,0x00000cb5, | ||
| 567 | 0x00000000,0x000400fa,0x00000c89,0x00000c8a, | ||
| 568 | 0x00000cb8,0x000200f8,0x00000c8a,0x000200f9, | ||
| 569 | 0x00000c8b,0x000200f8,0x00000c8b,0x000700f5, | ||
| 570 | 0x00000006,0x00002b46,0x000000a3,0x00000c8a, | ||
| 571 | 0x00000ca1,0x00000c9f,0x000500b0,0x0000002f, | ||
| 572 | 0x00000c8e,0x00002b46,0x0000011c,0x000400f6, | ||
| 573 | 0x00000ca2,0x00000c9f,0x00000000,0x000400fa, | ||
| 574 | 0x00000c8e,0x00000c8f,0x00000ca2,0x000200f8, | ||
| 575 | 0x00000c8f,0x000500ae,0x0000002f,0x00000c93, | ||
| 576 | 0x00000a0e,0x00002b39,0x000300f7,0x00000c9c, | ||
| 577 | 0x00000000,0x000400fa,0x00000c93,0x00000c94, | ||
| 578 | 0x00000c9b,0x000200f8,0x00000c94,0x00050082, | ||
| 579 | 0x00000006,0x00000c98,0x00000a0e,0x00002b39, | ||
| 580 | 0x00060041,0x000006d6,0x00000c99,0x000007e2, | ||
| 581 | 0x00002b46,0x00000c98,0x0004003d,0x00000006, | ||
| 582 | 0x00000c9a,0x00000c99,0x000200f9,0x00000c9c, | ||
| 583 | 0x000200f8,0x00000c9b,0x000200f9,0x00000c9c, | ||
| 584 | 0x000200f8,0x00000c9c,0x000700f5,0x00000006, | ||
| 585 | 0x00002b4a,0x00000c9a,0x00000c94,0x000000a3, | ||
| 586 | 0x00000c9b,0x00050041,0x00000009,0x00000c9e, | ||
| 587 | 0x00000c2a,0x00002b46,0x0003003e,0x00000c9e, | ||
| 588 | 0x00002b4a,0x000200f9,0x00000c9f,0x000200f8, | ||
| 589 | 0x00000c9f,0x00050080,0x00000006,0x00000ca1, | ||
| 590 | 0x00002b46,0x00000151,0x000200f9,0x00000c8b, | ||
| 591 | 0x000200f8,0x00000ca2,0x000400e0,0x0000016d, | ||
| 592 | 0x0000016d,0x000006d8,0x000200f9,0x00000ca3, | ||
| 593 | 0x000200f8,0x00000ca3,0x000700f5,0x00000006, | ||
| 594 | 0x00002b47,0x000000a3,0x00000ca2,0x00000cb3, | ||
| 595 | 0x00000ca7,0x000500b0,0x0000002f,0x00000ca6, | ||
| 596 | 0x00002b47,0x0000011c,0x000400f6,0x00000cb4, | ||
| 597 | 0x00000ca7,0x00000000,0x000400fa,0x00000ca6, | ||
| 598 | 0x00000ca7,0x00000cb4,0x000200f8,0x00000ca7, | ||
| 599 | 0x00050041,0x00000009,0x00000cab,0x00000c2a, | ||
| 600 | 0x00002b47,0x0004003d,0x00000006,0x00000cac, | ||
| 601 | 0x00000cab,0x00060041,0x000006d6,0x00000cad, | ||
| 602 | 0x000007e2,0x00002b47,0x00000a0e,0x0004003d, | ||
| 603 | 0x00000006,0x00000cae,0x00000cad,0x00050080, | ||
| 604 | 0x00000006,0x00000caf,0x00000cae,0x00000cac, | ||
| 605 | 0x0003003e,0x00000cad,0x00000caf,0x00050080, | ||
| 606 | 0x00000006,0x00000cb3,0x00002b47,0x00000151, | ||
| 607 | 0x000200f9,0x00000ca3,0x000200f8,0x00000cb4, | ||
| 608 | 0x000400e0,0x0000016d,0x0000016d,0x000006d8, | ||
| 609 | 0x000200f9,0x00000cb5,0x000200f8,0x00000cb5, | ||
| 610 | 0x000500c4,0x00000006,0x00000cb7,0x00002b39, | ||
| 611 | 0x00000151,0x000200f9,0x00000c86,0x000200f8, | ||
| 612 | 0x00000cb8,0x000300f7,0x00000cd4,0x00000000, | ||
| 613 | 0x000400fa,0x00000c59,0x00000cba,0x00000cd4, | ||
| 614 | 0x000200f8,0x00000cba,0x00050041,0x000006d6, | ||
| 615 | 0x00000cbc,0x00000789,0x00000d8a,0x0004003d, | ||
| 616 | 0x00000006,0x00000cbd,0x00000cbc,0x00060041, | ||
| 617 | 0x000006d6,0x00000cc0,0x000007e2,0x00000d8a, | ||
| 618 | 0x00000a0e,0x0004003d,0x00000006,0x00000cc1, | ||
| 619 | 0x00000cc0,0x00050080,0x00000006,0x00000cc2, | ||
| 620 | 0x00000cbd,0x00000cc1,0x00050082,0x00000006, | ||
| 621 | 0x00000cc3,0x00000cc2,0x000000ad,0x000500c7, | ||
| 622 | 0x00000006,0x00000d90,0x00000d87,0x000000ad, | ||
| 623 | 0x000500aa,0x0000002f,0x00000d91,0x00000d90, | ||
| 624 | 0x000000a3,0x000300f7,0x00000d96,0x00000000, | ||
| 625 | 0x000400fa,0x00000d91,0x00000d92,0x00000d94, | ||
| 626 | 0x000200f8,0x00000d92,0x00050084,0x00000006, | ||
| 627 | 0x00000d9c,0x0000010e,0x00000c4b,0x00050080, | ||
| 628 | 0x00000006,0x00000d9d,0x00000104,0x00000d9c, | ||
| 629 | 0x000200f9,0x00000d96,0x000200f8,0x00000d94, | ||
| 630 | 0x000200f9,0x00000d96,0x000200f8,0x00000d96, | ||
| 631 | 0x000700f5,0x00000006,0x00002b3a,0x00000d9d, | ||
| 632 | 0x00000d92,0x00000104,0x00000d94,0x00050084, | ||
| 633 | 0x00000006,0x00000cc6,0x00000107,0x00000cc3, | ||
| 634 | 0x00050080,0x00000006,0x00000cc7,0x00002b3a, | ||
| 635 | 0x00000cc6,0x00050041,0x00000153,0x00000cc8, | ||
| 636 | 0x000000f9,0x00000151,0x0004003d,0x00000007, | ||
| 637 | 0x00000cc9,0x00000cc8,0x00050051,0x00000006, | ||
| 638 | 0x00000db5,0x00000cc9,0x00000000,0x00050095, | ||
| 639 | 0x000000a8,0x00000db7,0x00000db5,0x00000cc7, | ||
| 640 | 0x00050051,0x00000006,0x00000db8,0x00000db7, | ||
| 641 | 0x00000001,0x00050051,0x00000006,0x00000db9, | ||
| 642 | 0x00000db7,0x00000000,0x00050051,0x00000006, | ||
| 643 | 0x00000dbc,0x00000cc9,0x00000001,0x00050080, | ||
| 644 | 0x00000006,0x00000dbe,0x00000dbc,0x00000db8, | ||
| 645 | 0x00050050,0x00000007,0x00000dbf,0x00000db9, | ||
| 646 | 0x00000dbe,0x0004007c,0x00000014,0x00000daf, | ||
| 647 | 0x00000dbf,0x00060041,0x000000d8,0x00000da7, | ||
| 648 | 0x00000daf,0x000000d7,0x000000d7,0x0005003e, | ||
| 649 | 0x00000da7,0x00002b35,0x00000002,0x00000004, | ||
| 650 | 0x000300f7,0x00000dcb,0x00000000,0x000400fa, | ||
| 651 | 0x00000d91,0x00000dc7,0x00000dc9,0x000200f8, | ||
| 652 | 0x00000dc7,0x00050084,0x00000006,0x00000dd1, | ||
| 653 | 0x00000115,0x00000c4b,0x00050080,0x00000006, | ||
| 654 | 0x00000dd2,0x00000104,0x00000dd1,0x000200f9, | ||
| 655 | 0x00000dcb,0x000200f8,0x00000dc9,0x00050084, | ||
| 656 | 0x00000006,0x00000dd7,0x00000107,0x00000c4b, | ||
| 657 | 0x00050080,0x00000006,0x00000dd8,0x00000104, | ||
| 658 | 0x00000dd7,0x000200f9,0x00000dcb,0x000200f8, | ||
| 659 | 0x00000dcb,0x000700f5,0x00000006,0x00002b3b, | ||
| 660 | 0x00000dd2,0x00000dc7,0x00000dd8,0x00000dc9, | ||
| 661 | 0x00050080,0x00000006,0x00000ccf,0x00002b3b, | ||
| 662 | 0x00000cc6,0x00050095,0x000000a8,0x00000df0, | ||
| 663 | 0x00000db5,0x00000ccf,0x00050051,0x00000006, | ||
| 664 | 0x00000df1,0x00000df0,0x00000001,0x00050051, | ||
| 665 | 0x00000006,0x00000df2,0x00000df0,0x00000000, | ||
| 666 | 0x00050080,0x00000006,0x00000df7,0x00000dbc, | ||
| 667 | 0x00000df1,0x00050050,0x00000007,0x00000df8, | ||
| 668 | 0x00000df2,0x00000df7,0x0004007c,0x00000014, | ||
| 669 | 0x00000de8,0x00000df8,0x00060041,0x000000d8, | ||
| 670 | 0x00000de0,0x00000de8,0x000000d7,0x000000d7, | ||
| 671 | 0x0005003e,0x00000de0,0x00002b37,0x00000002, | ||
| 672 | 0x00000004,0x000200f9,0x00000cd4,0x000200f8, | ||
| 673 | 0x00000cd4,0x000400e0,0x0000016d,0x0000016d, | ||
| 674 | 0x000006d8,0x000300f7,0x00000ce0,0x00000000, | ||
| 675 | 0x000400fa,0x00000c36,0x00000cd7,0x00000ce0, | ||
| 676 | 0x000200f8,0x00000cd7,0x00060041,0x000006d6, | ||
| 677 | 0x00000cda,0x000007e2,0x00000a0e,0x00000850, | ||
| 678 | 0x0004003d,0x00000006,0x00000cdb,0x00000cda, | ||
| 679 | 0x00050041,0x000006d6,0x00000cdc,0x00000789, | ||
| 680 | 0x00000a0e,0x0004003d,0x00000006,0x00000cdd, | ||
| 681 | 0x00000cdc,0x00050080,0x00000006,0x00000cde, | ||
| 682 | 0x00000cdd,0x00000cdb,0x0003003e,0x00000cdc, | ||
| 683 | 0x00000cde,0x000200f9,0x00000ce0,0x000200f8, | ||
| 684 | 0x00000ce0,0x000400e0,0x0000016d,0x0000016d, | ||
| 685 | 0x000006d8,0x000200f9,0x00000ce1,0x000200f8, | ||
| 686 | 0x00000ce1,0x00050080,0x00000006,0x00000ce3, | ||
| 687 | 0x00002b33,0x00000104,0x000200f9,0x00000c4e, | ||
| 688 | 0x000200f8,0x00000ce4,0x000200f9,0x00000a6e, | ||
| 689 | 0x000200f8,0x00000a08,0x000500aa,0x0000002f, | ||
| 690 | 0x00000a13,0x000009eb,0x00000236,0x000300f7, | ||
| 691 | 0x00000a15,0x00000000,0x000400fa,0x00000a13, | ||
| 692 | 0x00000a14,0x00000a15,0x000200f8,0x00000a14, | ||
| 693 | 0x000500aa,0x0000002f,0x00000a17,0x000009e9, | ||
| 694 | 0x000000a3,0x000300f7,0x00000a19,0x00000000, | ||
| 695 | 0x000400fa,0x00000a17,0x00000a18,0x00000a19, | ||
| 696 | 0x000200f8,0x00000a18,0x00050041,0x000000fb, | ||
| 697 | 0x00000e31,0x000000f9,0x00000305,0x0004003d, | ||
| 698 | 0x00000006,0x00000e32,0x00000e31,0x00050041, | ||
| 699 | 0x000000fb,0x00000e33,0x000000f9,0x000008bc, | ||
| 700 | 0x0004003d,0x00000006,0x00000e34,0x00000e33, | ||
| 701 | 0x00050080,0x00000006,0x00000e36,0x00000e34, | ||
| 702 | 0x00000e32,0x00050041,0x000000fb,0x00000ec7, | ||
| 703 | 0x000000f9,0x000000fa,0x0004003d,0x00000006, | ||
| 704 | 0x00000ec8,0x00000ec7,0x00050084,0x00000006, | ||
| 705 | 0x00000ec9,0x0000011c,0x00000ec8,0x00050080, | ||
| 706 | 0x00000006,0x00000eca,0x00000104,0x00000ec9, | ||
| 707 | 0x00050080,0x00000006,0x00000ed0,0x00000ec8, | ||
| 708 | 0x00002b67,0x00050086,0x00000006,0x00000ed1, | ||
| 709 | 0x00000ed0,0x000000fe,0x00050084,0x00000006, | ||
| 710 | 0x00000ec3,0x00000104,0x00000ed1,0x00050080, | ||
| 711 | 0x00000006,0x00000ec4,0x00000eca,0x00000ec3, | ||
| 712 | 0x00050084,0x00000006,0x00000e98,0x0000014d, | ||
| 713 | 0x00000e36,0x00050080,0x00000006,0x00000e99, | ||
| 714 | 0x00000ec4,0x00000e98,0x00050041,0x00000153, | ||
| 715 | 0x00000e9a,0x000000f9,0x00000151,0x0004003d, | ||
| 716 | 0x00000007,0x00000e9b,0x00000e9a,0x00050051, | ||
| 717 | 0x00000006,0x00000ee8,0x00000e9b,0x00000000, | ||
| 718 | 0x00050095,0x000000a8,0x00000eea,0x00000ee8, | ||
| 719 | 0x00000e99,0x00050051,0x00000006,0x00000eeb, | ||
| 720 | 0x00000eea,0x00000001,0x00050051,0x00000006, | ||
| 721 | 0x00000eec,0x00000eea,0x00000000,0x00050051, | ||
| 722 | 0x00000006,0x00000eef,0x00000e9b,0x00000001, | ||
| 723 | 0x00050080,0x00000006,0x00000ef1,0x00000eef, | ||
| 724 | 0x00000eeb,0x00050050,0x00000007,0x00000ef2, | ||
| 725 | 0x00000eec,0x00000ef1,0x0004007c,0x00000014, | ||
| 726 | 0x00000ee2,0x00000ef2,0x00060041,0x000000d8, | ||
| 727 | 0x00000ed9,0x00000ee2,0x000000d7,0x000000d7, | ||
| 728 | 0x0006003d,0x00000006,0x00000eda,0x00000ed9, | ||
| 729 | 0x00000002,0x00000004,0x00050080,0x00000006, | ||
| 730 | 0x00000ea0,0x00000e99,0x00000107,0x00050095, | ||
| 731 | 0x000000a8,0x00000f0b,0x00000ee8,0x00000ea0, | ||
| 732 | 0x00050051,0x00000006,0x00000f0c,0x00000f0b, | ||
| 733 | 0x00000001,0x00050051,0x00000006,0x00000f0d, | ||
| 734 | 0x00000f0b,0x00000000,0x00050080,0x00000006, | ||
| 735 | 0x00000f12,0x00000eef,0x00000f0c,0x00050050, | ||
| 736 | 0x00000007,0x00000f13,0x00000f0d,0x00000f12, | ||
| 737 | 0x0004007c,0x00000014,0x00000f03,0x00000f13, | ||
| 738 | 0x00060041,0x000000d8,0x00000efa,0x00000f03, | ||
| 739 | 0x000000d7,0x000000d7,0x0006003d,0x00000006, | ||
| 740 | 0x00000efb,0x00000efa,0x00000002,0x00000004, | ||
| 741 | 0x00050080,0x00000006,0x00000ea6,0x00000e99, | ||
| 742 | 0x0000010e,0x00050095,0x000000a8,0x00000f2c, | ||
| 743 | 0x00000ee8,0x00000ea6,0x00050051,0x00000006, | ||
| 744 | 0x00000f2d,0x00000f2c,0x00000001,0x00050051, | ||
| 745 | 0x00000006,0x00000f2e,0x00000f2c,0x00000000, | ||
| 746 | 0x00050080,0x00000006,0x00000f33,0x00000eef, | ||
| 747 | 0x00000f2d,0x00050050,0x00000007,0x00000f34, | ||
| 748 | 0x00000f2e,0x00000f33,0x0004007c,0x00000014, | ||
| 749 | 0x00000f24,0x00000f34,0x00060041,0x000000d8, | ||
| 750 | 0x00000f1b,0x00000f24,0x000000d7,0x000000d7, | ||
| 751 | 0x0006003d,0x00000006,0x00000f1c,0x00000f1b, | ||
| 752 | 0x00000002,0x00000004,0x00050080,0x00000006, | ||
| 753 | 0x00000ead,0x00000e99,0x00000115,0x00050095, | ||
| 754 | 0x000000a8,0x00000f4d,0x00000ee8,0x00000ead, | ||
| 755 | 0x00050051,0x00000006,0x00000f4e,0x00000f4d, | ||
| 756 | 0x00000001,0x00050051,0x00000006,0x00000f4f, | ||
| 757 | 0x00000f4d,0x00000000,0x00050080,0x00000006, | ||
| 758 | 0x00000f54,0x00000eef,0x00000f4e,0x00050050, | ||
| 759 | 0x00000007,0x00000f55,0x00000f4f,0x00000f54, | ||
| 760 | 0x0004007c,0x00000014,0x00000f45,0x00000f55, | ||
| 761 | 0x00060041,0x000000d8,0x00000f3c,0x00000f45, | ||
| 762 | 0x000000d7,0x000000d7,0x0006003d,0x00000006, | ||
| 763 | 0x00000f3d,0x00000f3c,0x00000002,0x00000004, | ||
| 764 | 0x00050080,0x00000006,0x00000eb3,0x00000e99, | ||
| 765 | 0x0000011c,0x00050095,0x000000a8,0x00000f6e, | ||
| 766 | 0x00000ee8,0x00000eb3,0x00050051,0x00000006, | ||
| 767 | 0x00000f6f,0x00000f6e,0x00000001,0x00050051, | ||
| 768 | 0x00000006,0x00000f70,0x00000f6e,0x00000000, | ||
| 769 | 0x00050080,0x00000006,0x00000f75,0x00000eef, | ||
| 770 | 0x00000f6f,0x00050050,0x00000007,0x00000f76, | ||
| 771 | 0x00000f70,0x00000f75,0x0004007c,0x00000014, | ||
| 772 | 0x00000f66,0x00000f76,0x00060041,0x000000d8, | ||
| 773 | 0x00000f5d,0x00000f66,0x000000d7,0x000000d7, | ||
| 774 | 0x0006003d,0x00000006,0x00000f5e,0x00000f5d, | ||
| 775 | 0x00000002,0x00000004,0x00050080,0x00000006, | ||
| 776 | 0x00000eb9,0x00000e99,0x00000186,0x00050095, | ||
| 777 | 0x000000a8,0x00000f8f,0x00000ee8,0x00000eb9, | ||
| 778 | 0x00050051,0x00000006,0x00000f90,0x00000f8f, | ||
| 779 | 0x00000001,0x00050051,0x00000006,0x00000f91, | ||
| 780 | 0x00000f8f,0x00000000,0x00050080,0x00000006, | ||
| 781 | 0x00000f96,0x00000eef,0x00000f90,0x00050050, | ||
| 782 | 0x00000007,0x00000f97,0x00000f91,0x00000f96, | ||
| 783 | 0x0004007c,0x00000014,0x00000f87,0x00000f97, | ||
| 784 | 0x00060041,0x000000d8,0x00000f7e,0x00000f87, | ||
| 785 | 0x000000d7,0x000000d7,0x0006003d,0x00000006, | ||
| 786 | 0x00000f7f,0x00000f7e,0x00000002,0x00000004, | ||
| 787 | 0x00050041,0x000000fb,0x00000e3a,0x000000f9, | ||
| 788 | 0x00000221,0x0004003d,0x00000006,0x00000e3b, | ||
| 789 | 0x00000e3a,0x000500ab,0x0000002f,0x00000e3c, | ||
| 790 | 0x00000e3b,0x000000a3,0x000600a9,0x00000006, | ||
| 791 | 0x00000e3d,0x00000e3c,0x000000a3,0x0000012d, | ||
| 792 | 0x000500c5,0x00000006,0x00000e3e,0x00000e3d, | ||
| 793 | 0x00000236,0x00050041,0x00000153,0x00000e3f, | ||
| 794 | 0x000000f9,0x000000d7,0x0004003d,0x00000007, | ||
| 795 | 0x00000e40,0x00000e3f,0x00050051,0x00000006, | ||
| 796 | 0x00000fad,0x00000e40,0x00000000,0x00050095, | ||
| 797 | 0x000000a8,0x00000faf,0x00000fad,0x000000a3, | ||
| 798 | 0x00050051,0x00000006,0x00000fb0,0x00000faf, | ||
| 799 | 0x00000001,0x00050051,0x00000006,0x00000fb1, | ||
| 800 | 0x00000faf,0x00000000,0x00050051,0x00000006, | ||
| 801 | 0x00000fb4,0x00000e40,0x00000001,0x00050080, | ||
| 802 | 0x00000006,0x00000fb6,0x00000fb4,0x00000fb0, | ||
| 803 | 0x00050050,0x00000007,0x00000fb7,0x00000fb1, | ||
| 804 | 0x00000fb6,0x0004007c,0x00000014,0x00000fa7, | ||
| 805 | 0x00000fb7,0x00060041,0x000000d8,0x00000f9f, | ||
| 806 | 0x00000fa7,0x000000d7,0x000000d7,0x0005003e, | ||
| 807 | 0x00000f9f,0x00000e3e,0x00000002,0x00000004, | ||
| 808 | 0x00050041,0x000000fb,0x00000e42,0x000000f9, | ||
| 809 | 0x0000096f,0x0004003d,0x00000006,0x00000e43, | ||
| 810 | 0x00000e42,0x00050086,0x00000006,0x00000e44, | ||
| 811 | 0x00000e43,0x00000104,0x00050095,0x000000a8, | ||
| 812 | 0x00000fcf,0x00000fad,0x00000107,0x00050051, | ||
| 813 | 0x00000006,0x00000fd0,0x00000fcf,0x00000001, | ||
| 814 | 0x00050051,0x00000006,0x00000fd1,0x00000fcf, | ||
| 815 | 0x00000000,0x00050080,0x00000006,0x00000fd6, | ||
| 816 | 0x00000fb4,0x00000fd0,0x00050050,0x00000007, | ||
| 817 | 0x00000fd7,0x00000fd1,0x00000fd6,0x0004007c, | ||
| 818 | 0x00000014,0x00000fc7,0x00000fd7,0x00060041, | ||
| 819 | 0x000000d8,0x00000fbf,0x00000fc7,0x000000d7, | ||
| 820 | 0x000000d7,0x0005003e,0x00000fbf,0x00000e44, | ||
| 821 | 0x00000002,0x00000004,0x00050095,0x000000a8, | ||
| 822 | 0x00000fef,0x00000fad,0x0000010e,0x00050051, | ||
| 823 | 0x00000006,0x00000ff0,0x00000fef,0x00000001, | ||
| 824 | 0x00050051,0x00000006,0x00000ff1,0x00000fef, | ||
| 825 | 0x00000000,0x00050080,0x00000006,0x00000ff6, | ||
| 826 | 0x00000fb4,0x00000ff0,0x00050050,0x00000007, | ||
| 827 | 0x00000ff7,0x00000ff1,0x00000ff6,0x0004007c, | ||
| 828 | 0x00000014,0x00000fe7,0x00000ff7,0x00060041, | ||
| 829 | 0x000000d8,0x00000fdf,0x00000fe7,0x000000d7, | ||
| 830 | 0x000000d7,0x0005003e,0x00000fdf,0x000000a3, | ||
| 831 | 0x00000002,0x00000004,0x00050095,0x000000a8, | ||
| 832 | 0x0000100f,0x00000fad,0x00000115,0x00050051, | ||
| 833 | 0x00000006,0x00001010,0x0000100f,0x00000001, | ||
| 834 | 0x00050051,0x00000006,0x00001011,0x0000100f, | ||
| 835 | 0x00000000,0x00050080,0x00000006,0x00001016, | ||
| 836 | 0x00000fb4,0x00001010,0x00050050,0x00000007, | ||
| 837 | 0x00001017,0x00001011,0x00001016,0x0004007c, | ||
| 838 | 0x00000014,0x00001007,0x00001017,0x00060041, | ||
| 839 | 0x000000d8,0x00000fff,0x00001007,0x000000d7, | ||
| 840 | 0x000000d7,0x0005003e,0x00000fff,0x00000e34, | ||
| 841 | 0x00000002,0x00000004,0x00050095,0x000000a8, | ||
| 842 | 0x00001038,0x00000fad,0x0000011c,0x00050051, | ||
| 843 | 0x00000006,0x00001039,0x00001038,0x00000001, | ||
| 844 | 0x00050051,0x00000006,0x0000103a,0x00001038, | ||
| 845 | 0x00000000,0x00050080,0x00000006,0x0000103f, | ||
| 846 | 0x00000fb4,0x00001039,0x00050050,0x00000007, | ||
| 847 | 0x00001040,0x0000103a,0x0000103f,0x0004007c, | ||
| 848 | 0x00000014,0x00001030,0x00001040,0x00060041, | ||
| 849 | 0x000000d8,0x00001028,0x00001030,0x000000d7, | ||
| 850 | 0x000000d7,0x0005003e,0x00001028,0x00000eda, | ||
| 851 | 0x00000002,0x00000004,0x00050095,0x000000a8, | ||
| 852 | 0x00001061,0x00000fad,0x00000186,0x00050051, | ||
| 853 | 0x00000006,0x00001062,0x00001061,0x00000001, | ||
| 854 | 0x00050051,0x00000006,0x00001063,0x00001061, | ||
| 855 | 0x00000000,0x00050080,0x00000006,0x00001068, | ||
| 856 | 0x00000fb4,0x00001062,0x00050050,0x00000007, | ||
| 857 | 0x00001069,0x00001063,0x00001068,0x0004007c, | ||
| 858 | 0x00000014,0x00001059,0x00001069,0x00060041, | ||
| 859 | 0x000000d8,0x00001051,0x00001059,0x000000d7, | ||
| 860 | 0x000000d7,0x0005003e,0x00001051,0x00000efb, | ||
| 861 | 0x00000002,0x00000004,0x00050095,0x000000a8, | ||
| 862 | 0x0000108a,0x00000fad,0x0000014d,0x00050051, | ||
| 863 | 0x00000006,0x0000108b,0x0000108a,0x00000001, | ||
| 864 | 0x00050051,0x00000006,0x0000108c,0x0000108a, | ||
| 865 | 0x00000000,0x00050080,0x00000006,0x00001091, | ||
| 866 | 0x00000fb4,0x0000108b,0x00050050,0x00000007, | ||
| 867 | 0x00001092,0x0000108c,0x00001091,0x0004007c, | ||
| 868 | 0x00000014,0x00001082,0x00001092,0x00060041, | ||
| 869 | 0x000000d8,0x0000107a,0x00001082,0x000000d7, | ||
| 870 | 0x000000d7,0x0005003e,0x0000107a,0x00000f1c, | ||
| 871 | 0x00000002,0x00000004,0x00050095,0x000000a8, | ||
| 872 | 0x000010b3,0x00000fad,0x00000460,0x00050051, | ||
| 873 | 0x00000006,0x000010b4,0x000010b3,0x00000001, | ||
| 874 | 0x00050051,0x00000006,0x000010b5,0x000010b3, | ||
| 875 | 0x00000000,0x00050080,0x00000006,0x000010ba, | ||
| 876 | 0x00000fb4,0x000010b4,0x00050050,0x00000007, | ||
| 877 | 0x000010bb,0x000010b5,0x000010ba,0x0004007c, | ||
| 878 | 0x00000014,0x000010ab,0x000010bb,0x00060041, | ||
| 879 | 0x000000d8,0x000010a3,0x000010ab,0x000000d7, | ||
| 880 | 0x000000d7,0x0005003e,0x000010a3,0x00000f3d, | ||
| 881 | 0x00000002,0x00000004,0x00050095,0x000000a8, | ||
| 882 | 0x000010dc,0x00000fad,0x00000466,0x00050051, | ||
| 883 | 0x00000006,0x000010dd,0x000010dc,0x00000001, | ||
| 884 | 0x00050051,0x00000006,0x000010de,0x000010dc, | ||
| 885 | 0x00000000,0x00050080,0x00000006,0x000010e3, | ||
| 886 | 0x00000fb4,0x000010dd,0x00050050,0x00000007, | ||
| 887 | 0x000010e4,0x000010de,0x000010e3,0x0004007c, | ||
| 888 | 0x00000014,0x000010d4,0x000010e4,0x00060041, | ||
| 889 | 0x000000d8,0x000010cc,0x000010d4,0x000000d7, | ||
| 890 | 0x000000d7,0x0005003e,0x000010cc,0x00000f5e, | ||
| 891 | 0x00000002,0x00000004,0x00050095,0x000000a8, | ||
| 892 | 0x00001105,0x00000fad,0x00000344,0x00050051, | ||
| 893 | 0x00000006,0x00001106,0x00001105,0x00000001, | ||
| 894 | 0x00050051,0x00000006,0x00001107,0x00001105, | ||
| 895 | 0x00000000,0x00050080,0x00000006,0x0000110c, | ||
| 896 | 0x00000fb4,0x00001106,0x00050050,0x00000007, | ||
| 897 | 0x0000110d,0x00001107,0x0000110c,0x0004007c, | ||
| 898 | 0x00000014,0x000010fd,0x0000110d,0x00060041, | ||
| 899 | 0x000000d8,0x000010f5,0x000010fd,0x000000d7, | ||
| 900 | 0x000000d7,0x0005003e,0x000010f5,0x00000f7f, | ||
| 901 | 0x00000002,0x00000004,0x00050041,0x000000fb, | ||
| 902 | 0x00000e70,0x000000f9,0x0000023b,0x0004003d, | ||
| 903 | 0x00000006,0x00000e71,0x00000e70,0x00050095, | ||
| 904 | 0x000000a8,0x00001125,0x00000fad,0x0000034f, | ||
| 905 | 0x00050051,0x00000006,0x00001126,0x00001125, | ||
| 906 | 0x00000001,0x00050051,0x00000006,0x00001127, | ||
| 907 | 0x00001125,0x00000000,0x00050080,0x00000006, | ||
| 908 | 0x0000112c,0x00000fb4,0x00001126,0x00050050, | ||
| 909 | 0x00000007,0x0000112d,0x00001127,0x0000112c, | ||
| 910 | 0x0004007c,0x00000014,0x0000111d,0x0000112d, | ||
| 911 | 0x00060041,0x000000d8,0x00001115,0x0000111d, | ||
| 912 | 0x000000d7,0x000000d7,0x0005003e,0x00001115, | ||
| 913 | 0x00000e71,0x00000002,0x00000004,0x00050095, | ||
| 914 | 0x000000a8,0x00001145,0x00000fad,0x0000035a, | ||
| 915 | 0x00050051,0x00000006,0x00001146,0x00001145, | ||
| 916 | 0x00000001,0x00050051,0x00000006,0x00001147, | ||
| 917 | 0x00001145,0x00000000,0x00050080,0x00000006, | ||
| 918 | 0x0000114c,0x00000fb4,0x00001146,0x00050050, | ||
| 919 | 0x00000007,0x0000114d,0x00001147,0x0000114c, | ||
| 920 | 0x0004007c,0x00000014,0x0000113d,0x0000114d, | ||
| 921 | 0x00060041,0x000000d8,0x00001135,0x0000113d, | ||
| 922 | 0x000000d7,0x000000d7,0x0005003e,0x00001135, | ||
| 923 | 0x000000a3,0x00000002,0x00000004,0x00050084, | ||
| 924 | 0x00000006,0x00001153,0x00000e32,0x00000225, | ||
| 925 | 0x00050080,0x00000006,0x00001154,0x00000e71, | ||
| 926 | 0x00001153,0x000500c2,0x00000006,0x00001155, | ||
| 927 | 0x00001154,0x00000230,0x000500c4,0x00000006, | ||
| 928 | 0x00001156,0x00001155,0x0000020a,0x000500c5, | ||
| 929 | 0x00000006,0x00001157,0x00001156,0x00000243, | ||
| 930 | 0x00050095,0x000000a8,0x0000116f,0x00000fad, | ||
| 931 | 0x00000365,0x00050051,0x00000006,0x00001170, | ||
| 932 | 0x0000116f,0x00000001,0x00050051,0x00000006, | ||
| 933 | 0x00001171,0x0000116f,0x00000000,0x00050080, | ||
| 934 | 0x00000006,0x00001176,0x00000fb4,0x00001170, | ||
| 935 | 0x00050050,0x00000007,0x00001177,0x00001171, | ||
| 936 | 0x00001176,0x0004007c,0x00000014,0x00001167, | ||
| 937 | 0x00001177,0x00060041,0x000000d8,0x0000115f, | ||
| 938 | 0x00001167,0x000000d7,0x000000d7,0x0005003e, | ||
| 939 | 0x0000115f,0x00001157,0x00000002,0x00000004, | ||
| 940 | 0x00050041,0x000000fb,0x00000e7d,0x000000f9, | ||
| 941 | 0x00000229,0x0004003d,0x00000006,0x00000e7e, | ||
| 942 | 0x00000e7d,0x00050095,0x000000a8,0x0000118f, | ||
| 943 | 0x00000fad,0x00000371,0x00050051,0x00000006, | ||
| 944 | 0x00001190,0x0000118f,0x00000001,0x00050051, | ||
| 945 | 0x00000006,0x00001191,0x0000118f,0x00000000, | ||
| 946 | 0x00050080,0x00000006,0x00001196,0x00000fb4, | ||
| 947 | 0x00001190,0x00050050,0x00000007,0x00001197, | ||
| 948 | 0x00001191,0x00001196,0x0004007c,0x00000014, | ||
| 949 | 0x00001187,0x00001197,0x00060041,0x000000d8, | ||
| 950 | 0x0000117f,0x00001187,0x000000d7,0x000000d7, | ||
| 951 | 0x0005003e,0x0000117f,0x00000e7e,0x00000002, | ||
| 952 | 0x00000004,0x00050041,0x000000fb,0x00000e82, | ||
| 953 | 0x000000f9,0x000008c7,0x0004003d,0x00000006, | ||
| 954 | 0x00000e83,0x00000e82,0x00050095,0x000000a8, | ||
| 955 | 0x000011af,0x00000fad,0x0000037b,0x00050051, | ||
| 956 | 0x00000006,0x000011b0,0x000011af,0x00000001, | ||
| 957 | 0x00050051,0x00000006,0x000011b1,0x000011af, | ||
| 958 | 0x00000000,0x00050080,0x00000006,0x000011b6, | ||
| 959 | 0x00000fb4,0x000011b0,0x00050050,0x00000007, | ||
| 960 | 0x000011b7,0x000011b1,0x000011b6,0x0004007c, | ||
| 961 | 0x00000014,0x000011a7,0x000011b7,0x00060041, | ||
| 962 | 0x000000d8,0x0000119f,0x000011a7,0x000000d7, | ||
| 963 | 0x000000d7,0x0005003e,0x0000119f,0x00000e83, | ||
| 964 | 0x00000002,0x00000004,0x00050095,0x000000a8, | ||
| 965 | 0x000011cf,0x00000fad,0x00000385,0x00050051, | ||
| 966 | 0x00000006,0x000011d0,0x000011cf,0x00000001, | ||
| 967 | 0x00050051,0x00000006,0x000011d1,0x000011cf, | ||
| 968 | 0x00000000,0x00050080,0x00000006,0x000011d6, | ||
| 969 | 0x00000fb4,0x000011d0,0x00050050,0x00000007, | ||
| 970 | 0x000011d7,0x000011d1,0x000011d6,0x0004007c, | ||
| 971 | 0x00000014,0x000011c7,0x000011d7,0x00060041, | ||
| 972 | 0x000000d8,0x000011bf,0x000011c7,0x000000d7, | ||
| 973 | 0x000000d7,0x0005003e,0x000011bf,0x000000a3, | ||
| 974 | 0x00000002,0x00000004,0x000200f9,0x00000a19, | ||
| 975 | 0x000200f8,0x00000a19,0x000200f9,0x00000a6e, | ||
| 976 | 0x000200f8,0x00000a15,0x00050041,0x000000fb, | ||
| 977 | 0x00000a1d,0x000000f9,0x000004d5,0x0004003d, | ||
| 978 | 0x00000006,0x00000a1e,0x00000a1d,0x000500ae, | ||
| 979 | 0x0000002f,0x00000a1f,0x000009e9,0x00000a1e, | ||
| 980 | 0x000300f7,0x00000a21,0x00000000,0x000400fa, | ||
| 981 | 0x00000a1f,0x00000a20,0x00000a21,0x000200f8, | ||
| 982 | 0x00000a20,0x000200f9,0x00000a6e,0x000200f8, | ||
| 983 | 0x00000a21,0x000500aa,0x0000002f,0x00000a25, | ||
| 984 | 0x000009eb,0x000000a3,0x000300f7,0x00000a27, | ||
| 985 | 0x00000000,0x000400fa,0x00000a25,0x00000a26, | ||
| 986 | 0x00000a48,0x000200f8,0x00000a26,0x00050041, | ||
| 987 | 0x000000fb,0x00000a28,0x000000f9,0x000008c7, | ||
| 988 | 0x0004003d,0x00000006,0x00000a29,0x00000a28, | ||
| 989 | 0x00050084,0x00000006,0x00000a2b,0x00000107, | ||
| 990 | 0x000009e9,0x00050080,0x00000006,0x00000a2c, | ||
| 991 | 0x00000a29,0x00000a2b,0x00050041,0x00000153, | ||
| 992 | 0x00000a2e,0x000000f9,0x000000d7,0x0004003d, | ||
| 993 | 0x00000007,0x00000a2f,0x00000a2e,0x00050051, | ||
| 994 | 0x00000006,0x000011ed,0x00000a2f,0x00000000, | ||
| 995 | 0x00050095,0x000000a8,0x000011ef,0x000011ed, | ||
| 996 | 0x00000a2c,0x00050051,0x00000006,0x000011f0, | ||
| 997 | 0x000011ef,0x00000001,0x00050051,0x00000006, | ||
| 998 | 0x000011f1,0x000011ef,0x00000000,0x00050051, | ||
| 999 | 0x00000006,0x000011f4,0x00000a2f,0x00000001, | ||
| 1000 | 0x00050080,0x00000006,0x000011f6,0x000011f4, | ||
| 1001 | 0x000011f0,0x00050050,0x00000007,0x000011f7, | ||
| 1002 | 0x000011f1,0x000011f6,0x0004007c,0x00000014, | ||
| 1003 | 0x000011e7,0x000011f7,0x00060041,0x000000d8, | ||
| 1004 | 0x000011df,0x000011e7,0x000000d7,0x000000d7, | ||
| 1005 | 0x0005003e,0x000011df,0x0000037d,0x00000002, | ||
| 1006 | 0x00000004,0x000500b0,0x0000002f,0x00000a34, | ||
| 1007 | 0x000009e9,0x000002b4,0x000300f7,0x00000a36, | ||
| 1008 | 0x00000000,0x000400fa,0x00000a34,0x00000a35, | ||
| 1009 | 0x00000a36,0x000200f8,0x00000a35,0x00050041, | ||
| 1010 | 0x00000153,0x00000a3a,0x000000f9,0x00000151, | ||
| 1011 | 0x0004003d,0x00000007,0x00000a3b,0x00000a3a, | ||
| 1012 | 0x00050051,0x00000006,0x0000120d,0x00000a3b, | ||
| 1013 | 0x00000000,0x00050095,0x000000a8,0x0000120f, | ||
| 1014 | 0x0000120d,0x00000a2b,0x00050051,0x00000006, | ||
| 1015 | 0x00001210,0x0000120f,0x00000001,0x00050051, | ||
| 1016 | 0x00000006,0x00001211,0x0000120f,0x00000000, | ||
| 1017 | 0x00050051,0x00000006,0x00001214,0x00000a3b, | ||
| 1018 | 0x00000001,0x00050080,0x00000006,0x00001216, | ||
| 1019 | 0x00001214,0x00001210,0x00050050,0x00000007, | ||
| 1020 | 0x00001217,0x00001211,0x00001216,0x0004007c, | ||
| 1021 | 0x00000014,0x00001207,0x00001217,0x00060041, | ||
| 1022 | 0x000000d8,0x000011ff,0x00001207,0x000000d7, | ||
| 1023 | 0x000000d7,0x0005003e,0x000011ff,0x0000037d, | ||
| 1024 | 0x00000002,0x00000004,0x00050080,0x00000006, | 889 | 0x00000002,0x00000004,0x00050080,0x00000006, |
| 1025 | 0x00000a41,0x00000115,0x00000a2b,0x00050095, | 890 | 0x00001042,0x00003254,0x00000107,0x000200f9, |
| 1026 | 0x000000a8,0x0000122f,0x0000120d,0x00000a41, | 891 | 0x00001026,0x000200f8,0x00001043,0x000200f9, |
| 1027 | 0x00050051,0x00000006,0x00001230,0x0000122f, | 892 | 0x00000bf3,0x000200f8,0x00000b3d,0x000500aa, |
| 1028 | 0x00000001,0x00050051,0x00000006,0x00001231, | 893 | 0x0000002f,0x00000b45,0x00000b13,0x00000239, |
| 1029 | 0x0000122f,0x00000000,0x00050080,0x00000006, | 894 | 0x000300f7,0x00000b47,0x00000000,0x000400fa, |
| 1030 | 0x00001236,0x00001214,0x00001230,0x00050050, | 895 | 0x00000b45,0x00000b46,0x00000b47,0x000200f8, |
| 1031 | 0x00000007,0x00001237,0x00001231,0x00001236, | 896 | 0x00000b46,0x000500aa,0x0000002f,0x00000b49, |
| 1032 | 0x0004007c,0x00000014,0x00001227,0x00001237, | 897 | 0x00000b11,0x000000a6,0x000300f7,0x00000b4b, |
| 1033 | 0x00060041,0x000000d8,0x0000121f,0x00001227, | 898 | 0x00000000,0x000400fa,0x00000b49,0x00000b4a, |
| 1034 | 0x000000d7,0x000000d7,0x0005003e,0x0000121f, | 899 | 0x00000b4b,0x000200f8,0x00000b4a,0x00050041, |
| 1035 | 0x000000a3,0x00000002,0x00000004,0x000200f9, | 900 | 0x000000fe,0x0000110e,0x000000fc,0x00000308, |
| 1036 | 0x00000a36,0x000200f8,0x00000a36,0x000200f9, | 901 | 0x0004003d,0x00000006,0x0000110f,0x0000110e, |
| 1037 | 0x00000a27,0x000200f8,0x00000a48,0x000500aa, | 902 | 0x00050041,0x000000fe,0x00001110,0x000000fc, |
| 1038 | 0x0000002f,0x00000a4b,0x000009eb,0x000000ad, | 903 | 0x0000096c,0x0004003d,0x00000006,0x00001111, |
| 1039 | 0x000300f7,0x00000a4d,0x00000000,0x000400fa, | 904 | 0x00001110,0x00050080,0x00000006,0x00001113, |
| 1040 | 0x00000a4b,0x00000a4c,0x00000a51,0x000200f8, | 905 | 0x00001111,0x0000110f,0x00050041,0x000000fe, |
| 1041 | 0x00000a4c,0x000200f9,0x00001267,0x000200f8, | 906 | 0x000011a4,0x000000fc,0x000000fd,0x0004003d, |
| 1042 | 0x00001267,0x000700f5,0x00000006,0x00002b1e, | 907 | 0x00000006,0x000011a5,0x000011a4,0x00050084, |
| 1043 | 0x000000a3,0x00000a4c,0x00001277,0x00001275, | 908 | 0x00000006,0x000011a6,0x0000011f,0x000011a5, |
| 1044 | 0x000500b0,0x0000002f,0x0000126a,0x00002b1e, | 909 | 0x00050080,0x00000006,0x000011a7,0x00000107, |
| 1045 | 0x000002b4,0x000400f6,0x00001278,0x00001275, | 910 | 0x000011a6,0x00050080,0x00000006,0x000011ad, |
| 1046 | 0x00000000,0x000400fa,0x0000126a,0x0000126b, | 911 | 0x000011a5,0x000032a8,0x00050086,0x00000006, |
| 1047 | 0x00001278,0x000200f8,0x0000126b,0x00050084, | 912 | 0x000011ae,0x000011ad,0x00000101,0x00050084, |
| 1048 | 0x00000006,0x0000126e,0x000002b4,0x000009e9, | 913 | 0x00000006,0x000011a0,0x00000107,0x000011ae, |
| 1049 | 0x00050080,0x00000006,0x00001270,0x0000126e, | 914 | 0x00050080,0x00000006,0x000011a1,0x000011a7, |
| 1050 | 0x00002b1e,0x000300f7,0x00001335,0x00000000, | 915 | 0x000011a0,0x00050084,0x00000006,0x00001175, |
| 1051 | 0x000300fb,0x000000a3,0x00001313,0x000200f8, | 916 | 0x00000150,0x00001113,0x00050080,0x00000006, |
| 1052 | 0x00001313,0x00050041,0x000000fb,0x00001314, | 917 | 0x00001176,0x000011a1,0x00001175,0x00050041, |
| 1053 | 0x000000f9,0x00000278,0x0004003d,0x00000006, | 918 | 0x00000156,0x00001177,0x000000fc,0x00000154, |
| 1054 | 0x00001315,0x00001314,0x000500aa,0x0000002f, | 919 | 0x0004003d,0x00000007,0x00001178,0x00001177, |
| 1055 | 0x00001316,0x00001315,0x000000a3,0x000300f7, | 920 | 0x00050051,0x00000006,0x000011c5,0x00001178, |
| 1056 | 0x00001319,0x00000000,0x000400fa,0x00001316, | 921 | 0x00000000,0x00050095,0x000000ab,0x000011c7, |
| 1057 | 0x00001317,0x00001319,0x000200f8,0x00001317, | 922 | 0x000011c5,0x00001176,0x00050051,0x00000006, |
| 1058 | 0x000200f9,0x00001335,0x000200f8,0x00001319, | 923 | 0x000011c8,0x000011c7,0x00000001,0x00050051, |
| 1059 | 0x000500aa,0x0000002f,0x0000131c,0x00001315, | 924 | 0x00000006,0x000011c9,0x000011c7,0x00000000, |
| 1060 | 0x0000016d,0x000300f7,0x00001323,0x00000000, | 925 | 0x00050051,0x00000006,0x000011cc,0x00001178, |
| 1061 | 0x000400fa,0x0000131c,0x0000131d,0x00001323, | 926 | 0x00000001,0x00050080,0x00000006,0x000011ce, |
| 1062 | 0x000200f8,0x0000131d,0x00050084,0x00000006, | 927 | 0x000011cc,0x000011c8,0x00050050,0x00000007, |
| 1063 | 0x0000131f,0x00000107,0x00001270,0x00050041, | 928 | 0x000011cf,0x000011c9,0x000011ce,0x0004007c, |
| 1064 | 0x00000153,0x00001320,0x000000f9,0x0000020a, | 929 | 0x00000014,0x000011bf,0x000011cf,0x00060041, |
| 1065 | 0x0004003d,0x00000007,0x00001321,0x00001320, | 930 | 0x000000db,0x000011b6,0x000011bf,0x000000da, |
| 1066 | 0x00050051,0x00000006,0x0000134d,0x00001321, | 931 | 0x000000da,0x0006003d,0x00000006,0x000011b7, |
| 1067 | 0x00000000,0x00050095,0x000000a8,0x0000134f, | 932 | 0x000011b6,0x00000002,0x00000004,0x00050080, |
| 1068 | 0x0000134d,0x0000131f,0x00050051,0x00000006, | 933 | 0x00000006,0x0000117d,0x00001176,0x0000010a, |
| 1069 | 0x00001350,0x0000134f,0x00000001,0x00050051, | 934 | 0x00050095,0x000000ab,0x000011e8,0x000011c5, |
| 1070 | 0x00000006,0x00001351,0x0000134f,0x00000000, | 935 | 0x0000117d,0x00050051,0x00000006,0x000011e9, |
| 1071 | 0x00050051,0x00000006,0x00001354,0x00001321, | 936 | 0x000011e8,0x00000001,0x00050051,0x00000006, |
| 1072 | 0x00000001,0x00050080,0x00000006,0x00001356, | 937 | 0x000011ea,0x000011e8,0x00000000,0x00050080, |
| 1073 | 0x00001354,0x00001350,0x00050050,0x00000007, | 938 | 0x00000006,0x000011ef,0x000011cc,0x000011e9, |
| 1074 | 0x00001357,0x00001351,0x00001356,0x0004007c, | 939 | 0x00050050,0x00000007,0x000011f0,0x000011ea, |
| 1075 | 0x00000014,0x00001347,0x00001357,0x00060041, | 940 | 0x000011ef,0x0004007c,0x00000014,0x000011e0, |
| 1076 | 0x000000d8,0x0000133e,0x00001347,0x000000d7, | 941 | 0x000011f0,0x00060041,0x000000db,0x000011d7, |
| 1077 | 0x000000d7,0x0006003d,0x00000006,0x0000133f, | 942 | 0x000011e0,0x000000da,0x000000da,0x0006003d, |
| 1078 | 0x0000133e,0x00000002,0x00000004,0x000200f9, | 943 | 0x00000006,0x000011d8,0x000011d7,0x00000002, |
| 1079 | 0x00001335,0x000200f8,0x00001323,0x000500c2, | 944 | 0x00000004,0x00050080,0x00000006,0x00001183, |
| 1080 | 0x00000006,0x00001325,0x00001270,0x00000151, | 945 | 0x00001176,0x00000111,0x00050095,0x000000ab, |
| 1081 | 0x00050084,0x00000006,0x00001326,0x00000107, | 946 | 0x00001209,0x000011c5,0x00001183,0x00050051, |
| 1082 | 0x00001325,0x00050041,0x00000153,0x00001327, | 947 | 0x00000006,0x0000120a,0x00001209,0x00000001, |
| 1083 | 0x000000f9,0x0000020a,0x0004003d,0x00000007, | 948 | 0x00050051,0x00000006,0x0000120b,0x00001209, |
| 1084 | 0x00001328,0x00001327,0x00050051,0x00000006, | 949 | 0x00000000,0x00050080,0x00000006,0x00001210, |
| 1085 | 0x0000136e,0x00001328,0x00000000,0x00050095, | 950 | 0x000011cc,0x0000120a,0x00050050,0x00000007, |
| 1086 | 0x000000a8,0x00001370,0x0000136e,0x00001326, | 951 | 0x00001211,0x0000120b,0x00001210,0x0004007c, |
| 1087 | 0x00050051,0x00000006,0x00001371,0x00001370, | 952 | 0x00000014,0x00001201,0x00001211,0x00060041, |
| 1088 | 0x00000001,0x00050051,0x00000006,0x00001372, | 953 | 0x000000db,0x000011f8,0x00001201,0x000000da, |
| 1089 | 0x00001370,0x00000000,0x00050051,0x00000006, | 954 | 0x000000da,0x0006003d,0x00000006,0x000011f9, |
| 1090 | 0x00001375,0x00001328,0x00000001,0x00050080, | 955 | 0x000011f8,0x00000002,0x00000004,0x00050080, |
| 1091 | 0x00000006,0x00001377,0x00001375,0x00001371, | 956 | 0x00000006,0x0000118a,0x00001176,0x00000118, |
| 1092 | 0x00050050,0x00000007,0x00001378,0x00001372, | 957 | 0x00050095,0x000000ab,0x0000122a,0x000011c5, |
| 1093 | 0x00001377,0x0004007c,0x00000014,0x00001368, | 958 | 0x0000118a,0x00050051,0x00000006,0x0000122b, |
| 1094 | 0x00001378,0x00060041,0x000000d8,0x0000135f, | 959 | 0x0000122a,0x00000001,0x00050051,0x00000006, |
| 1095 | 0x00001368,0x000000d7,0x000000d7,0x0006003d, | 960 | 0x0000122c,0x0000122a,0x00000000,0x00050080, |
| 1096 | 0x00000006,0x00001360,0x0000135f,0x00000002, | 961 | 0x00000006,0x00001231,0x000011cc,0x0000122b, |
| 1097 | 0x00000004,0x000500c7,0x00000006,0x0000132b, | 962 | 0x00050050,0x00000007,0x00001232,0x0000122c, |
| 1098 | 0x00001270,0x000000ad,0x000500ab,0x0000002f, | 963 | 0x00001231,0x0004007c,0x00000014,0x00001222, |
| 1099 | 0x0000132c,0x0000132b,0x000000a3,0x000300f7, | 964 | 0x00001232,0x00060041,0x000000db,0x00001219, |
| 1100 | 0x00001333,0x00000000,0x000400fa,0x0000132c, | 965 | 0x00001222,0x000000da,0x000000da,0x0006003d, |
| 1101 | 0x0000132d,0x00001330,0x000200f8,0x0000132d, | 966 | 0x00000006,0x0000121a,0x00001219,0x00000002, |
| 1102 | 0x000500c2,0x00000006,0x0000132f,0x00001360, | 967 | 0x00000004,0x00050080,0x00000006,0x00001190, |
| 1103 | 0x0000023b,0x000200f9,0x00001333,0x000200f8, | 968 | 0x00001176,0x0000011f,0x00050095,0x000000ab, |
| 1104 | 0x00001330,0x000500c7,0x00000006,0x00001332, | 969 | 0x0000124b,0x000011c5,0x00001190,0x00050051, |
| 1105 | 0x00001360,0x000002a0,0x000200f9,0x00001333, | 970 | 0x00000006,0x0000124c,0x0000124b,0x00000001, |
| 1106 | 0x000200f8,0x00001333,0x000700f5,0x00000006, | 971 | 0x00050051,0x00000006,0x0000124d,0x0000124b, |
| 1107 | 0x00002b28,0x0000132f,0x0000132d,0x00001332, | 972 | 0x00000000,0x00050080,0x00000006,0x00001252, |
| 1108 | 0x00001330,0x000200f9,0x00001335,0x000200f8, | 973 | 0x000011cc,0x0000124c,0x00050050,0x00000007, |
| 1109 | 0x00001335,0x000900f5,0x00000006,0x00002b29, | 974 | 0x00001253,0x0000124d,0x00001252,0x0004007c, |
| 1110 | 0x00001270,0x00001317,0x0000133f,0x0000131d, | 975 | 0x00000014,0x00001243,0x00001253,0x00060041, |
| 1111 | 0x00002b28,0x00001333,0x00050041,0x000000fb, | 976 | 0x000000db,0x0000123a,0x00001243,0x000000da, |
| 1112 | 0x00001389,0x000000f9,0x0000024d,0x0004003d, | 977 | 0x000000da,0x0006003d,0x00000006,0x0000123b, |
| 1113 | 0x00000006,0x0000138a,0x00001389,0x00050084, | 978 | 0x0000123a,0x00000002,0x00000004,0x00050080, |
| 1114 | 0x00000006,0x0000138b,0x00002b29,0x0000138a, | 979 | 0x00000006,0x00001196,0x00001176,0x00000189, |
| 1115 | 0x00050041,0x00000153,0x0000138c,0x000000f9, | 980 | 0x00050095,0x000000ab,0x0000126c,0x000011c5, |
| 1116 | 0x00000202,0x0004003d,0x00000007,0x0000138d, | 981 | 0x00001196,0x00050051,0x00000006,0x0000126d, |
| 1117 | 0x0000138c,0x00050051,0x00000006,0x000013a8, | 982 | 0x0000126c,0x00000001,0x00050051,0x00000006, |
| 1118 | 0x0000138d,0x00000000,0x00050095,0x000000a8, | 983 | 0x0000126e,0x0000126c,0x00000000,0x00050080, |
| 1119 | 0x000013aa,0x000013a8,0x0000138b,0x00050051, | 984 | 0x00000006,0x00001273,0x000011cc,0x0000126d, |
| 1120 | 0x00000006,0x000013ab,0x000013aa,0x00000001, | 985 | 0x00050050,0x00000007,0x00001274,0x0000126e, |
| 1121 | 0x00050051,0x00000006,0x000013ac,0x000013aa, | 986 | 0x00001273,0x0004007c,0x00000014,0x00001264, |
| 1122 | 0x00000000,0x00050051,0x00000006,0x000013af, | 987 | 0x00001274,0x00060041,0x000000db,0x0000125b, |
| 1123 | 0x0000138d,0x00000001,0x00050080,0x00000006, | 988 | 0x00001264,0x000000da,0x000000da,0x0006003d, |
| 1124 | 0x000013b1,0x000013af,0x000013ab,0x00050095, | 989 | 0x00000006,0x0000125c,0x0000125b,0x00000002, |
| 1125 | 0x000000a8,0x000013cb,0x000013ac,0x000000a3, | 990 | 0x00000004,0x00050041,0x000000fe,0x00001117, |
| 1126 | 0x00050051,0x00000006,0x000013cc,0x000013cb, | 991 | 0x000000fc,0x00000224,0x0004003d,0x00000006, |
| 1127 | 0x00000001,0x00050051,0x00000006,0x000013cd, | 992 | 0x00001118,0x00001117,0x000500ab,0x0000002f, |
| 1128 | 0x000013cb,0x00000000,0x00050080,0x00000006, | 993 | 0x00001119,0x00001118,0x000000a6,0x000600a9, |
| 1129 | 0x000013d2,0x000013b1,0x000013cc,0x00050050, | 994 | 0x00000006,0x0000111a,0x00001119,0x000000a6, |
| 1130 | 0x00000007,0x000013d3,0x000013cd,0x000013d2, | 995 | 0x00000130,0x000500c5,0x00000006,0x0000111b, |
| 1131 | 0x0004007c,0x00000014,0x000013c3,0x000013d3, | 996 | 0x0000111a,0x00000239,0x00050041,0x00000156, |
| 1132 | 0x00060041,0x000000d8,0x000013ba,0x000013c3, | 997 | 0x0000111c,0x000000fc,0x000000da,0x0004003d, |
| 1133 | 0x000000d7,0x000000d7,0x0006003d,0x00000006, | 998 | 0x00000007,0x0000111d,0x0000111c,0x00050051, |
| 1134 | 0x000013bb,0x000013ba,0x00000002,0x00000004, | 999 | 0x00000006,0x0000128a,0x0000111d,0x00000000, |
| 1135 | 0x0004007c,0x00000027,0x00001391,0x000013bb, | 1000 | 0x00050095,0x000000ab,0x0000128c,0x0000128a, |
| 1136 | 0x00050095,0x000000a8,0x000013ec,0x000013ac, | 1001 | 0x000000a6,0x00050051,0x00000006,0x0000128d, |
| 1137 | 0x00000107,0x00050051,0x00000006,0x000013ed, | 1002 | 0x0000128c,0x00000001,0x00050051,0x00000006, |
| 1138 | 0x000013ec,0x00000001,0x00050051,0x00000006, | 1003 | 0x0000128e,0x0000128c,0x00000000,0x00050051, |
| 1139 | 0x000013ee,0x000013ec,0x00000000,0x00050080, | 1004 | 0x00000006,0x00001291,0x0000111d,0x00000001, |
| 1140 | 0x00000006,0x000013f3,0x000013b1,0x000013ed, | 1005 | 0x00050080,0x00000006,0x00001293,0x00001291, |
| 1141 | 0x00050050,0x00000007,0x000013f4,0x000013ee, | 1006 | 0x0000128d,0x00050050,0x00000007,0x00001294, |
| 1142 | 0x000013f3,0x0004007c,0x00000014,0x000013e4, | 1007 | 0x0000128e,0x00001293,0x0004007c,0x00000014, |
| 1143 | 0x000013f4,0x00060041,0x000000d8,0x000013db, | 1008 | 0x00001284,0x00001294,0x00060041,0x000000db, |
| 1144 | 0x000013e4,0x000000d7,0x000000d7,0x0006003d, | 1009 | 0x0000127c,0x00001284,0x000000da,0x000000da, |
| 1145 | 0x00000006,0x000013dc,0x000013db,0x00000002, | 1010 | 0x0005003e,0x0000127c,0x0000111b,0x00000002, |
| 1146 | 0x00000004,0x0004007c,0x00000027,0x00001394, | 1011 | 0x00000004,0x00050041,0x000000fe,0x0000111f, |
| 1147 | 0x000013dc,0x00050041,0x000000fb,0x00001395, | 1012 | 0x000000fc,0x00000a97,0x0004003d,0x00000006, |
| 1148 | 0x000000f9,0x00000263,0x0004003d,0x00000006, | 1013 | 0x00001120,0x0000111f,0x00050086,0x00000006, |
| 1149 | 0x00001396,0x00001395,0x000500aa,0x0000002f, | 1014 | 0x00001121,0x00001120,0x00000107,0x00050095, |
| 1150 | 0x00001397,0x00001396,0x000000ad,0x000300f7, | 1015 | 0x000000ab,0x000012ac,0x0000128a,0x0000010a, |
| 1151 | 0x0000139d,0x00000000,0x000400fa,0x00001397, | 1016 | 0x00050051,0x00000006,0x000012ad,0x000012ac, |
| 1152 | 0x00001398,0x00001399,0x000200f8,0x00001398, | 1017 | 0x00000001,0x00050051,0x00000006,0x000012ae, |
| 1153 | 0x000200f9,0x0000139d,0x000200f8,0x00001399, | 1018 | 0x000012ac,0x00000000,0x00050080,0x00000006, |
| 1154 | 0x00050095,0x000000a8,0x0000140d,0x000013ac, | 1019 | 0x000012b3,0x00001291,0x000012ad,0x00050050, |
| 1155 | 0x0000010e,0x00050051,0x00000006,0x0000140e, | 1020 | 0x00000007,0x000012b4,0x000012ae,0x000012b3, |
| 1156 | 0x0000140d,0x00000001,0x00050051,0x00000006, | 1021 | 0x0004007c,0x00000014,0x000012a4,0x000012b4, |
| 1157 | 0x0000140f,0x0000140d,0x00000000,0x00050080, | 1022 | 0x00060041,0x000000db,0x0000129c,0x000012a4, |
| 1158 | 0x00000006,0x00001414,0x000013b1,0x0000140e, | 1023 | 0x000000da,0x000000da,0x0005003e,0x0000129c, |
| 1159 | 0x00050050,0x00000007,0x00001415,0x0000140f, | 1024 | 0x00001121,0x00000002,0x00000004,0x00050095, |
| 1160 | 0x00001414,0x0004007c,0x00000014,0x00001405, | 1025 | 0x000000ab,0x000012cc,0x0000128a,0x00000111, |
| 1161 | 0x00001415,0x00060041,0x000000d8,0x000013fc, | 1026 | 0x00050051,0x00000006,0x000012cd,0x000012cc, |
| 1162 | 0x00001405,0x000000d7,0x000000d7,0x0006003d, | 1027 | 0x00000001,0x00050051,0x00000006,0x000012ce, |
| 1163 | 0x00000006,0x000013fd,0x000013fc,0x00000002, | 1028 | 0x000012cc,0x00000000,0x00050080,0x00000006, |
| 1164 | 0x00000004,0x0004007c,0x00000027,0x0000139c, | 1029 | 0x000012d3,0x00001291,0x000012cd,0x00050050, |
| 1165 | 0x000013fd,0x000200f9,0x0000139d,0x000200f8, | 1030 | 0x00000007,0x000012d4,0x000012ce,0x000012d3, |
| 1166 | 0x0000139d,0x000700f5,0x00000027,0x00002b2a, | 1031 | 0x0004007c,0x00000014,0x000012c4,0x000012d4, |
| 1167 | 0x0000026a,0x00001398,0x0000139c,0x00001399, | 1032 | 0x00060041,0x000000db,0x000012bc,0x000012c4, |
| 1168 | 0x00060050,0x0000004b,0x000013a2,0x00001391, | 1033 | 0x000000da,0x000000da,0x0005003e,0x000012bc, |
| 1169 | 0x00001394,0x00002b2a,0x000300f7,0x0000145b, | 1034 | 0x000000a6,0x00000002,0x00000004,0x00050095, |
| 1170 | 0x00000000,0x000300fb,0x000000a3,0x00001427, | 1035 | 0x000000ab,0x000012ec,0x0000128a,0x00000118, |
| 1171 | 0x000200f8,0x00001427,0x00050041,0x00000153, | 1036 | 0x00050051,0x00000006,0x000012ed,0x000012ec, |
| 1172 | 0x00001428,0x000000f9,0x00000212,0x0004003d, | 1037 | 0x00000001,0x00050051,0x00000006,0x000012ee, |
| 1173 | 0x00000007,0x00001429,0x00001428,0x00050051, | 1038 | 0x000012ec,0x00000000,0x00050080,0x00000006, |
| 1174 | 0x00000006,0x00001460,0x00001429,0x00000000, | 1039 | 0x000012f3,0x00001291,0x000012ed,0x00050050, |
| 1175 | 0x000500aa,0x0000002f,0x00001461,0x00001460, | 1040 | 0x00000007,0x000012f4,0x000012ee,0x000012f3, |
| 1176 | 0x000000a3,0x000300f7,0x00001466,0x00000000, | 1041 | 0x0004007c,0x00000014,0x000012e4,0x000012f4, |
| 1177 | 0x000400fa,0x00001461,0x00001462,0x00001466, | 1042 | 0x00060041,0x000000db,0x000012dc,0x000012e4, |
| 1178 | 0x000200f8,0x00001462,0x00050051,0x00000006, | 1043 | 0x000000da,0x000000da,0x0005003e,0x000012dc, |
| 1179 | 0x00001464,0x00001429,0x00000001,0x000500aa, | 1044 | 0x00001111,0x00000002,0x00000004,0x00050095, |
| 1180 | 0x0000002f,0x00001465,0x00001464,0x000000a3, | 1045 | 0x000000ab,0x00001315,0x0000128a,0x0000011f, |
| 1181 | 0x000200f9,0x00001466,0x000200f8,0x00001466, | 1046 | 0x00050051,0x00000006,0x00001316,0x00001315, |
| 1182 | 0x000700f5,0x0000002f,0x00001467,0x00001461, | 1047 | 0x00000001,0x00050051,0x00000006,0x00001317, |
| 1183 | 0x00001427,0x00001465,0x00001462,0x000300f7, | 1048 | 0x00001315,0x00000000,0x00050080,0x00000006, |
| 1184 | 0x0000142d,0x00000000,0x000400fa,0x00001467, | 1049 | 0x0000131c,0x00001291,0x00001316,0x00050050, |
| 1185 | 0x0000142b,0x0000142d,0x000200f8,0x0000142b, | 1050 | 0x00000007,0x0000131d,0x00001317,0x0000131c, |
| 1186 | 0x000200f9,0x0000145b,0x000200f8,0x0000142d, | 1051 | 0x0004007c,0x00000014,0x0000130d,0x0000131d, |
| 1187 | 0x000200f9,0x0000142e,0x000200f8,0x0000142e, | 1052 | 0x00060041,0x000000db,0x00001305,0x0000130d, |
| 1188 | 0x000700f5,0x00000006,0x00002b2b,0x000000a3, | 1053 | 0x000000da,0x000000da,0x0005003e,0x00001305, |
| 1189 | 0x0000142d,0x00001458,0x00001432,0x000500b0, | 1054 | 0x000011b7,0x00000002,0x00000004,0x00050095, |
| 1190 | 0x0000002f,0x00001431,0x00002b2b,0x000002b4, | 1055 | 0x000000ab,0x0000133e,0x0000128a,0x00000189, |
| 1191 | 0x000400f6,0x00001459,0x00001432,0x00000000, | 1056 | 0x00050051,0x00000006,0x0000133f,0x0000133e, |
| 1192 | 0x000400fa,0x00001431,0x00001432,0x00001459, | 1057 | 0x00000001,0x00050051,0x00000006,0x00001340, |
| 1193 | 0x000200f8,0x00001432,0x00050084,0x00000006, | 1058 | 0x0000133e,0x00000000,0x00050080,0x00000006, |
| 1194 | 0x00001434,0x0000011c,0x00002b2b,0x00050095, | 1059 | 0x00001345,0x00001291,0x0000133f,0x00050050, |
| 1195 | 0x000000a8,0x00001480,0x00001460,0x00001434, | 1060 | 0x00000007,0x00001346,0x00001340,0x00001345, |
| 1196 | 0x00050051,0x00000006,0x00001481,0x00001480, | 1061 | 0x0004007c,0x00000014,0x00001336,0x00001346, |
| 1197 | 0x00000001,0x00050051,0x00000006,0x00001482, | 1062 | 0x00060041,0x000000db,0x0000132e,0x00001336, |
| 1198 | 0x00001480,0x00000000,0x00050051,0x00000006, | 1063 | 0x000000da,0x000000da,0x0005003e,0x0000132e, |
| 1199 | 0x00001485,0x00001429,0x00000001,0x00050080, | 1064 | 0x000011d8,0x00000002,0x00000004,0x00050095, |
| 1200 | 0x00000006,0x00001487,0x00001485,0x00001481, | 1065 | 0x000000ab,0x00001367,0x0000128a,0x00000150, |
| 1201 | 0x00050050,0x00000007,0x00001488,0x00001482, | 1066 | 0x00050051,0x00000006,0x00001368,0x00001367, |
| 1202 | 0x00001487,0x0004007c,0x00000014,0x00001478, | 1067 | 0x00000001,0x00050051,0x00000006,0x00001369, |
| 1203 | 0x00001488,0x00060041,0x000000d8,0x0000146f, | 1068 | 0x00001367,0x00000000,0x00050080,0x00000006, |
| 1204 | 0x00001478,0x000000d7,0x000000d7,0x0006003d, | 1069 | 0x0000136e,0x00001291,0x00001368,0x00050050, |
| 1205 | 0x00000006,0x00001470,0x0000146f,0x00000002, | 1070 | 0x00000007,0x0000136f,0x00001369,0x0000136e, |
| 1206 | 0x00000004,0x0004007c,0x00000027,0x00001439, | 1071 | 0x0004007c,0x00000014,0x0000135f,0x0000136f, |
| 1207 | 0x00001470,0x00050080,0x00000006,0x0000143b, | 1072 | 0x00060041,0x000000db,0x00001357,0x0000135f, |
| 1208 | 0x00001434,0x00000107,0x00050095,0x000000a8, | 1073 | 0x000000da,0x000000da,0x0005003e,0x00001357, |
| 1209 | 0x000014a1,0x00001460,0x0000143b,0x00050051, | 1074 | 0x000011f9,0x00000002,0x00000004,0x00050095, |
| 1210 | 0x00000006,0x000014a2,0x000014a1,0x00000001, | 1075 | 0x000000ab,0x00001390,0x0000128a,0x00000463, |
| 1211 | 0x00050051,0x00000006,0x000014a3,0x000014a1, | 1076 | 0x00050051,0x00000006,0x00001391,0x00001390, |
| 1212 | 0x00000000,0x00050080,0x00000006,0x000014a8, | 1077 | 0x00000001,0x00050051,0x00000006,0x00001392, |
| 1213 | 0x00001485,0x000014a2,0x00050050,0x00000007, | 1078 | 0x00001390,0x00000000,0x00050080,0x00000006, |
| 1214 | 0x000014a9,0x000014a3,0x000014a8,0x0004007c, | 1079 | 0x00001397,0x00001291,0x00001391,0x00050050, |
| 1215 | 0x00000014,0x00001499,0x000014a9,0x00060041, | 1080 | 0x00000007,0x00001398,0x00001392,0x00001397, |
| 1216 | 0x000000d8,0x00001490,0x00001499,0x000000d7, | 1081 | 0x0004007c,0x00000014,0x00001388,0x00001398, |
| 1217 | 0x000000d7,0x0006003d,0x00000006,0x00001491, | 1082 | 0x00060041,0x000000db,0x00001380,0x00001388, |
| 1218 | 0x00001490,0x00000002,0x00000004,0x0004007c, | 1083 | 0x000000da,0x000000da,0x0005003e,0x00001380, |
| 1219 | 0x00000027,0x0000143f,0x00001491,0x00050080, | 1084 | 0x0000121a,0x00000002,0x00000004,0x00050095, |
| 1220 | 0x00000006,0x00001441,0x00001434,0x0000010e, | 1085 | 0x000000ab,0x000013b9,0x0000128a,0x00000469, |
| 1221 | 0x00050095,0x000000a8,0x000014c2,0x00001460, | 1086 | 0x00050051,0x00000006,0x000013ba,0x000013b9, |
| 1222 | 0x00001441,0x00050051,0x00000006,0x000014c3, | 1087 | 0x00000001,0x00050051,0x00000006,0x000013bb, |
| 1223 | 0x000014c2,0x00000001,0x00050051,0x00000006, | 1088 | 0x000013b9,0x00000000,0x00050080,0x00000006, |
| 1224 | 0x000014c4,0x000014c2,0x00000000,0x00050080, | 1089 | 0x000013c0,0x00001291,0x000013ba,0x00050050, |
| 1225 | 0x00000006,0x000014c9,0x00001485,0x000014c3, | 1090 | 0x00000007,0x000013c1,0x000013bb,0x000013c0, |
| 1226 | 0x00050050,0x00000007,0x000014ca,0x000014c4, | 1091 | 0x0004007c,0x00000014,0x000013b1,0x000013c1, |
| 1227 | 0x000014c9,0x0004007c,0x00000014,0x000014ba, | 1092 | 0x00060041,0x000000db,0x000013a9,0x000013b1, |
| 1228 | 0x000014ca,0x00060041,0x000000d8,0x000014b1, | 1093 | 0x000000da,0x000000da,0x0005003e,0x000013a9, |
| 1229 | 0x000014ba,0x000000d7,0x000000d7,0x0006003d, | 1094 | 0x0000123b,0x00000002,0x00000004,0x00050095, |
| 1230 | 0x00000006,0x000014b2,0x000014b1,0x00000002, | 1095 | 0x000000ab,0x000013e2,0x0000128a,0x00000347, |
| 1231 | 0x00000004,0x0004007c,0x00000027,0x00001445, | 1096 | 0x00050051,0x00000006,0x000013e3,0x000013e2, |
| 1232 | 0x000014b2,0x00050080,0x00000006,0x00001447, | 1097 | 0x00000001,0x00050051,0x00000006,0x000013e4, |
| 1233 | 0x00001434,0x00000115,0x00050095,0x000000a8, | 1098 | 0x000013e2,0x00000000,0x00050080,0x00000006, |
| 1234 | 0x000014e3,0x00001460,0x00001447,0x00050051, | 1099 | 0x000013e9,0x00001291,0x000013e3,0x00050050, |
| 1235 | 0x00000006,0x000014e4,0x000014e3,0x00000001, | 1100 | 0x00000007,0x000013ea,0x000013e4,0x000013e9, |
| 1236 | 0x00050051,0x00000006,0x000014e5,0x000014e3, | 1101 | 0x0004007c,0x00000014,0x000013da,0x000013ea, |
| 1237 | 0x00000000,0x00050080,0x00000006,0x000014ea, | 1102 | 0x00060041,0x000000db,0x000013d2,0x000013da, |
| 1238 | 0x00001485,0x000014e4,0x00050050,0x00000007, | 1103 | 0x000000da,0x000000da,0x0005003e,0x000013d2, |
| 1239 | 0x000014eb,0x000014e5,0x000014ea,0x0004007c, | 1104 | 0x0000125c,0x00000002,0x00000004,0x00050041, |
| 1240 | 0x00000014,0x000014db,0x000014eb,0x00060041, | 1105 | 0x000000fe,0x0000114d,0x000000fc,0x0000023e, |
| 1241 | 0x000000d8,0x000014d2,0x000014db,0x000000d7, | 1106 | 0x0004003d,0x00000006,0x0000114e,0x0000114d, |
| 1242 | 0x000000d7,0x0006003d,0x00000006,0x000014d3, | 1107 | 0x00050095,0x000000ab,0x00001402,0x0000128a, |
| 1243 | 0x000014d2,0x00000002,0x00000004,0x0004007c, | 1108 | 0x00000352,0x00050051,0x00000006,0x00001403, |
| 1244 | 0x00000027,0x0000144b,0x000014d3,0x00070050, | 1109 | 0x00001402,0x00000001,0x00050051,0x00000006, |
| 1245 | 0x000002b9,0x0000144c,0x00001439,0x0000143f, | 1110 | 0x00001404,0x00001402,0x00000000,0x00050080, |
| 1246 | 0x00001445,0x0000144b,0x0008004f,0x0000004b, | 1111 | 0x00000006,0x00001409,0x00001291,0x00001403, |
| 1247 | 0x0000144f,0x0000144c,0x0000144c,0x00000000, | 1112 | 0x00050050,0x00000007,0x0000140a,0x00001404, |
| 1248 | 0x00000001,0x00000002,0x00050094,0x00000027, | 1113 | 0x00001409,0x0004007c,0x00000014,0x000013fa, |
| 1249 | 0x00001451,0x0000144f,0x000013a2,0x00050081, | 1114 | 0x0000140a,0x00060041,0x000000db,0x000013f2, |
| 1250 | 0x00000027,0x00001454,0x00001451,0x0000144b, | 1115 | 0x000013fa,0x000000da,0x000000da,0x0005003e, |
| 1251 | 0x00050041,0x00000028,0x00001455,0x00001424, | 1116 | 0x000013f2,0x0000114e,0x00000002,0x00000004, |
| 1252 | 0x00002b2b,0x0003003e,0x00001455,0x00001454, | 1117 | 0x00050095,0x000000ab,0x00001422,0x0000128a, |
| 1253 | 0x00050080,0x00000006,0x00001458,0x00002b2b, | 1118 | 0x0000035d,0x00050051,0x00000006,0x00001423, |
| 1254 | 0x00000151,0x000200f9,0x0000142e,0x000200f8, | 1119 | 0x00001422,0x00000001,0x00050051,0x00000006, |
| 1255 | 0x00001459,0x0004003d,0x0000004b,0x0000145a, | 1120 | 0x00001424,0x00001422,0x00000000,0x00050080, |
| 1256 | 0x00001424,0x000200f9,0x0000145b,0x000200f8, | 1121 | 0x00000006,0x00001429,0x00001291,0x00001423, |
| 1257 | 0x0000145b,0x000700f5,0x0000004b,0x00002b2c, | 1122 | 0x00050050,0x00000007,0x0000142a,0x00001424, |
| 1258 | 0x000013a2,0x0000142b,0x0000145a,0x00001459, | 1123 | 0x00001429,0x0004007c,0x00000014,0x0000141a, |
| 1259 | 0x00050041,0x0000004c,0x00001274,0x00001239, | 1124 | 0x0000142a,0x00060041,0x000000db,0x00001412, |
| 1260 | 0x00002b1e,0x0003003e,0x00001274,0x00002b2c, | 1125 | 0x0000141a,0x000000da,0x000000da,0x0005003e, |
| 1261 | 0x000200f9,0x00001275,0x000200f8,0x00001275, | 1126 | 0x00001412,0x000000a6,0x00000002,0x00000004, |
| 1262 | 0x00050080,0x00000006,0x00001277,0x00002b1e, | 1127 | 0x00050084,0x00000006,0x00001430,0x0000110f, |
| 1263 | 0x00000151,0x000200f9,0x00001267,0x000200f8, | 1128 | 0x00000228,0x00050080,0x00000006,0x00001431, |
| 1264 | 0x00001278,0x00050041,0x000000fb,0x00001279, | 1129 | 0x0000114e,0x00001430,0x000500c2,0x00000006, |
| 1265 | 0x000000f9,0x00000305,0x0004003d,0x00000006, | 1130 | 0x00001432,0x00001431,0x00000233,0x000500c4, |
| 1266 | 0x0000127a,0x00001279,0x00050080,0x00000006, | 1131 | 0x00000006,0x00001433,0x00001432,0x0000020d, |
| 1267 | 0x0000127c,0x0000127a,0x000009e9,0x00050041, | 1132 | 0x000500c5,0x00000006,0x00001434,0x00001433, |
| 1268 | 0x000000fb,0x0000127d,0x000000f9,0x00000229, | 1133 | 0x00000246,0x00050095,0x000000ab,0x0000144c, |
| 1269 | 0x0004003d,0x00000006,0x0000127e,0x0000127d, | 1134 | 0x0000128a,0x00000368,0x00050051,0x00000006, |
| 1270 | 0x00050084,0x00000006,0x00001280,0x00000104, | 1135 | 0x0000144d,0x0000144c,0x00000001,0x00050051, |
| 1271 | 0x0000127c,0x00050080,0x00000006,0x00001281, | 1136 | 0x00000006,0x0000144e,0x0000144c,0x00000000, |
| 1272 | 0x0000127e,0x00001280,0x000200f9,0x00001282, | 1137 | 0x00050080,0x00000006,0x00001453,0x00001291, |
| 1273 | 0x000200f8,0x00001282,0x000700f5,0x00000006, | 1138 | 0x0000144d,0x00050050,0x00000007,0x00001454, |
| 1274 | 0x00002b1f,0x000000a3,0x00001278,0x000012a9, | 1139 | 0x0000144e,0x00001453,0x0004007c,0x00000014, |
| 1275 | 0x00001286,0x000500b0,0x0000002f,0x00001285, | 1140 | 0x00001444,0x00001454,0x00060041,0x000000db, |
| 1276 | 0x00002b1f,0x000002b4,0x000400f6,0x000012aa, | 1141 | 0x0000143c,0x00001444,0x000000da,0x000000da, |
| 1277 | 0x00001286,0x00000000,0x000400fa,0x00001285, | 1142 | 0x0005003e,0x0000143c,0x00001434,0x00000002, |
| 1278 | 0x00001286,0x000012aa,0x000200f8,0x00001286, | 1143 | 0x00000004,0x00050041,0x000000fe,0x0000115a, |
| 1279 | 0x00050084,0x00000006,0x00001289,0x00000115, | 1144 | 0x000000fc,0x0000022c,0x0004003d,0x00000006, |
| 1280 | 0x00002b1f,0x00050080,0x00000006,0x0000128a, | 1145 | 0x0000115b,0x0000115a,0x00050095,0x000000ab, |
| 1281 | 0x00001281,0x00001289,0x00050041,0x00000153, | 1146 | 0x0000146c,0x0000128a,0x00000374,0x00050051, |
| 1282 | 0x0000128c,0x000000f9,0x000000d7,0x0004003d, | 1147 | 0x00000006,0x0000146d,0x0000146c,0x00000001, |
| 1283 | 0x00000007,0x0000128d,0x0000128c,0x00060041, | 1148 | 0x00050051,0x00000006,0x0000146e,0x0000146c, |
| 1284 | 0x00000028,0x0000128e,0x00001239,0x00002b1f, | 1149 | 0x00000000,0x00050080,0x00000006,0x00001473, |
| 1285 | 0x000000a3,0x0004003d,0x00000027,0x0000128f, | 1150 | 0x00001291,0x0000146d,0x00050050,0x00000007, |
| 1286 | 0x0000128e,0x0004007c,0x00000006,0x000014f1, | 1151 | 0x00001474,0x0000146e,0x00001473,0x0004007c, |
| 1287 | 0x0000128f,0x00050051,0x00000006,0x0000150a, | 1152 | 0x00000014,0x00001464,0x00001474,0x00060041, |
| 1288 | 0x0000128d,0x00000000,0x00050095,0x000000a8, | 1153 | 0x000000db,0x0000145c,0x00001464,0x000000da, |
| 1289 | 0x0000150c,0x0000150a,0x0000128a,0x00050051, | 1154 | 0x000000da,0x0005003e,0x0000145c,0x0000115b, |
| 1290 | 0x00000006,0x0000150d,0x0000150c,0x00000001, | 1155 | 0x00000002,0x00000004,0x00050041,0x000000fe, |
| 1291 | 0x00050051,0x00000006,0x0000150e,0x0000150c, | 1156 | 0x0000115f,0x000000fc,0x000009ef,0x0004003d, |
| 1292 | 0x00000000,0x00050051,0x00000006,0x00001511, | 1157 | 0x00000006,0x00001160,0x0000115f,0x00050095, |
| 1293 | 0x0000128d,0x00000001,0x00050080,0x00000006, | 1158 | 0x000000ab,0x0000148c,0x0000128a,0x0000037e, |
| 1294 | 0x00001513,0x00001511,0x0000150d,0x00050050, | 1159 | 0x00050051,0x00000006,0x0000148d,0x0000148c, |
| 1295 | 0x00000007,0x00001514,0x0000150e,0x00001513, | 1160 | 0x00000001,0x00050051,0x00000006,0x0000148e, |
| 1296 | 0x0004007c,0x00000014,0x00001504,0x00001514, | 1161 | 0x0000148c,0x00000000,0x00050080,0x00000006, |
| 1297 | 0x00060041,0x000000d8,0x000014fc,0x00001504, | 1162 | 0x00001493,0x00001291,0x0000148d,0x00050050, |
| 1298 | 0x000000d7,0x000000d7,0x0005003e,0x000014fc, | 1163 | 0x00000007,0x00001494,0x0000148e,0x00001493, |
| 1299 | 0x000014f1,0x00000002,0x00000004,0x00050080, | 1164 | 0x0004007c,0x00000014,0x00001484,0x00001494, |
| 1300 | 0x00000006,0x00001295,0x0000128a,0x00000107, | 1165 | 0x00060041,0x000000db,0x0000147c,0x00001484, |
| 1301 | 0x00060041,0x00000028,0x00001299,0x00001239, | 1166 | 0x000000da,0x000000da,0x0005003e,0x0000147c, |
| 1302 | 0x00002b1f,0x000000ad,0x0004003d,0x00000027, | 1167 | 0x00001160,0x00000002,0x00000004,0x00050095, |
| 1303 | 0x0000129a,0x00001299,0x0004007c,0x00000006, | 1168 | 0x000000ab,0x000014ac,0x0000128a,0x00000388, |
| 1304 | 0x0000151a,0x0000129a,0x00050095,0x000000a8, | 1169 | 0x00050051,0x00000006,0x000014ad,0x000014ac, |
| 1305 | 0x00001535,0x0000150a,0x00001295,0x00050051, | 1170 | 0x00000001,0x00050051,0x00000006,0x000014ae, |
| 1306 | 0x00000006,0x00001536,0x00001535,0x00000001, | 1171 | 0x000014ac,0x00000000,0x00050080,0x00000006, |
| 1307 | 0x00050051,0x00000006,0x00001537,0x00001535, | 1172 | 0x000014b3,0x00001291,0x000014ad,0x00050050, |
| 1308 | 0x00000000,0x00050080,0x00000006,0x0000153c, | 1173 | 0x00000007,0x000014b4,0x000014ae,0x000014b3, |
| 1309 | 0x00001511,0x00001536,0x00050050,0x00000007, | 1174 | 0x0004007c,0x00000014,0x000014a4,0x000014b4, |
| 1310 | 0x0000153d,0x00001537,0x0000153c,0x0004007c, | 1175 | 0x00060041,0x000000db,0x0000149c,0x000014a4, |
| 1311 | 0x00000014,0x0000152d,0x0000153d,0x00060041, | 1176 | 0x000000da,0x000000da,0x0005003e,0x0000149c, |
| 1312 | 0x000000d8,0x00001525,0x0000152d,0x000000d7, | 1177 | 0x000000a6,0x00000002,0x00000004,0x000200f9, |
| 1313 | 0x000000d7,0x0005003e,0x00001525,0x0000151a, | 1178 | 0x00000b4b,0x000200f8,0x00000b4b,0x000200f9, |
| 1314 | 0x00000002,0x00000004,0x00050080,0x00000006, | 1179 | 0x00000bf3,0x000200f8,0x00000b47,0x00050041, |
| 1315 | 0x000012a0,0x0000128a,0x0000010e,0x00060041, | 1180 | 0x000000fe,0x00000b4f,0x000000fc,0x000004d8, |
| 1316 | 0x00000028,0x000012a4,0x00001239,0x00002b1f, | 1181 | 0x0004003d,0x00000006,0x00000b50,0x00000b4f, |
| 1317 | 0x0000016d,0x0004003d,0x00000027,0x000012a5, | 1182 | 0x000500ae,0x0000002f,0x00000b51,0x00000b11, |
| 1318 | 0x000012a4,0x0004007c,0x00000006,0x00001543, | 1183 | 0x00000b50,0x000300f7,0x00000b53,0x00000000, |
| 1319 | 0x000012a5,0x00050095,0x000000a8,0x0000155e, | 1184 | 0x000400fa,0x00000b51,0x00000b52,0x00000b53, |
| 1320 | 0x0000150a,0x000012a0,0x00050051,0x00000006, | 1185 | 0x000200f8,0x00000b52,0x000200f9,0x00000bf3, |
| 1321 | 0x0000155f,0x0000155e,0x00000001,0x00050051, | 1186 | 0x000200f8,0x00000b53,0x000500aa,0x0000002f, |
| 1322 | 0x00000006,0x00001560,0x0000155e,0x00000000, | 1187 | 0x00000b58,0x00000b13,0x00000b57,0x000300f7, |
| 1323 | 0x00050080,0x00000006,0x00001565,0x00001511, | 1188 | 0x00000b5a,0x00000000,0x000400fa,0x00000b58, |
| 1324 | 0x0000155f,0x00050050,0x00000007,0x00001566, | 1189 | 0x00000b59,0x00000b5a,0x000200f8,0x00000b59, |
| 1325 | 0x00001560,0x00001565,0x0004007c,0x00000014, | 1190 | 0x000500aa,0x0000002f,0x00000b5c,0x00000b11, |
| 1326 | 0x00001556,0x00001566,0x00060041,0x000000d8, | 1191 | 0x000000a6,0x000300f7,0x00000b5e,0x00000000, |
| 1327 | 0x0000154e,0x00001556,0x000000d7,0x000000d7, | 1192 | 0x000400fa,0x00000b5c,0x00000b5d,0x00000b5e, |
| 1328 | 0x0005003e,0x0000154e,0x00001543,0x00000002, | 1193 | 0x000200f8,0x00000b5d,0x00050041,0x00000156, |
| 1329 | 0x00000004,0x00050080,0x00000006,0x000012a9, | 1194 | 0x00000b60,0x000000fc,0x00000205,0x0004003d, |
| 1330 | 0x00002b1f,0x00000151,0x000200f9,0x00001282, | 1195 | 0x00000007,0x00000b61,0x00000b60,0x00050051, |
| 1331 | 0x000200f8,0x000012aa,0x00050080,0x00000006, | 1196 | 0x00000006,0x000014cb,0x00000b61,0x00000000, |
| 1332 | 0x000012ac,0x00001281,0x00000344,0x00050041, | 1197 | 0x00050095,0x000000ab,0x000014cd,0x000014cb, |
| 1333 | 0x00000153,0x000012ad,0x000000f9,0x000000d7, | 1198 | 0x0000010a,0x00050051,0x00000006,0x000014ce, |
| 1334 | 0x0004003d,0x00000007,0x000012ae,0x000012ad, | 1199 | 0x000014cd,0x00000001,0x00050051,0x00000006, |
| 1335 | 0x00060041,0x00000028,0x000012af,0x00001239, | 1200 | 0x000014cf,0x000014cd,0x00000000,0x00050051, |
| 1336 | 0x00000202,0x000000a3,0x0004003d,0x00000027, | 1201 | 0x00000006,0x000014d2,0x00000b61,0x00000001, |
| 1337 | 0x000012b0,0x000012af,0x0004007c,0x00000006, | 1202 | 0x00050080,0x00000006,0x000014d4,0x000014d2, |
| 1338 | 0x0000156c,0x000012b0,0x00050051,0x00000006, | 1203 | 0x000014ce,0x00050050,0x00000007,0x000014d5, |
| 1339 | 0x00001585,0x000012ae,0x00000000,0x00050095, | 1204 | 0x000014cf,0x000014d4,0x0004007c,0x00000014, |
| 1340 | 0x000000a8,0x00001587,0x00001585,0x000012ac, | 1205 | 0x000014c5,0x000014d5,0x00060041,0x000000db, |
| 1341 | 0x00050051,0x00000006,0x00001588,0x00001587, | 1206 | 0x000014bc,0x000014c5,0x000000da,0x000000da, |
| 1342 | 0x00000001,0x00050051,0x00000006,0x00001589, | 1207 | 0x0006003d,0x00000006,0x000014bd,0x000014bc, |
| 1343 | 0x00001587,0x00000000,0x00050051,0x00000006, | 1208 | 0x00000002,0x00000004,0x00050084,0x00000006, |
| 1344 | 0x0000158c,0x000012ae,0x00000001,0x00050080, | 1209 | 0x00000b64,0x000014bd,0x00000107,0x00050041, |
| 1345 | 0x00000006,0x0000158e,0x0000158c,0x00001588, | 1210 | 0x00000156,0x00000b66,0x000000fc,0x000000da, |
| 1346 | 0x00050050,0x00000007,0x0000158f,0x00001589, | 1211 | 0x0004003d,0x00000007,0x00000b67,0x00000b66, |
| 1347 | 0x0000158e,0x0004007c,0x00000014,0x0000157f, | 1212 | 0x00050051,0x00000006,0x000014eb,0x00000b67, |
| 1348 | 0x0000158f,0x00060041,0x000000d8,0x00001577, | 1213 | 0x00000000,0x00050095,0x000000ab,0x000014ed, |
| 1349 | 0x0000157f,0x000000d7,0x000000d7,0x0005003e, | 1214 | 0x000014eb,0x000000a6,0x00050051,0x00000006, |
| 1350 | 0x00001577,0x0000156c,0x00000002,0x00000004, | 1215 | 0x000014ee,0x000014ed,0x00000001,0x00050051, |
| 1351 | 0x00050080,0x00000006,0x000012b3,0x00001281, | 1216 | 0x00000006,0x000014ef,0x000014ed,0x00000000, |
| 1352 | 0x0000034f,0x00060041,0x00000028,0x000012b6, | 1217 | 0x00050051,0x00000006,0x000014f2,0x00000b67, |
| 1353 | 0x00001239,0x00000202,0x000000ad,0x0004003d, | 1218 | 0x00000001,0x00050080,0x00000006,0x000014f4, |
| 1354 | 0x00000027,0x000012b7,0x000012b6,0x0004007c, | 1219 | 0x000014f2,0x000014ee,0x00050050,0x00000007, |
| 1355 | 0x00000006,0x00001595,0x000012b7,0x00050095, | 1220 | 0x000014f5,0x000014ef,0x000014f4,0x0004007c, |
| 1356 | 0x000000a8,0x000015b0,0x00001585,0x000012b3, | 1221 | 0x00000014,0x000014e5,0x000014f5,0x00060041, |
| 1357 | 0x00050051,0x00000006,0x000015b1,0x000015b0, | 1222 | 0x000000db,0x000014dd,0x000014e5,0x000000da, |
| 1358 | 0x00000001,0x00050051,0x00000006,0x000015b2, | 1223 | 0x000000da,0x0005003e,0x000014dd,0x00000b64, |
| 1359 | 0x000015b0,0x00000000,0x00050080,0x00000006, | 1224 | 0x00000002,0x00000004,0x00050095,0x000000ab, |
| 1360 | 0x000015b7,0x0000158c,0x000015b1,0x00050050, | 1225 | 0x0000150d,0x000014eb,0x0000010a,0x00050051, |
| 1361 | 0x00000007,0x000015b8,0x000015b2,0x000015b7, | 1226 | 0x00000006,0x0000150e,0x0000150d,0x00000001, |
| 1362 | 0x0004007c,0x00000014,0x000015a8,0x000015b8, | 1227 | 0x00050051,0x00000006,0x0000150f,0x0000150d, |
| 1363 | 0x00060041,0x000000d8,0x000015a0,0x000015a8, | 1228 | 0x00000000,0x00050080,0x00000006,0x00001514, |
| 1364 | 0x000000d7,0x000000d7,0x0005003e,0x000015a0, | 1229 | 0x000014f2,0x0000150e,0x00050050,0x00000007, |
| 1365 | 0x00001595,0x00000002,0x00000004,0x00050080, | 1230 | 0x00001515,0x0000150f,0x00001514,0x0004007c, |
| 1366 | 0x00000006,0x000012ba,0x00001281,0x0000035a, | 1231 | 0x00000014,0x00001505,0x00001515,0x00060041, |
| 1367 | 0x00060041,0x00000028,0x000012bd,0x00001239, | 1232 | 0x000000db,0x000014fd,0x00001505,0x000000da, |
| 1368 | 0x00000202,0x0000016d,0x0004003d,0x00000027, | 1233 | 0x000000da,0x0005003e,0x000014fd,0x000000a6, |
| 1369 | 0x000012be,0x000012bd,0x0004007c,0x00000006, | 1234 | 0x00000002,0x00000004,0x000200f9,0x00000b5e, |
| 1370 | 0x000015be,0x000012be,0x00050095,0x000000a8, | 1235 | 0x000200f8,0x00000b5e,0x000200f9,0x00000bf3, |
| 1371 | 0x000015d9,0x00001585,0x000012ba,0x00050051, | 1236 | 0x000200f8,0x00000b5a,0x000500aa,0x0000002f, |
| 1372 | 0x00000006,0x000015da,0x000015d9,0x00000001, | 1237 | 0x00000b74,0x00000b13,0x00000118,0x000300f7, |
| 1373 | 0x00050051,0x00000006,0x000015db,0x000015d9, | 1238 | 0x00000b76,0x00000000,0x000400fa,0x00000b74, |
| 1374 | 0x00000000,0x00050080,0x00000006,0x000015e0, | 1239 | 0x00000b75,0x00000b76,0x000200f8,0x00000b75, |
| 1375 | 0x0000158c,0x000015da,0x00050050,0x00000007, | 1240 | 0x00050084,0x00000006,0x00000b78,0x0000010a, |
| 1376 | 0x000015e1,0x000015db,0x000015e0,0x0004007c, | 1241 | 0x00000b11,0x00050041,0x00000156,0x00000b7a, |
| 1377 | 0x00000014,0x000015d1,0x000015e1,0x00060041, | 1242 | 0x000000fc,0x00000205,0x0004003d,0x00000007, |
| 1378 | 0x000000d8,0x000015c9,0x000015d1,0x000000d7, | 1243 | 0x00000b7b,0x00000b7a,0x00050051,0x00000006, |
| 1379 | 0x000000d7,0x0005003e,0x000015c9,0x000015be, | 1244 | 0x0000152c,0x00000b7b,0x00000000,0x00050095, |
| 1380 | 0x00000002,0x00000004,0x00050080,0x00000006, | 1245 | 0x000000ab,0x0000152e,0x0000152c,0x0000010a, |
| 1381 | 0x000012c1,0x00001281,0x00000365,0x00050041, | 1246 | 0x00050051,0x00000006,0x0000152f,0x0000152e, |
| 1382 | 0x000000fb,0x000012c4,0x000000f9,0x00000367, | 1247 | 0x00000001,0x00050051,0x00000006,0x00001530, |
| 1383 | 0x0004003d,0x00000006,0x000012c5,0x000012c4, | 1248 | 0x0000152e,0x00000000,0x00050051,0x00000006, |
| 1384 | 0x00050095,0x000000a8,0x000015f9,0x00001585, | 1249 | 0x00001533,0x00000b7b,0x00000001,0x00050080, |
| 1385 | 0x000012c1,0x00050051,0x00000006,0x000015fa, | 1250 | 0x00000006,0x00001535,0x00001533,0x0000152f, |
| 1386 | 0x000015f9,0x00000001,0x00050051,0x00000006, | 1251 | 0x00050050,0x00000007,0x00001536,0x00001530, |
| 1387 | 0x000015fb,0x000015f9,0x00000000,0x00050080, | 1252 | 0x00001535,0x0004007c,0x00000014,0x00001526, |
| 1388 | 0x00000006,0x00001600,0x0000158c,0x000015fa, | 1253 | 0x00001536,0x00060041,0x000000db,0x0000151d, |
| 1389 | 0x00050050,0x00000007,0x00001601,0x000015fb, | 1254 | 0x00001526,0x000000da,0x000000da,0x0006003d, |
| 1390 | 0x00001600,0x0004007c,0x00000014,0x000015f1, | 1255 | 0x00000006,0x0000151e,0x0000151d,0x00000002, |
| 1391 | 0x00001601,0x00060041,0x000000d8,0x000015e9, | 1256 | 0x00000004,0x00050084,0x00000006,0x00000b7e, |
| 1392 | 0x000015f1,0x000000d7,0x000000d7,0x0005003e, | 1257 | 0x0000151e,0x00000107,0x000500b0,0x0000002f, |
| 1393 | 0x000015e9,0x000012c5,0x00000002,0x00000004, | 1258 | 0x00000b7f,0x00000b78,0x00000b7e,0x000300f7, |
| 1394 | 0x00050080,0x00000006,0x000012c8,0x00001281, | 1259 | 0x00000b81,0x00000000,0x000400fa,0x00000b7f, |
| 1395 | 0x00000371,0x00050095,0x000000a8,0x00001619, | 1260 | 0x00000b80,0x00000b81,0x000200f8,0x00000b80, |
| 1396 | 0x00001585,0x000012c8,0x00050051,0x00000006, | 1261 | 0x00050095,0x000000ab,0x0000154f,0x0000152c, |
| 1397 | 0x0000161a,0x00001619,0x00000001,0x00050051, | 1262 | 0x00000b78,0x00050051,0x00000006,0x00001550, |
| 1398 | 0x00000006,0x0000161b,0x00001619,0x00000000, | 1263 | 0x0000154f,0x00000001,0x00050051,0x00000006, |
| 1399 | 0x00050080,0x00000006,0x00001620,0x0000158c, | 1264 | 0x00001551,0x0000154f,0x00000000,0x00050080, |
| 1400 | 0x0000161a,0x00050050,0x00000007,0x00001621, | 1265 | 0x00000006,0x00001556,0x00001533,0x00001550, |
| 1401 | 0x0000161b,0x00001620,0x0004007c,0x00000014, | 1266 | 0x00050050,0x00000007,0x00001557,0x00001551, |
| 1402 | 0x00001611,0x00001621,0x00060041,0x000000d8, | 1267 | 0x00001556,0x0004007c,0x00000014,0x00001547, |
| 1403 | 0x00001609,0x00001611,0x000000d7,0x000000d7, | 1268 | 0x00001557,0x00060041,0x000000db,0x0000153e, |
| 1404 | 0x0005003e,0x00001609,0x000009e9,0x00000002, | 1269 | 0x00001547,0x000000da,0x000000da,0x0006003d, |
| 1405 | 0x00000004,0x00050080,0x00000006,0x000012ce, | 1270 | 0x00000006,0x0000153f,0x0000153e,0x00000002, |
| 1406 | 0x00001281,0x0000037b,0x00050095,0x000000a8, | 1271 | 0x00000004,0x00050041,0x00000156,0x00000b8c, |
| 1407 | 0x00001639,0x00001585,0x000012ce,0x00050051, | 1272 | 0x000000fc,0x000000da,0x0004003d,0x00000007, |
| 1408 | 0x00000006,0x0000163a,0x00001639,0x00000001, | 1273 | 0x00000b8d,0x00000b8c,0x00050051,0x00000006, |
| 1409 | 0x00050051,0x00000006,0x0000163b,0x00001639, | 1274 | 0x0000156d,0x00000b8d,0x00000000,0x00050095, |
| 1410 | 0x00000000,0x00050080,0x00000006,0x00001640, | 1275 | 0x000000ab,0x0000156f,0x0000156d,0x00000b78, |
| 1411 | 0x0000158c,0x0000163a,0x00050050,0x00000007, | 1276 | 0x00050051,0x00000006,0x00001570,0x0000156f, |
| 1412 | 0x00001641,0x0000163b,0x00001640,0x0004007c, | 1277 | 0x00000001,0x00050051,0x00000006,0x00001571, |
| 1413 | 0x00000014,0x00001631,0x00001641,0x00060041, | 1278 | 0x0000156f,0x00000000,0x00050051,0x00000006, |
| 1414 | 0x000000d8,0x00001629,0x00001631,0x000000d7, | 1279 | 0x00001574,0x00000b8d,0x00000001,0x00050080, |
| 1415 | 0x000000d7,0x0005003e,0x00001629,0x0000037d, | 1280 | 0x00000006,0x00001576,0x00001574,0x00001570, |
| 1416 | 0x00000002,0x00000004,0x00050080,0x00000006, | 1281 | 0x00050050,0x00000007,0x00001577,0x00001571, |
| 1417 | 0x000012d3,0x00001281,0x00000385,0x00050095, | 1282 | 0x00001576,0x0004007c,0x00000014,0x00001567, |
| 1418 | 0x000000a8,0x00001659,0x00001585,0x000012d3, | 1283 | 0x00001577,0x00060041,0x000000db,0x0000155f, |
| 1419 | 0x00050051,0x00000006,0x0000165a,0x00001659, | 1284 | 0x00001567,0x000000da,0x000000da,0x0005003e, |
| 1420 | 0x00000001,0x00050051,0x00000006,0x0000165b, | 1285 | 0x0000155f,0x0000153f,0x00000002,0x00000004, |
| 1421 | 0x00001659,0x00000000,0x00050080,0x00000006, | 1286 | 0x000200f9,0x00000b81,0x000200f8,0x00000b81, |
| 1422 | 0x00001660,0x0000158c,0x0000165a,0x00050050, | 1287 | 0x000200f9,0x00000bf3,0x000200f8,0x00000b76, |
| 1423 | 0x00000007,0x00001661,0x0000165b,0x00001660, | 1288 | 0x000500aa,0x0000002f,0x00000b95,0x00000b13, |
| 1424 | 0x0004007c,0x00000014,0x00001651,0x00001661, | 1289 | 0x00000b94,0x000300f7,0x00000b97,0x00000000, |
| 1425 | 0x00060041,0x000000d8,0x00001649,0x00001651, | 1290 | 0x000400fa,0x00000b95,0x00000b96,0x00000ba7, |
| 1426 | 0x000000d7,0x000000d7,0x0005003e,0x00001649, | 1291 | 0x000200f8,0x00000b96,0x00050084,0x00000006, |
| 1427 | 0x00000387,0x00000002,0x00000004,0x00050041, | 1292 | 0x00000b99,0x0000010a,0x00000b11,0x00050041, |
| 1428 | 0x0000004c,0x000012d7,0x00001239,0x000000d7, | 1293 | 0x00000156,0x00000b9d,0x000000fc,0x00000205, |
| 1429 | 0x0004003d,0x0000004b,0x000012d8,0x000012d7, | 1294 | 0x0004003d,0x00000007,0x00000b9e,0x00000b9d, |
| 1430 | 0x0004009c,0x00000392,0x000012d9,0x000012d8, | 1295 | 0x00050051,0x00000006,0x0000158e,0x00000b9e, |
| 1431 | 0x0004009a,0x0000002f,0x000012da,0x000012d9, | 1296 | 0x00000000,0x00050095,0x000000ab,0x00001590, |
| 1432 | 0x000400a8,0x0000002f,0x000012db,0x000012da, | 1297 | 0x0000158e,0x00000b99,0x00050051,0x00000006, |
| 1433 | 0x000300f7,0x000012e1,0x00000000,0x000400fa, | 1298 | 0x00001591,0x00001590,0x00000001,0x00050051, |
| 1434 | 0x000012db,0x000012dc,0x000012e1,0x000200f8, | 1299 | 0x00000006,0x00001592,0x00001590,0x00000000, |
| 1435 | 0x000012dc,0x00050041,0x0000004c,0x000012dd, | 1300 | 0x00050051,0x00000006,0x00001595,0x00000b9e, |
| 1436 | 0x00001239,0x00000151,0x0004003d,0x0000004b, | 1301 | 0x00000001,0x00050080,0x00000006,0x00001597, |
| 1437 | 0x000012de,0x000012dd,0x0004009c,0x00000392, | 1302 | 0x00001595,0x00001591,0x00050050,0x00000007, |
| 1438 | 0x000012df,0x000012de,0x0004009a,0x0000002f, | 1303 | 0x00001598,0x00001592,0x00001597,0x0004007c, |
| 1439 | 0x000012e0,0x000012df,0x000200f9,0x000012e1, | 1304 | 0x00000014,0x00001588,0x00001598,0x00060041, |
| 1440 | 0x000200f8,0x000012e1,0x000700f5,0x0000002f, | 1305 | 0x000000db,0x0000157f,0x00001588,0x000000da, |
| 1441 | 0x000012e2,0x000012da,0x000012aa,0x000012e0, | 1306 | 0x000000da,0x0006003d,0x00000006,0x00001580, |
| 1442 | 0x000012dc,0x000400a8,0x0000002f,0x000012e3, | 1307 | 0x0000157f,0x00000002,0x00000004,0x00050041, |
| 1443 | 0x000012e2,0x000300f7,0x000012e9,0x00000000, | 1308 | 0x00000156,0x00000ba2,0x000000fc,0x000000da, |
| 1444 | 0x000400fa,0x000012e3,0x000012e4,0x000012e9, | 1309 | 0x0004003d,0x00000007,0x00000ba3,0x00000ba2, |
| 1445 | 0x000200f8,0x000012e4,0x00050041,0x0000004c, | 1310 | 0x00050051,0x00000006,0x000015ae,0x00000ba3, |
| 1446 | 0x000012e5,0x00001239,0x00000202,0x0004003d, | 1311 | 0x00000000,0x00050095,0x000000ab,0x000015b0, |
| 1447 | 0x0000004b,0x000012e6,0x000012e5,0x0004009c, | 1312 | 0x000015ae,0x00000b99,0x00050051,0x00000006, |
| 1448 | 0x00000392,0x000012e7,0x000012e6,0x0004009a, | 1313 | 0x000015b1,0x000015b0,0x00000001,0x00050051, |
| 1449 | 0x0000002f,0x000012e8,0x000012e7,0x000200f9, | 1314 | 0x00000006,0x000015b2,0x000015b0,0x00000000, |
| 1450 | 0x000012e9,0x000200f8,0x000012e9,0x000700f5, | 1315 | 0x00050051,0x00000006,0x000015b5,0x00000ba3, |
| 1451 | 0x0000002f,0x000012ea,0x000012e2,0x000012e1, | 1316 | 0x00000001,0x00050080,0x00000006,0x000015b7, |
| 1452 | 0x000012e8,0x000012e4,0x0004003d,0x0000004b, | 1317 | 0x000015b5,0x000015b1,0x00050050,0x00000007, |
| 1453 | 0x000012ec,0x000012d7,0x00050041,0x0000004c, | 1318 | 0x000015b8,0x000015b2,0x000015b7,0x0004007c, |
| 1454 | 0x000012ed,0x00001239,0x00000151,0x0004003d, | 1319 | 0x00000014,0x000015a8,0x000015b8,0x00060041, |
| 1455 | 0x0000004b,0x000012ee,0x000012ed,0x0007000c, | 1320 | 0x000000db,0x000015a0,0x000015a8,0x000000da, |
| 1456 | 0x0000004b,0x000012ef,0x00000001,0x00000025, | 1321 | 0x000000da,0x0005003e,0x000015a0,0x00001580, |
| 1457 | 0x000012ec,0x000012ee,0x00050041,0x0000004c, | 1322 | 0x00000002,0x00000004,0x000200f9,0x00000b97, |
| 1458 | 0x000012f0,0x00001239,0x00000202,0x0004003d, | 1323 | 0x000200f8,0x00000ba7,0x000500aa,0x0000002f, |
| 1459 | 0x0000004b,0x000012f1,0x000012f0,0x0007000c, | 1324 | 0x00000baa,0x00000b13,0x000000a6,0x000300f7, |
| 1460 | 0x0000004b,0x000012f2,0x00000001,0x00000025, | 1325 | 0x00000bac,0x00000000,0x000400fa,0x00000baa, |
| 1461 | 0x000012ef,0x000012f1,0x0004003d,0x0000004b, | 1326 | 0x00000bab,0x00000bcd,0x000200f8,0x00000bab, |
| 1462 | 0x000012f4,0x000012d7,0x0004003d,0x0000004b, | 1327 | 0x00050041,0x000000fe,0x00000bad,0x000000fc, |
| 1463 | 0x000012f6,0x000012ed,0x0007000c,0x0000004b, | 1328 | 0x000009ef,0x0004003d,0x00000006,0x00000bae, |
| 1464 | 0x000012f7,0x00000001,0x00000028,0x000012f4, | 1329 | 0x00000bad,0x00050084,0x00000006,0x00000bb0, |
| 1465 | 0x000012f6,0x0004003d,0x0000004b,0x000012f9, | 1330 | 0x0000010a,0x00000b11,0x00050080,0x00000006, |
| 1466 | 0x000012f0,0x0007000c,0x0000004b,0x000012fa, | 1331 | 0x00000bb1,0x00000bae,0x00000bb0,0x00050041, |
| 1467 | 0x00000001,0x00000028,0x000012f7,0x000012f9, | 1332 | 0x00000156,0x00000bb3,0x000000fc,0x000000da, |
| 1468 | 0x00060050,0x00000392,0x00002b68,0x000012ea, | 1333 | 0x0004003d,0x00000007,0x00000bb4,0x00000bb3, |
| 1469 | 0x000012ea,0x000012ea,0x000600a9,0x0000004b, | 1334 | 0x00050051,0x00000006,0x000015ce,0x00000bb4, |
| 1470 | 0x00002b69,0x00002b68,0x00002b66,0x000012fa, | 1335 | 0x00000000,0x00050095,0x000000ab,0x000015d0, |
| 1471 | 0x000600a9,0x0000004b,0x00002b6b,0x00002b68, | 1336 | 0x000015ce,0x00000bb1,0x00050051,0x00000006, |
| 1472 | 0x00002b64,0x000012f2,0x00050041,0x000000fb, | 1337 | 0x000015d1,0x000015d0,0x00000001,0x00050051, |
| 1473 | 0x000016ab,0x000000f9,0x000000fa,0x0004003d, | 1338 | 0x00000006,0x000015d2,0x000015d0,0x00000000, |
| 1474 | 0x00000006,0x000016ac,0x000016ab,0x00050084, | 1339 | 0x00050051,0x00000006,0x000015d5,0x00000bb4, |
| 1475 | 0x00000006,0x000016ad,0x0000011c,0x000016ac, | 1340 | 0x00000001,0x00050080,0x00000006,0x000015d7, |
| 1476 | 0x00050080,0x00000006,0x000016ae,0x00000104, | 1341 | 0x000015d5,0x000015d1,0x00050050,0x00000007, |
| 1477 | 0x000016ad,0x00050080,0x00000006,0x000016b4, | 1342 | 0x000015d8,0x000015d2,0x000015d7,0x0004007c, |
| 1478 | 0x000016ac,0x00002b67,0x00050086,0x00000006, | 1343 | 0x00000014,0x000015c8,0x000015d8,0x00060041, |
| 1479 | 0x000016b5,0x000016b4,0x000000fe,0x00050084, | 1344 | 0x000000db,0x000015c0,0x000015c8,0x000000da, |
| 1480 | 0x00000006,0x000016a7,0x00000104,0x000016b5, | 1345 | 0x000000da,0x0005003e,0x000015c0,0x00000380, |
| 1481 | 0x00050080,0x00000006,0x000016a8,0x000016ae, | 1346 | 0x00000002,0x00000004,0x000500b0,0x0000002f, |
| 1482 | 0x000016a7,0x00050084,0x00000006,0x00001678, | 1347 | 0x00000bb9,0x00000b11,0x000002b7,0x000300f7, |
| 1483 | 0x0000014d,0x0000127c,0x00050080,0x00000006, | 1348 | 0x00000bbb,0x00000000,0x000400fa,0x00000bb9, |
| 1484 | 0x00001679,0x000016a8,0x00001678,0x00050041, | 1349 | 0x00000bba,0x00000bbb,0x000200f8,0x00000bba, |
| 1485 | 0x00000153,0x0000167a,0x000000f9,0x00000151, | 1350 | 0x00050041,0x00000156,0x00000bbf,0x000000fc, |
| 1486 | 0x0004003d,0x00000007,0x0000167b,0x0000167a, | 1351 | 0x00000154,0x0004003d,0x00000007,0x00000bc0, |
| 1487 | 0x00050051,0x00000027,0x0000167e,0x00002b6b, | 1352 | 0x00000bbf,0x00050051,0x00000006,0x000015ee, |
| 1488 | 0x00000000,0x0004007c,0x00000006,0x000016bb, | 1353 | 0x00000bc0,0x00000000,0x00050095,0x000000ab, |
| 1489 | 0x0000167e,0x00050051,0x00000006,0x000016d4, | 1354 | 0x000015f0,0x000015ee,0x00000bb0,0x00050051, |
| 1490 | 0x0000167b,0x00000000,0x00050095,0x000000a8, | 1355 | 0x00000006,0x000015f1,0x000015f0,0x00000001, |
| 1491 | 0x000016d6,0x000016d4,0x00001679,0x00050051, | 1356 | 0x00050051,0x00000006,0x000015f2,0x000015f0, |
| 1492 | 0x00000006,0x000016d7,0x000016d6,0x00000001, | 1357 | 0x00000000,0x00050051,0x00000006,0x000015f5, |
| 1493 | 0x00050051,0x00000006,0x000016d8,0x000016d6, | 1358 | 0x00000bc0,0x00000001,0x00050080,0x00000006, |
| 1494 | 0x00000000,0x00050051,0x00000006,0x000016db, | 1359 | 0x000015f7,0x000015f5,0x000015f1,0x00050050, |
| 1495 | 0x0000167b,0x00000001,0x00050080,0x00000006, | 1360 | 0x00000007,0x000015f8,0x000015f2,0x000015f7, |
| 1496 | 0x000016dd,0x000016db,0x000016d7,0x00050050, | 1361 | 0x0004007c,0x00000014,0x000015e8,0x000015f8, |
| 1497 | 0x00000007,0x000016de,0x000016d8,0x000016dd, | 1362 | 0x00060041,0x000000db,0x000015e0,0x000015e8, |
| 1498 | 0x0004007c,0x00000014,0x000016ce,0x000016de, | 1363 | 0x000000da,0x000000da,0x0005003e,0x000015e0, |
| 1499 | 0x00060041,0x000000d8,0x000016c6,0x000016ce, | 1364 | 0x00000380,0x00000002,0x00000004,0x00050080, |
| 1500 | 0x000000d7,0x000000d7,0x0005003e,0x000016c6, | 1365 | 0x00000006,0x00000bc6,0x00000118,0x00000bb0, |
| 1501 | 0x000016bb,0x00000002,0x00000004,0x00050080, | 1366 | 0x00050095,0x000000ab,0x00001610,0x000015ee, |
| 1502 | 0x00000006,0x00001681,0x00001679,0x00000107, | 1367 | 0x00000bc6,0x00050051,0x00000006,0x00001611, |
| 1503 | 0x00050051,0x00000027,0x00001685,0x00002b6b, | 1368 | 0x00001610,0x00000001,0x00050051,0x00000006, |
| 1504 | 0x00000001,0x0004007c,0x00000006,0x000016e4, | 1369 | 0x00001612,0x00001610,0x00000000,0x00050080, |
| 1505 | 0x00001685,0x00050095,0x000000a8,0x000016ff, | 1370 | 0x00000006,0x00001617,0x000015f5,0x00001611, |
| 1506 | 0x000016d4,0x00001681,0x00050051,0x00000006, | 1371 | 0x00050050,0x00000007,0x00001618,0x00001612, |
| 1507 | 0x00001700,0x000016ff,0x00000001,0x00050051, | 1372 | 0x00001617,0x0004007c,0x00000014,0x00001608, |
| 1508 | 0x00000006,0x00001701,0x000016ff,0x00000000, | 1373 | 0x00001618,0x00060041,0x000000db,0x00001600, |
| 1509 | 0x00050080,0x00000006,0x00001706,0x000016db, | 1374 | 0x00001608,0x000000da,0x000000da,0x0005003e, |
| 1510 | 0x00001700,0x00050050,0x00000007,0x00001707, | 1375 | 0x00001600,0x000000a6,0x00000002,0x00000004, |
| 1511 | 0x00001701,0x00001706,0x0004007c,0x00000014, | 1376 | 0x000200f9,0x00000bbb,0x000200f8,0x00000bbb, |
| 1512 | 0x000016f7,0x00001707,0x00060041,0x000000d8, | 1377 | 0x000200f9,0x00000bac,0x000200f8,0x00000bcd, |
| 1513 | 0x000016ef,0x000016f7,0x000000d7,0x000000d7, | 1378 | 0x000500aa,0x0000002f,0x00000bd0,0x00000b13, |
| 1514 | 0x0005003e,0x000016ef,0x000016e4,0x00000002, | 1379 | 0x000000b0,0x000300f7,0x00000bd2,0x00000000, |
| 1515 | 0x00000004,0x00050080,0x00000006,0x00001688, | 1380 | 0x000400fa,0x00000bd0,0x00000bd1,0x00000bd6, |
| 1516 | 0x00001679,0x0000010e,0x00050051,0x00000027, | 1381 | 0x000200f8,0x00000bd1,0x000200f9,0x00001648, |
| 1517 | 0x0000168c,0x00002b6b,0x00000002,0x0004007c, | 1382 | 0x000200f8,0x00001648,0x000700f5,0x00000006, |
| 1518 | 0x00000006,0x0000170d,0x0000168c,0x00050095, | 1383 | 0x0000323a,0x000000a6,0x00000bd1,0x00001658, |
| 1519 | 0x000000a8,0x00001728,0x000016d4,0x00001688, | 1384 | 0x00001656,0x000500b0,0x0000002f,0x0000164b, |
| 1520 | 0x00050051,0x00000006,0x00001729,0x00001728, | 1385 | 0x0000323a,0x000002b7,0x000400f6,0x00001659, |
| 1521 | 0x00000001,0x00050051,0x00000006,0x0000172a, | 1386 | 0x00001656,0x00000000,0x000400fa,0x0000164b, |
| 1522 | 0x00001728,0x00000000,0x00050080,0x00000006, | 1387 | 0x0000164c,0x00001659,0x000200f8,0x0000164c, |
| 1523 | 0x0000172f,0x000016db,0x00001729,0x00050050, | 1388 | 0x00050084,0x00000006,0x0000164f,0x000002b7, |
| 1524 | 0x00000007,0x00001730,0x0000172a,0x0000172f, | 1389 | 0x00000b11,0x00050080,0x00000006,0x00001651, |
| 1525 | 0x0004007c,0x00000014,0x00001720,0x00001730, | 1390 | 0x0000164f,0x0000323a,0x000300f7,0x00001716, |
| 1526 | 0x00060041,0x000000d8,0x00001718,0x00001720, | 1391 | 0x00000000,0x000300fb,0x000000a6,0x000016f4, |
| 1527 | 0x000000d7,0x000000d7,0x0005003e,0x00001718, | 1392 | 0x000200f8,0x000016f4,0x00050041,0x000000fe, |
| 1528 | 0x0000170d,0x00000002,0x00000004,0x00050080, | 1393 | 0x000016f5,0x000000fc,0x0000027b,0x0004003d, |
| 1529 | 0x00000006,0x0000168f,0x00001679,0x00000115, | 1394 | 0x00000006,0x000016f6,0x000016f5,0x000500aa, |
| 1530 | 0x00050051,0x00000027,0x00001693,0x00002b69, | 1395 | 0x0000002f,0x000016f7,0x000016f6,0x000000a6, |
| 1531 | 0x00000000,0x0004007c,0x00000006,0x00001736, | 1396 | 0x000300f7,0x000016fa,0x00000000,0x000400fa, |
| 1532 | 0x00001693,0x00050095,0x000000a8,0x00001751, | 1397 | 0x000016f7,0x000016f8,0x000016fa,0x000200f8, |
| 1533 | 0x000016d4,0x0000168f,0x00050051,0x00000006, | 1398 | 0x000016f8,0x000200f9,0x00001716,0x000200f8, |
| 1534 | 0x00001752,0x00001751,0x00000001,0x00050051, | 1399 | 0x000016fa,0x000500aa,0x0000002f,0x000016fd, |
| 1535 | 0x00000006,0x00001753,0x00001751,0x00000000, | 1400 | 0x000016f6,0x00000170,0x000300f7,0x00001704, |
| 1536 | 0x00050080,0x00000006,0x00001758,0x000016db, | 1401 | 0x00000000,0x000400fa,0x000016fd,0x000016fe, |
| 1402 | 0x00001704,0x000200f8,0x000016fe,0x00050084, | ||
| 1403 | 0x00000006,0x00001700,0x0000010a,0x00001651, | ||
| 1404 | 0x00050041,0x00000156,0x00001701,0x000000fc, | ||
| 1405 | 0x0000020d,0x0004003d,0x00000007,0x00001702, | ||
| 1406 | 0x00001701,0x00050051,0x00000006,0x0000172e, | ||
| 1407 | 0x00001702,0x00000000,0x00050095,0x000000ab, | ||
| 1408 | 0x00001730,0x0000172e,0x00001700,0x00050051, | ||
| 1409 | 0x00000006,0x00001731,0x00001730,0x00000001, | ||
| 1410 | 0x00050051,0x00000006,0x00001732,0x00001730, | ||
| 1411 | 0x00000000,0x00050051,0x00000006,0x00001735, | ||
| 1412 | 0x00001702,0x00000001,0x00050080,0x00000006, | ||
| 1413 | 0x00001737,0x00001735,0x00001731,0x00050050, | ||
| 1414 | 0x00000007,0x00001738,0x00001732,0x00001737, | ||
| 1415 | 0x0004007c,0x00000014,0x00001728,0x00001738, | ||
| 1416 | 0x00060041,0x000000db,0x0000171f,0x00001728, | ||
| 1417 | 0x000000da,0x000000da,0x0006003d,0x00000006, | ||
| 1418 | 0x00001720,0x0000171f,0x00000002,0x00000004, | ||
| 1419 | 0x000200f9,0x00001716,0x000200f8,0x00001704, | ||
| 1420 | 0x000500c2,0x00000006,0x00001706,0x00001651, | ||
| 1421 | 0x00000154,0x00050084,0x00000006,0x00001707, | ||
| 1422 | 0x0000010a,0x00001706,0x00050041,0x00000156, | ||
| 1423 | 0x00001708,0x000000fc,0x0000020d,0x0004003d, | ||
| 1424 | 0x00000007,0x00001709,0x00001708,0x00050051, | ||
| 1425 | 0x00000006,0x0000174f,0x00001709,0x00000000, | ||
| 1426 | 0x00050095,0x000000ab,0x00001751,0x0000174f, | ||
| 1427 | 0x00001707,0x00050051,0x00000006,0x00001752, | ||
| 1428 | 0x00001751,0x00000001,0x00050051,0x00000006, | ||
| 1429 | 0x00001753,0x00001751,0x00000000,0x00050051, | ||
| 1430 | 0x00000006,0x00001756,0x00001709,0x00000001, | ||
| 1431 | 0x00050080,0x00000006,0x00001758,0x00001756, | ||
| 1537 | 0x00001752,0x00050050,0x00000007,0x00001759, | 1432 | 0x00001752,0x00050050,0x00000007,0x00001759, |
| 1538 | 0x00001753,0x00001758,0x0004007c,0x00000014, | 1433 | 0x00001753,0x00001758,0x0004007c,0x00000014, |
| 1539 | 0x00001749,0x00001759,0x00060041,0x000000d8, | 1434 | 0x00001749,0x00001759,0x00060041,0x000000db, |
| 1540 | 0x00001741,0x00001749,0x000000d7,0x000000d7, | 1435 | 0x00001740,0x00001749,0x000000da,0x000000da, |
| 1541 | 0x0005003e,0x00001741,0x00001736,0x00000002, | 1436 | 0x0006003d,0x00000006,0x00001741,0x00001740, |
| 1542 | 0x00000004,0x00050080,0x00000006,0x00001696, | 1437 | 0x00000002,0x00000004,0x000500c7,0x00000006, |
| 1543 | 0x00001679,0x0000011c,0x00050051,0x00000027, | 1438 | 0x0000170c,0x00001651,0x000000b0,0x000500ab, |
| 1544 | 0x0000169a,0x00002b69,0x00000001,0x0004007c, | 1439 | 0x0000002f,0x0000170d,0x0000170c,0x000000a6, |
| 1545 | 0x00000006,0x0000175f,0x0000169a,0x00050095, | 1440 | 0x000300f7,0x00001714,0x00000000,0x000400fa, |
| 1546 | 0x000000a8,0x0000177a,0x000016d4,0x00001696, | 1441 | 0x0000170d,0x0000170e,0x00001711,0x000200f8, |
| 1547 | 0x00050051,0x00000006,0x0000177b,0x0000177a, | 1442 | 0x0000170e,0x000500c2,0x00000006,0x00001710, |
| 1548 | 0x00000001,0x00050051,0x00000006,0x0000177c, | 1443 | 0x00001741,0x0000023e,0x000200f9,0x00001714, |
| 1549 | 0x0000177a,0x00000000,0x00050080,0x00000006, | 1444 | 0x000200f8,0x00001711,0x000500c7,0x00000006, |
| 1550 | 0x00001781,0x000016db,0x0000177b,0x00050050, | 1445 | 0x00001713,0x00001741,0x000002a3,0x000200f9, |
| 1551 | 0x00000007,0x00001782,0x0000177c,0x00001781, | 1446 | 0x00001714,0x000200f8,0x00001714,0x000700f5, |
| 1552 | 0x0004007c,0x00000014,0x00001772,0x00001782, | 1447 | 0x00000006,0x00003244,0x00001710,0x0000170e, |
| 1553 | 0x00060041,0x000000d8,0x0000176a,0x00001772, | 1448 | 0x00001713,0x00001711,0x000200f9,0x00001716, |
| 1554 | 0x000000d7,0x000000d7,0x0005003e,0x0000176a, | 1449 | 0x000200f8,0x00001716,0x000900f5,0x00000006, |
| 1555 | 0x0000175f,0x00000002,0x00000004,0x00050080, | 1450 | 0x00003245,0x00001651,0x000016f8,0x00001720, |
| 1556 | 0x00000006,0x0000169d,0x00001679,0x00000186, | 1451 | 0x000016fe,0x00003244,0x00001714,0x00050041, |
| 1557 | 0x00050051,0x00000027,0x000016a1,0x00002b69, | 1452 | 0x000000fe,0x0000176a,0x000000fc,0x00000250, |
| 1558 | 0x00000002,0x0004007c,0x00000006,0x00001788, | 1453 | 0x0004003d,0x00000006,0x0000176b,0x0000176a, |
| 1559 | 0x000016a1,0x00050095,0x000000a8,0x000017a3, | 1454 | 0x00050084,0x00000006,0x0000176c,0x00003245, |
| 1560 | 0x000016d4,0x0000169d,0x00050051,0x00000006, | 1455 | 0x0000176b,0x00050041,0x00000156,0x0000176d, |
| 1561 | 0x000017a4,0x000017a3,0x00000001,0x00050051, | 1456 | 0x000000fc,0x00000205,0x0004003d,0x00000007, |
| 1562 | 0x00000006,0x000017a5,0x000017a3,0x00000000, | 1457 | 0x0000176e,0x0000176d,0x00050051,0x00000006, |
| 1563 | 0x00050080,0x00000006,0x000017aa,0x000016db, | 1458 | 0x00001789,0x0000176e,0x00000000,0x00050095, |
| 1564 | 0x000017a4,0x00050050,0x00000007,0x000017ab, | 1459 | 0x000000ab,0x0000178b,0x00001789,0x0000176c, |
| 1565 | 0x000017a5,0x000017aa,0x0004007c,0x00000014, | 1460 | 0x00050051,0x00000006,0x0000178c,0x0000178b, |
| 1566 | 0x0000179b,0x000017ab,0x00060041,0x000000d8, | 1461 | 0x00000001,0x00050051,0x00000006,0x0000178d, |
| 1567 | 0x00001793,0x0000179b,0x000000d7,0x000000d7, | 1462 | 0x0000178b,0x00000000,0x00050051,0x00000006, |
| 1568 | 0x0005003e,0x00001793,0x00001788,0x00000002, | 1463 | 0x00001790,0x0000176e,0x00000001,0x00050080, |
| 1569 | 0x00000004,0x000300f7,0x000017eb,0x00000000, | 1464 | 0x00000006,0x00001792,0x00001790,0x0000178c, |
| 1570 | 0x000300fb,0x000000a3,0x000017ba,0x000200f8, | 1465 | 0x00050095,0x000000ab,0x000017ac,0x0000178d, |
| 1571 | 0x000017ba,0x000500bc,0x0000002f,0x000017f2, | 1466 | 0x000000a6,0x00050051,0x00000006,0x000017ad, |
| 1572 | 0x0000167e,0x00001693,0x000300f7,0x000017f9, | 1467 | 0x000017ac,0x00000001,0x00050051,0x00000006, |
| 1573 | 0x00000000,0x000400fa,0x000017f2,0x000017f3, | 1468 | 0x000017ae,0x000017ac,0x00000000,0x00050080, |
| 1574 | 0x000017f9,0x000200f8,0x000017f3,0x000500bc, | 1469 | 0x00000006,0x000017b3,0x00001792,0x000017ad, |
| 1575 | 0x0000002f,0x000017f8,0x00001685,0x0000169a, | 1470 | 0x00050050,0x00000007,0x000017b4,0x000017ae, |
| 1576 | 0x000200f9,0x000017f9,0x000200f8,0x000017f9, | 1471 | 0x000017b3,0x0004007c,0x00000014,0x000017a4, |
| 1577 | 0x000700f5,0x0000002f,0x000017fa,0x000017f2, | 1472 | 0x000017b4,0x00060041,0x000000db,0x0000179b, |
| 1578 | 0x000017ba,0x000017f8,0x000017f3,0x000300f7, | 1473 | 0x000017a4,0x000000da,0x000000da,0x0006003d, |
| 1579 | 0x00001801,0x00000000,0x000400fa,0x000017fa, | 1474 | 0x00000006,0x0000179c,0x0000179b,0x00000002, |
| 1580 | 0x000017fb,0x00001801,0x000200f8,0x000017fb, | 1475 | 0x00000004,0x0004007c,0x00000027,0x00001772, |
| 1581 | 0x000500bc,0x0000002f,0x00001800,0x0000168c, | 1476 | 0x0000179c,0x00050095,0x000000ab,0x000017cd, |
| 1582 | 0x000016a1,0x000200f9,0x00001801,0x000200f8, | 1477 | 0x0000178d,0x0000010a,0x00050051,0x00000006, |
| 1583 | 0x00001801,0x000700f5,0x0000002f,0x00001802, | 1478 | 0x000017ce,0x000017cd,0x00000001,0x00050051, |
| 1584 | 0x000017fa,0x000017f9,0x00001800,0x000017fb, | 1479 | 0x00000006,0x000017cf,0x000017cd,0x00000000, |
| 1585 | 0x000400a8,0x0000002f,0x00001803,0x00001802, | 1480 | 0x00050080,0x00000006,0x000017d4,0x00001792, |
| 1586 | 0x000300f7,0x000017bf,0x00000000,0x000400fa, | 1481 | 0x000017ce,0x00050050,0x00000007,0x000017d5, |
| 1587 | 0x00001803,0x000017be,0x000017bf,0x000200f8, | 1482 | 0x000017cf,0x000017d4,0x0004007c,0x00000014, |
| 1588 | 0x000017be,0x000200f9,0x000017eb,0x000200f8, | 1483 | 0x000017c5,0x000017d5,0x00060041,0x000000db, |
| 1589 | 0x000017bf,0x00050081,0x0000004b,0x000017c2, | 1484 | 0x000017bc,0x000017c5,0x000000da,0x000000da, |
| 1590 | 0x00002b6b,0x00002b69,0x0005008e,0x0000004b, | 1485 | 0x0006003d,0x00000006,0x000017bd,0x000017bc, |
| 1591 | 0x000017c3,0x000017c2,0x000001ea,0x00050095, | ||
| 1592 | 0x000000a8,0x00001813,0x000016d4,0x000000a3, | ||
| 1593 | 0x00050051,0x00000006,0x00001814,0x00001813, | ||
| 1594 | 0x00000001,0x00050051,0x00000006,0x00001815, | ||
| 1595 | 0x00001813,0x00000000,0x00050080,0x00000006, | ||
| 1596 | 0x0000181a,0x000016db,0x00001814,0x00050050, | ||
| 1597 | 0x00000007,0x0000181b,0x00001815,0x0000181a, | ||
| 1598 | 0x0004007c,0x00000014,0x0000180b,0x0000181b, | ||
| 1599 | 0x00060041,0x000000d8,0x000017c8,0x0000180b, | ||
| 1600 | 0x000000d7,0x000000d7,0x00050051,0x00000027, | ||
| 1601 | 0x000017ca,0x000017c3,0x00000000,0x0004007c, | ||
| 1602 | 0x00000006,0x00001821,0x000017ca,0x000500c7, | ||
| 1603 | 0x00000006,0x00001823,0x00001821,0x0000012d, | ||
| 1604 | 0x000500ab,0x0000002f,0x00001824,0x00001823, | ||
| 1605 | 0x000000a3,0x000300f7,0x0000182b,0x00000000, | ||
| 1606 | 0x000400fa,0x00001824,0x00001825,0x00001828, | ||
| 1607 | 0x000200f8,0x00001825,0x000400c8,0x00000006, | ||
| 1608 | 0x00001827,0x00001821,0x000200f9,0x0000182b, | ||
| 1609 | 0x000200f8,0x00001828,0x000500c5,0x00000006, | ||
| 1610 | 0x0000182a,0x00001821,0x0000012d,0x000200f9, | ||
| 1611 | 0x0000182b,0x000200f8,0x0000182b,0x000700f5, | ||
| 1612 | 0x00000006,0x00002b22,0x00001827,0x00001825, | ||
| 1613 | 0x0000182a,0x00001828,0x000700ed,0x00000006, | ||
| 1614 | 0x000017cc,0x000017c8,0x000000ad,0x000000a3, | ||
| 1615 | 0x00002b22,0x00060041,0x000000d8,0x000017ce, | ||
| 1616 | 0x0000180b,0x000000d7,0x00000151,0x00050051, | ||
| 1617 | 0x00000027,0x000017d0,0x000017c3,0x00000001, | ||
| 1618 | 0x0004007c,0x00000006,0x00001832,0x000017d0, | ||
| 1619 | 0x000500c7,0x00000006,0x00001834,0x00001832, | ||
| 1620 | 0x0000012d,0x000500ab,0x0000002f,0x00001835, | ||
| 1621 | 0x00001834,0x000000a3,0x000300f7,0x0000183c, | ||
| 1622 | 0x00000000,0x000400fa,0x00001835,0x00001836, | ||
| 1623 | 0x00001839,0x000200f8,0x00001836,0x000400c8, | ||
| 1624 | 0x00000006,0x00001838,0x00001832,0x000200f9, | ||
| 1625 | 0x0000183c,0x000200f8,0x00001839,0x000500c5, | ||
| 1626 | 0x00000006,0x0000183b,0x00001832,0x0000012d, | ||
| 1627 | 0x000200f9,0x0000183c,0x000200f8,0x0000183c, | ||
| 1628 | 0x000700f5,0x00000006,0x00002b23,0x00001838, | ||
| 1629 | 0x00001836,0x0000183b,0x00001839,0x000700ed, | ||
| 1630 | 0x00000006,0x000017d2,0x000017ce,0x000000ad, | ||
| 1631 | 0x000000a3,0x00002b23,0x00060041,0x000000d8, | ||
| 1632 | 0x000017d4,0x0000180b,0x000000d7,0x00000202, | ||
| 1633 | 0x00050051,0x00000027,0x000017d6,0x000017c3, | ||
| 1634 | 0x00000002,0x0004007c,0x00000006,0x00001843, | ||
| 1635 | 0x000017d6,0x000500c7,0x00000006,0x00001845, | ||
| 1636 | 0x00001843,0x0000012d,0x000500ab,0x0000002f, | ||
| 1637 | 0x00001846,0x00001845,0x000000a3,0x000300f7, | ||
| 1638 | 0x0000184d,0x00000000,0x000400fa,0x00001846, | ||
| 1639 | 0x00001847,0x0000184a,0x000200f8,0x00001847, | ||
| 1640 | 0x000400c8,0x00000006,0x00001849,0x00001843, | ||
| 1641 | 0x000200f9,0x0000184d,0x000200f8,0x0000184a, | ||
| 1642 | 0x000500c5,0x00000006,0x0000184c,0x00001843, | ||
| 1643 | 0x0000012d,0x000200f9,0x0000184d,0x000200f8, | ||
| 1644 | 0x0000184d,0x000700f5,0x00000006,0x00002b24, | ||
| 1645 | 0x00001849,0x00001847,0x0000184c,0x0000184a, | ||
| 1646 | 0x000700ed,0x00000006,0x000017d8,0x000017d4, | ||
| 1647 | 0x000000ad,0x000000a3,0x00002b24,0x00060041, | ||
| 1648 | 0x000000d8,0x000017da,0x0000180b,0x000000d7, | ||
| 1649 | 0x0000020a,0x000300f7,0x0000185e,0x00000000, | ||
| 1650 | 0x000400fa,0x00001824,0x00001858,0x0000185b, | ||
| 1651 | 0x000200f8,0x00001858,0x000400c8,0x00000006, | ||
| 1652 | 0x0000185a,0x00001821,0x000200f9,0x0000185e, | ||
| 1653 | 0x000200f8,0x0000185b,0x000500c5,0x00000006, | ||
| 1654 | 0x0000185d,0x00001821,0x0000012d,0x000200f9, | ||
| 1655 | 0x0000185e,0x000200f8,0x0000185e,0x000700f5, | ||
| 1656 | 0x00000006,0x00002b25,0x0000185a,0x00001858, | ||
| 1657 | 0x0000185d,0x0000185b,0x000700ef,0x00000006, | ||
| 1658 | 0x000017de,0x000017da,0x000000ad,0x000000a3, | ||
| 1659 | 0x00002b25,0x00060041,0x000000d8,0x000017e0, | ||
| 1660 | 0x0000180b,0x000000d7,0x00000212,0x000300f7, | ||
| 1661 | 0x0000186f,0x00000000,0x000400fa,0x00001835, | ||
| 1662 | 0x00001869,0x0000186c,0x000200f8,0x00001869, | ||
| 1663 | 0x000400c8,0x00000006,0x0000186b,0x00001832, | ||
| 1664 | 0x000200f9,0x0000186f,0x000200f8,0x0000186c, | ||
| 1665 | 0x000500c5,0x00000006,0x0000186e,0x00001832, | ||
| 1666 | 0x0000012d,0x000200f9,0x0000186f,0x000200f8, | ||
| 1667 | 0x0000186f,0x000700f5,0x00000006,0x00002b26, | ||
| 1668 | 0x0000186b,0x00001869,0x0000186e,0x0000186c, | ||
| 1669 | 0x000700ef,0x00000006,0x000017e4,0x000017e0, | ||
| 1670 | 0x000000ad,0x000000a3,0x00002b26,0x00060041, | ||
| 1671 | 0x000000d8,0x000017e6,0x0000180b,0x000000d7, | ||
| 1672 | 0x0000021a,0x000300f7,0x00001880,0x00000000, | ||
| 1673 | 0x000400fa,0x00001846,0x0000187a,0x0000187d, | ||
| 1674 | 0x000200f8,0x0000187a,0x000400c8,0x00000006, | ||
| 1675 | 0x0000187c,0x00001843,0x000200f9,0x00001880, | ||
| 1676 | 0x000200f8,0x0000187d,0x000500c5,0x00000006, | ||
| 1677 | 0x0000187f,0x00001843,0x0000012d,0x000200f9, | ||
| 1678 | 0x00001880,0x000200f8,0x00001880,0x000700f5, | ||
| 1679 | 0x00000006,0x00002b27,0x0000187c,0x0000187a, | ||
| 1680 | 0x0000187f,0x0000187d,0x000700ef,0x00000006, | ||
| 1681 | 0x000017ea,0x000017e6,0x000000ad,0x000000a3, | ||
| 1682 | 0x00002b27,0x000200f9,0x000017eb,0x000200f8, | ||
| 1683 | 0x000017eb,0x000200f9,0x00000a4d,0x000200f8, | ||
| 1684 | 0x00000a51,0x000500aa,0x0000002f,0x00000a54, | ||
| 1685 | 0x000009eb,0x0000016d,0x000300f7,0x00000a56, | ||
| 1686 | 0x00000000,0x000400fa,0x00000a54,0x00000a55, | ||
| 1687 | 0x00000a5a,0x000200f8,0x00000a55,0x00050084, | ||
| 1688 | 0x00000006,0x000018e9,0x00000104,0x000009e9, | ||
| 1689 | 0x000200f9,0x000018ea,0x000200f8,0x000018ea, | ||
| 1690 | 0x000700f5,0x00000006,0x00002ad4,0x000000a3, | ||
| 1691 | 0x00000a55,0x000018fb,0x000018ee,0x000500b0, | ||
| 1692 | 0x0000002f,0x000018ed,0x00002ad4,0x00000115, | ||
| 1693 | 0x000400f6,0x000018fc,0x000018ee,0x00000000, | ||
| 1694 | 0x000400fa,0x000018ed,0x000018ee,0x000018fc, | ||
| 1695 | 0x000200f8,0x000018ee,0x00050084,0x00000006, | ||
| 1696 | 0x000018f2,0x00000107,0x00002ad4,0x00050080, | ||
| 1697 | 0x00000006,0x000018f3,0x000018e9,0x000018f2, | ||
| 1698 | 0x00050041,0x00000153,0x000018f4,0x000000f9, | ||
| 1699 | 0x00000202,0x0004003d,0x00000007,0x000018f5, | ||
| 1700 | 0x000018f4,0x00050051,0x00000006,0x00001ab6, | ||
| 1701 | 0x000018f5,0x00000000,0x00050095,0x000000a8, | ||
| 1702 | 0x00001ab8,0x00001ab6,0x000018f3,0x00050051, | ||
| 1703 | 0x00000006,0x00001ab9,0x00001ab8,0x00000001, | ||
| 1704 | 0x00050051,0x00000006,0x00001aba,0x00001ab8, | ||
| 1705 | 0x00000000,0x00050051,0x00000006,0x00001abd, | ||
| 1706 | 0x000018f5,0x00000001,0x00050080,0x00000006, | ||
| 1707 | 0x00001abf,0x00001abd,0x00001ab9,0x00050050, | ||
| 1708 | 0x00000007,0x00001ac0,0x00001aba,0x00001abf, | ||
| 1709 | 0x0004007c,0x00000014,0x00001ab0,0x00001ac0, | ||
| 1710 | 0x00060041,0x000000d8,0x00001aa7,0x00001ab0, | ||
| 1711 | 0x000000d7,0x000000d7,0x0006003d,0x00000006, | ||
| 1712 | 0x00001aa8,0x00001aa7,0x00000002,0x00000004, | ||
| 1713 | 0x0004007c,0x00000027,0x000018f7,0x00001aa8, | ||
| 1714 | 0x00050041,0x00000028,0x000018f8,0x00001884, | ||
| 1715 | 0x00002ad4,0x0003003e,0x000018f8,0x000018f7, | ||
| 1716 | 0x00050080,0x00000006,0x000018fb,0x00002ad4, | ||
| 1717 | 0x00000151,0x000200f9,0x000018ea,0x000200f8, | ||
| 1718 | 0x000018fc,0x00050080,0x00000006,0x000018fe, | ||
| 1719 | 0x000018e9,0x00000365,0x00050041,0x00000153, | ||
| 1720 | 0x000018ff,0x000000f9,0x00000202,0x0004003d, | ||
| 1721 | 0x00000007,0x00001900,0x000018ff,0x00050051, | ||
| 1722 | 0x00000006,0x00001ad7,0x00001900,0x00000000, | ||
| 1723 | 0x00050095,0x000000a8,0x00001ad9,0x00001ad7, | ||
| 1724 | 0x000018fe,0x00050051,0x00000006,0x00001ada, | ||
| 1725 | 0x00001ad9,0x00000001,0x00050051,0x00000006, | ||
| 1726 | 0x00001adb,0x00001ad9,0x00000000,0x00050051, | ||
| 1727 | 0x00000006,0x00001ade,0x00001900,0x00000001, | ||
| 1728 | 0x00050080,0x00000006,0x00001ae0,0x00001ade, | ||
| 1729 | 0x00001ada,0x00050050,0x00000007,0x00001ae1, | ||
| 1730 | 0x00001adb,0x00001ae0,0x0004007c,0x00000014, | ||
| 1731 | 0x00001ad1,0x00001ae1,0x00060041,0x000000d8, | ||
| 1732 | 0x00001ac8,0x00001ad1,0x000000d7,0x000000d7, | ||
| 1733 | 0x0006003d,0x00000006,0x00001ac9,0x00001ac8, | ||
| 1734 | 0x00000002,0x00000004,0x00050080,0x00000006, | ||
| 1735 | 0x00001903,0x000018e9,0x00000371,0x00050095, | ||
| 1736 | 0x000000a8,0x00001afa,0x00001ad7,0x00001903, | ||
| 1737 | 0x00050051,0x00000006,0x00001afb,0x00001afa, | ||
| 1738 | 0x00000001,0x00050051,0x00000006,0x00001afc, | ||
| 1739 | 0x00001afa,0x00000000,0x00050080,0x00000006, | ||
| 1740 | 0x00001b01,0x00001ade,0x00001afb,0x00050050, | ||
| 1741 | 0x00000007,0x00001b02,0x00001afc,0x00001b01, | ||
| 1742 | 0x0004007c,0x00000014,0x00001af2,0x00001b02, | ||
| 1743 | 0x00060041,0x000000d8,0x00001ae9,0x00001af2, | ||
| 1744 | 0x000000d7,0x000000d7,0x0006003d,0x00000006, | ||
| 1745 | 0x00001aea,0x00001ae9,0x00000002,0x00000004, | ||
| 1746 | 0x00050080,0x00000006,0x00001908,0x000018e9, | ||
| 1747 | 0x0000037b,0x00050095,0x000000a8,0x00001b1b, | ||
| 1748 | 0x00001ad7,0x00001908,0x00050051,0x00000006, | ||
| 1749 | 0x00001b1c,0x00001b1b,0x00000001,0x00050051, | ||
| 1750 | 0x00000006,0x00001b1d,0x00001b1b,0x00000000, | ||
| 1751 | 0x00050080,0x00000006,0x00001b22,0x00001ade, | ||
| 1752 | 0x00001b1c,0x00050050,0x00000007,0x00001b23, | ||
| 1753 | 0x00001b1d,0x00001b22,0x0004007c,0x00000014, | ||
| 1754 | 0x00001b13,0x00001b23,0x00060041,0x000000d8, | ||
| 1755 | 0x00001b0a,0x00001b13,0x000000d7,0x000000d7, | ||
| 1756 | 0x0006003d,0x00000006,0x00001b0b,0x00001b0a, | ||
| 1757 | 0x00000002,0x00000004,0x00050080,0x00000006, | ||
| 1758 | 0x0000190d,0x000018e9,0x00000385,0x00050095, | ||
| 1759 | 0x000000a8,0x00001b3c,0x00001ad7,0x0000190d, | ||
| 1760 | 0x00050051,0x00000006,0x00001b3d,0x00001b3c, | ||
| 1761 | 0x00000001,0x00050051,0x00000006,0x00001b3e, | ||
| 1762 | 0x00001b3c,0x00000000,0x00050080,0x00000006, | ||
| 1763 | 0x00001b43,0x00001ade,0x00001b3d,0x00050050, | ||
| 1764 | 0x00000007,0x00001b44,0x00001b3e,0x00001b43, | ||
| 1765 | 0x0004007c,0x00000014,0x00001b34,0x00001b44, | ||
| 1766 | 0x00060041,0x000000d8,0x00001b2b,0x00001b34, | ||
| 1767 | 0x000000d7,0x000000d7,0x0006003d,0x00000006, | ||
| 1768 | 0x00001b2c,0x00001b2b,0x00000002,0x00000004, | ||
| 1769 | 0x00050041,0x000000fb,0x00001912,0x000000f9, | ||
| 1770 | 0x00000229,0x0004003d,0x00000006,0x00001913, | ||
| 1771 | 0x00001912,0x00050084,0x00000006,0x00001915, | ||
| 1772 | 0x00000225,0x000009e9,0x00050080,0x00000006, | ||
| 1773 | 0x00001916,0x00001913,0x00001915,0x000200f9, | ||
| 1774 | 0x00001917,0x000200f8,0x00001917,0x000700f5, | ||
| 1775 | 0x00000006,0x00002ad5,0x000000a3,0x000018fc, | ||
| 1776 | 0x00001928,0x0000191b,0x000500b0,0x0000002f, | ||
| 1777 | 0x0000191a,0x00002ad5,0x00000115,0x000400f6, | ||
| 1778 | 0x00001929,0x0000191b,0x00000000,0x000400fa, | ||
| 1779 | 0x0000191a,0x0000191b,0x00001929,0x000200f8, | ||
| 1780 | 0x0000191b,0x00050084,0x00000006,0x0000191e, | ||
| 1781 | 0x00000107,0x00002ad5,0x00050080,0x00000006, | ||
| 1782 | 0x0000191f,0x00001916,0x0000191e,0x00050041, | ||
| 1783 | 0x00000153,0x00001921,0x000000f9,0x000000d7, | ||
| 1784 | 0x0004003d,0x00000007,0x00001922,0x00001921, | ||
| 1785 | 0x00050041,0x00000028,0x00001923,0x00001884, | ||
| 1786 | 0x00002ad5,0x0004003d,0x00000027,0x00001924, | ||
| 1787 | 0x00001923,0x0004007c,0x00000006,0x00001b4a, | ||
| 1788 | 0x00001924,0x00050051,0x00000006,0x00001b63, | ||
| 1789 | 0x00001922,0x00000000,0x00050095,0x000000a8, | ||
| 1790 | 0x00001b65,0x00001b63,0x0000191f,0x00050051, | ||
| 1791 | 0x00000006,0x00001b66,0x00001b65,0x00000001, | ||
| 1792 | 0x00050051,0x00000006,0x00001b67,0x00001b65, | ||
| 1793 | 0x00000000,0x00050051,0x00000006,0x00001b6a, | ||
| 1794 | 0x00001922,0x00000001,0x00050080,0x00000006, | ||
| 1795 | 0x00001b6c,0x00001b6a,0x00001b66,0x00050050, | ||
| 1796 | 0x00000007,0x00001b6d,0x00001b67,0x00001b6c, | ||
| 1797 | 0x0004007c,0x00000014,0x00001b5d,0x00001b6d, | ||
| 1798 | 0x00060041,0x000000d8,0x00001b55,0x00001b5d, | ||
| 1799 | 0x000000d7,0x000000d7,0x0005003e,0x00001b55, | ||
| 1800 | 0x00001b4a,0x00000002,0x00000004,0x00050080, | ||
| 1801 | 0x00000006,0x00001928,0x00002ad5,0x00000151, | ||
| 1802 | 0x000200f9,0x00001917,0x000200f8,0x00001929, | ||
| 1803 | 0x00050080,0x00000006,0x0000192b,0x00001916, | ||
| 1804 | 0x00000365,0x00050041,0x00000153,0x0000192c, | ||
| 1805 | 0x000000f9,0x000000d7,0x0004003d,0x00000007, | ||
| 1806 | 0x0000192d,0x0000192c,0x00050051,0x00000006, | ||
| 1807 | 0x00001b83,0x0000192d,0x00000000,0x00050095, | ||
| 1808 | 0x000000a8,0x00001b85,0x00001b83,0x0000192b, | ||
| 1809 | 0x00050051,0x00000006,0x00001b86,0x00001b85, | ||
| 1810 | 0x00000001,0x00050051,0x00000006,0x00001b87, | ||
| 1811 | 0x00001b85,0x00000000,0x00050051,0x00000006, | ||
| 1812 | 0x00001b8a,0x0000192d,0x00000001,0x00050080, | ||
| 1813 | 0x00000006,0x00001b8c,0x00001b8a,0x00001b86, | ||
| 1814 | 0x00050050,0x00000007,0x00001b8d,0x00001b87, | ||
| 1815 | 0x00001b8c,0x0004007c,0x00000014,0x00001b7d, | ||
| 1816 | 0x00001b8d,0x00060041,0x000000d8,0x00001b75, | ||
| 1817 | 0x00001b7d,0x000000d7,0x000000d7,0x0005003e, | ||
| 1818 | 0x00001b75,0x00001ac9,0x00000002,0x00000004, | ||
| 1819 | 0x00050080,0x00000006,0x00001931,0x00001916, | ||
| 1820 | 0x00000371,0x00050095,0x000000a8,0x00001ba5, | ||
| 1821 | 0x00001b83,0x00001931,0x00050051,0x00000006, | ||
| 1822 | 0x00001ba6,0x00001ba5,0x00000001,0x00050051, | ||
| 1823 | 0x00000006,0x00001ba7,0x00001ba5,0x00000000, | ||
| 1824 | 0x00050080,0x00000006,0x00001bac,0x00001b8a, | ||
| 1825 | 0x00001ba6,0x00050050,0x00000007,0x00001bad, | ||
| 1826 | 0x00001ba7,0x00001bac,0x0004007c,0x00000014, | ||
| 1827 | 0x00001b9d,0x00001bad,0x00060041,0x000000d8, | ||
| 1828 | 0x00001b95,0x00001b9d,0x000000d7,0x000000d7, | ||
| 1829 | 0x0005003e,0x00001b95,0x00001aea,0x00000002, | ||
| 1830 | 0x00000004,0x000500aa,0x0000002f,0x00001bb2, | ||
| 1831 | 0x00001b0b,0x000000a3,0x000300f7,0x00001bb7, | ||
| 1832 | 0x00000000,0x000400fa,0x00001bb2,0x00001bb3, | ||
| 1833 | 0x00001bb7,0x000200f8,0x00001bb3,0x000500aa, | ||
| 1834 | 0x0000002f,0x00001bb6,0x00001b2c,0x000000a3, | ||
| 1835 | 0x000200f9,0x00001bb7,0x000200f8,0x00001bb7, | ||
| 1836 | 0x000700f5,0x0000002f,0x00001bb8,0x00001bb2, | ||
| 1837 | 0x00001929,0x00001bb6,0x00001bb3,0x000400a8, | ||
| 1838 | 0x0000002f,0x0000193c,0x00001bb8,0x000300f7, | ||
| 1839 | 0x000019d2,0x00000000,0x000400fa,0x0000193c, | ||
| 1840 | 0x0000193d,0x000019d2,0x000200f8,0x0000193d, | ||
| 1841 | 0x00050041,0x00000153,0x0000193f,0x000000f9, | ||
| 1842 | 0x0000021a,0x0004003d,0x00000007,0x00001940, | ||
| 1843 | 0x0000193f,0x00050051,0x00000006,0x00001bc0, | ||
| 1844 | 0x00001940,0x00000000,0x00050095,0x000000a8, | ||
| 1845 | 0x00001bc1,0x00001b0b,0x00001bc0,0x00050051, | ||
| 1846 | 0x00000006,0x00001bc2,0x00001bc1,0x00000001, | ||
| 1847 | 0x00050051,0x00000006,0x00001bc3,0x00001bc1, | ||
| 1848 | 0x00000000,0x00050051,0x00000006,0x00001bc8, | ||
| 1849 | 0x00001940,0x00000001,0x00050080,0x00000006, | ||
| 1850 | 0x00001bc9,0x00001b2c,0x00001bc8,0x00050080, | ||
| 1851 | 0x00000006,0x00001bcb,0x00001bc9,0x00001bc2, | ||
| 1852 | 0x00050095,0x000000a8,0x00001be5,0x00001bc3, | ||
| 1853 | 0x00000365,0x00050051,0x00000006,0x00001be6, | ||
| 1854 | 0x00001be5,0x00000001,0x00050051,0x00000006, | ||
| 1855 | 0x00001be7,0x00001be5,0x00000000,0x00050080, | ||
| 1856 | 0x00000006,0x00001bec,0x00001bcb,0x00001be6, | ||
| 1857 | 0x00050050,0x00000007,0x00001bed,0x00001be7, | ||
| 1858 | 0x00001bec,0x0004007c,0x00000014,0x00001bdd, | ||
| 1859 | 0x00001bed,0x00060041,0x000000d8,0x00001bd4, | ||
| 1860 | 0x00001bdd,0x000000d7,0x000000d7,0x0006003d, | ||
| 1861 | 0x00000006,0x00001bd5,0x00001bd4,0x00000002, | ||
| 1862 | 0x00000004,0x00050095,0x000000a8,0x00001c06, | ||
| 1863 | 0x00001bc3,0x0000011c,0x00050051,0x00000006, | ||
| 1864 | 0x00001c07,0x00001c06,0x00000001,0x00050051, | ||
| 1865 | 0x00000006,0x00001c08,0x00001c06,0x00000000, | ||
| 1866 | 0x00050080,0x00000006,0x00001c0d,0x00001bcb, | ||
| 1867 | 0x00001c07,0x00050050,0x00000007,0x00001c0e, | ||
| 1868 | 0x00001c08,0x00001c0d,0x0004007c,0x00000014, | ||
| 1869 | 0x00001bfe,0x00001c0e,0x00060041,0x000000d8, | ||
| 1870 | 0x00001bf5,0x00001bfe,0x000000d7,0x000000d7, | ||
| 1871 | 0x0006003d,0x00000006,0x00001bf6,0x00001bf5, | ||
| 1872 | 0x00000002,0x00000004,0x0004007c,0x00000027, | 1486 | 0x00000002,0x00000004,0x0004007c,0x00000027, |
| 1873 | 0x00001946,0x00001bf6,0x00050095,0x000000a8, | 1487 | 0x00001775,0x000017bd,0x00050041,0x000000fe, |
| 1874 | 0x00001c27,0x00001bc3,0x00000186,0x00050051, | 1488 | 0x00001776,0x000000fc,0x00000266,0x0004003d, |
| 1875 | 0x00000006,0x00001c28,0x00001c27,0x00000001, | 1489 | 0x00000006,0x00001777,0x00001776,0x000500aa, |
| 1876 | 0x00050051,0x00000006,0x00001c29,0x00001c27, | 1490 | 0x0000002f,0x00001778,0x00001777,0x000000b0, |
| 1877 | 0x00000000,0x00050080,0x00000006,0x00001c2e, | 1491 | 0x000300f7,0x0000177e,0x00000000,0x000400fa, |
| 1878 | 0x00001bcb,0x00001c28,0x00050050,0x00000007, | 1492 | 0x00001778,0x00001779,0x0000177a,0x000200f8, |
| 1879 | 0x00001c2f,0x00001c29,0x00001c2e,0x0004007c, | 1493 | 0x00001779,0x000200f9,0x0000177e,0x000200f8, |
| 1880 | 0x00000014,0x00001c1f,0x00001c2f,0x00060041, | 1494 | 0x0000177a,0x00050095,0x000000ab,0x000017ee, |
| 1881 | 0x000000d8,0x00001c16,0x00001c1f,0x000000d7, | 1495 | 0x0000178d,0x00000111,0x00050051,0x00000006, |
| 1882 | 0x000000d7,0x0006003d,0x00000006,0x00001c17, | 1496 | 0x000017ef,0x000017ee,0x00000001,0x00050051, |
| 1883 | 0x00001c16,0x00000002,0x00000004,0x0004007c, | 1497 | 0x00000006,0x000017f0,0x000017ee,0x00000000, |
| 1884 | 0x00000027,0x00001949,0x00001c17,0x00050095, | 1498 | 0x00050080,0x00000006,0x000017f5,0x00001792, |
| 1885 | 0x000000a8,0x00001c48,0x00001bc3,0x0000014d, | 1499 | 0x000017ef,0x00050050,0x00000007,0x000017f6, |
| 1886 | 0x00050051,0x00000006,0x00001c49,0x00001c48, | 1500 | 0x000017f0,0x000017f5,0x0004007c,0x00000014, |
| 1887 | 0x00000001,0x00050051,0x00000006,0x00001c4a, | 1501 | 0x000017e6,0x000017f6,0x00060041,0x000000db, |
| 1888 | 0x00001c48,0x00000000,0x00050080,0x00000006, | 1502 | 0x000017dd,0x000017e6,0x000000da,0x000000da, |
| 1889 | 0x00001c4f,0x00001bcb,0x00001c49,0x00050050, | 1503 | 0x0006003d,0x00000006,0x000017de,0x000017dd, |
| 1890 | 0x00000007,0x00001c50,0x00001c4a,0x00001c4f, | ||
| 1891 | 0x0004007c,0x00000014,0x00001c40,0x00001c50, | ||
| 1892 | 0x00060041,0x000000d8,0x00001c37,0x00001c40, | ||
| 1893 | 0x000000d7,0x000000d7,0x0006003d,0x00000006, | ||
| 1894 | 0x00001c38,0x00001c37,0x00000002,0x00000004, | ||
| 1895 | 0x0004007c,0x00000027,0x0000194c,0x00001c38, | ||
| 1896 | 0x00050095,0x000000a8,0x00001c69,0x00001bc3, | ||
| 1897 | 0x00000460,0x00050051,0x00000006,0x00001c6a, | ||
| 1898 | 0x00001c69,0x00000001,0x00050051,0x00000006, | ||
| 1899 | 0x00001c6b,0x00001c69,0x00000000,0x00050080, | ||
| 1900 | 0x00000006,0x00001c70,0x00001bcb,0x00001c6a, | ||
| 1901 | 0x00050050,0x00000007,0x00001c71,0x00001c6b, | ||
| 1902 | 0x00001c70,0x0004007c,0x00000014,0x00001c61, | ||
| 1903 | 0x00001c71,0x00060041,0x000000d8,0x00001c58, | ||
| 1904 | 0x00001c61,0x000000d7,0x000000d7,0x0006003d, | ||
| 1905 | 0x00000006,0x00001c59,0x00001c58,0x00000002, | ||
| 1906 | 0x00000004,0x0004007c,0x00000027,0x00001950, | ||
| 1907 | 0x00001c59,0x00050095,0x000000a8,0x00001c8a, | ||
| 1908 | 0x00001bc3,0x00000466,0x00050051,0x00000006, | ||
| 1909 | 0x00001c8b,0x00001c8a,0x00000001,0x00050051, | ||
| 1910 | 0x00000006,0x00001c8c,0x00001c8a,0x00000000, | ||
| 1911 | 0x00050080,0x00000006,0x00001c91,0x00001bcb, | ||
| 1912 | 0x00001c8b,0x00050050,0x00000007,0x00001c92, | ||
| 1913 | 0x00001c8c,0x00001c91,0x0004007c,0x00000014, | ||
| 1914 | 0x00001c82,0x00001c92,0x00060041,0x000000d8, | ||
| 1915 | 0x00001c79,0x00001c82,0x000000d7,0x000000d7, | ||
| 1916 | 0x0006003d,0x00000006,0x00001c7a,0x00001c79, | ||
| 1917 | 0x00000002,0x00000004,0x0004007c,0x00000027, | 1504 | 0x00000002,0x00000004,0x0004007c,0x00000027, |
| 1918 | 0x00001953,0x00001c7a,0x00050095,0x000000a8, | 1505 | 0x0000177d,0x000017de,0x000200f9,0x0000177e, |
| 1919 | 0x00001cab,0x00001bc3,0x00000344,0x00050051, | 1506 | 0x000200f8,0x0000177e,0x000700f5,0x00000027, |
| 1920 | 0x00000006,0x00001cac,0x00001cab,0x00000001, | 1507 | 0x00003246,0x0000026d,0x00001779,0x0000177d, |
| 1921 | 0x00050051,0x00000006,0x00001cad,0x00001cab, | 1508 | 0x0000177a,0x00060050,0x0000004b,0x00001783, |
| 1922 | 0x00000000,0x00050080,0x00000006,0x00001cb2, | 1509 | 0x00001772,0x00001775,0x00003246,0x000300f7, |
| 1923 | 0x00001bcb,0x00001cac,0x00050050,0x00000007, | 1510 | 0x0000183c,0x00000000,0x000300fb,0x000000a6, |
| 1924 | 0x00001cb3,0x00001cad,0x00001cb2,0x0004007c, | 1511 | 0x00001808,0x000200f8,0x00001808,0x00050041, |
| 1925 | 0x00000014,0x00001ca3,0x00001cb3,0x00060041, | 1512 | 0x00000156,0x00001809,0x000000fc,0x00000215, |
| 1926 | 0x000000d8,0x00001c9a,0x00001ca3,0x000000d7, | 1513 | 0x0004003d,0x00000007,0x0000180a,0x00001809, |
| 1927 | 0x000000d7,0x0006003d,0x00000006,0x00001c9b, | 1514 | 0x00050051,0x00000006,0x00001841,0x0000180a, |
| 1928 | 0x00001c9a,0x00000002,0x00000004,0x0004007c, | 1515 | 0x00000000,0x000500aa,0x0000002f,0x00001842, |
| 1929 | 0x00000027,0x00001956,0x00001c9b,0x000500bc, | 1516 | 0x00001841,0x000000a6,0x000300f7,0x00001847, |
| 1930 | 0x0000002f,0x00001cba,0x00001946,0x00001950, | 1517 | 0x00000000,0x000400fa,0x00001842,0x00001843, |
| 1931 | 0x000300f7,0x00001cc1,0x00000000,0x000400fa, | 1518 | 0x00001847,0x000200f8,0x00001843,0x00050051, |
| 1932 | 0x00001cba,0x00001cbb,0x00001cc1,0x000200f8, | 1519 | 0x00000006,0x00001845,0x0000180a,0x00000001, |
| 1933 | 0x00001cbb,0x000500bc,0x0000002f,0x00001cc0, | 1520 | 0x000500aa,0x0000002f,0x00001846,0x00001845, |
| 1934 | 0x00001949,0x00001953,0x000200f9,0x00001cc1, | 1521 | 0x000000a6,0x000200f9,0x00001847,0x000200f8, |
| 1935 | 0x000200f8,0x00001cc1,0x000700f5,0x0000002f, | 1522 | 0x00001847,0x000700f5,0x0000002f,0x00001848, |
| 1936 | 0x00001cc2,0x00001cba,0x0000193d,0x00001cc0, | 1523 | 0x00001842,0x00001808,0x00001846,0x00001843, |
| 1937 | 0x00001cbb,0x000300f7,0x00001cc9,0x00000000, | 1524 | 0x000300f7,0x0000180e,0x00000000,0x000400fa, |
| 1938 | 0x000400fa,0x00001cc2,0x00001cc3,0x00001cc9, | 1525 | 0x00001848,0x0000180c,0x0000180e,0x000200f8, |
| 1939 | 0x000200f8,0x00001cc3,0x000500bc,0x0000002f, | 1526 | 0x0000180c,0x000200f9,0x0000183c,0x000200f8, |
| 1940 | 0x00001cc8,0x0000194c,0x00001956,0x000200f9, | 1527 | 0x0000180e,0x000200f9,0x0000180f,0x000200f8, |
| 1941 | 0x00001cc9,0x000200f8,0x00001cc9,0x000700f5, | 1528 | 0x0000180f,0x000700f5,0x00000006,0x00003247, |
| 1942 | 0x0000002f,0x00001cca,0x00001cc2,0x00001cc1, | 1529 | 0x000000a6,0x0000180e,0x00001839,0x00001813, |
| 1943 | 0x00001cc8,0x00001cc3,0x000300f7,0x00001960, | 1530 | 0x000500b0,0x0000002f,0x00001812,0x00003247, |
| 1944 | 0x00000000,0x000400fa,0x00001cca,0x0000195c, | 1531 | 0x000002b7,0x000400f6,0x0000183a,0x00001813, |
| 1945 | 0x00001960,0x000200f8,0x0000195c,0x000500c2, | 1532 | 0x00000000,0x000400fa,0x00001812,0x00001813, |
| 1946 | 0x00000006,0x0000195e,0x00001ac9,0x0000047b, | 1533 | 0x0000183a,0x000200f8,0x00001813,0x00050084, |
| 1947 | 0x000500ab,0x0000002f,0x0000195f,0x0000195e, | 1534 | 0x00000006,0x00001815,0x0000011f,0x00003247, |
| 1948 | 0x000000a3,0x000200f9,0x00001960,0x000200f8, | 1535 | 0x00050095,0x000000ab,0x00001861,0x00001841, |
| 1949 | 0x00001960,0x000700f5,0x0000002f,0x00001961, | 1536 | 0x00001815,0x00050051,0x00000006,0x00001862, |
| 1950 | 0x00001cca,0x00001cc9,0x0000195f,0x0000195c, | 1537 | 0x00001861,0x00000001,0x00050051,0x00000006, |
| 1951 | 0x000300f7,0x000019d1,0x00000000,0x000400fa, | 1538 | 0x00001863,0x00001861,0x00000000,0x00050051, |
| 1952 | 0x00001961,0x00001962,0x000019d1,0x000200f8, | 1539 | 0x00000006,0x00001866,0x0000180a,0x00000001, |
| 1953 | 0x00001962,0x000200f9,0x00001963,0x000200f8, | 1540 | 0x00050080,0x00000006,0x00001868,0x00001866, |
| 1954 | 0x00001963,0x000700f5,0x0000004b,0x00002b0b, | 1541 | 0x00001862,0x00050050,0x00000007,0x00001869, |
| 1955 | 0x00002b66,0x00001962,0x000019cc,0x00001967, | 1542 | 0x00001863,0x00001868,0x0004007c,0x00000014, |
| 1956 | 0x000700f5,0x0000004b,0x00002af9,0x00002b64, | 1543 | 0x00001859,0x00001869,0x00060041,0x000000db, |
| 1957 | 0x00001962,0x000019c9,0x00001967,0x000700f5, | 1544 | 0x00001850,0x00001859,0x000000da,0x000000da, |
| 1958 | 0x00000006,0x00002ad6,0x000000a3,0x00001962, | 1545 | 0x0006003d,0x00000006,0x00001851,0x00001850, |
| 1959 | 0x000019cf,0x00001967,0x000500b0,0x0000002f, | 1546 | 0x00000002,0x00000004,0x0004007c,0x00000027, |
| 1960 | 0x00001966,0x00002ad6,0x0000010e,0x000400f6, | 1547 | 0x0000181a,0x00001851,0x00050080,0x00000006, |
| 1961 | 0x000019d0,0x00001967,0x00000000,0x000400fa, | 1548 | 0x0000181c,0x00001815,0x0000010a,0x00050095, |
| 1962 | 0x00001966,0x00001967,0x000019d0,0x000200f8, | 1549 | 0x000000ab,0x00001882,0x00001841,0x0000181c, |
| 1963 | 0x00001967,0x000500c7,0x00000006,0x00001969, | 1550 | 0x00050051,0x00000006,0x00001883,0x00001882, |
| 1964 | 0x00002ad6,0x000000ad,0x000500ab,0x0000002f, | 1551 | 0x00000001,0x00050051,0x00000006,0x00001884, |
| 1965 | 0x0000196a,0x00001969,0x000000a3,0x000600a9, | 1552 | 0x00001882,0x00000000,0x00050080,0x00000006, |
| 1966 | 0x00000027,0x00002b6c,0x0000196a,0x00001950, | 1553 | 0x00001889,0x00001866,0x00001883,0x00050050, |
| 1967 | 0x00001946,0x000500c7,0x00000006,0x00001974, | 1554 | 0x00000007,0x0000188a,0x00001884,0x00001889, |
| 1968 | 0x00002ad6,0x0000016d,0x000500ab,0x0000002f, | 1555 | 0x0004007c,0x00000014,0x0000187a,0x0000188a, |
| 1969 | 0x00001975,0x00001974,0x000000a3,0x000600a9, | 1556 | 0x00060041,0x000000db,0x00001871,0x0000187a, |
| 1970 | 0x00000027,0x00002b6d,0x00001975,0x00001953, | 1557 | 0x000000da,0x000000da,0x0006003d,0x00000006, |
| 1971 | 0x00001949,0x000500c7,0x00000006,0x0000197f, | 1558 | 0x00001872,0x00001871,0x00000002,0x00000004, |
| 1972 | 0x00002ad6,0x00000107,0x000500ab,0x0000002f, | 1559 | 0x0004007c,0x00000027,0x00001820,0x00001872, |
| 1973 | 0x00001980,0x0000197f,0x000000a3,0x000600a9, | 1560 | 0x00050080,0x00000006,0x00001822,0x00001815, |
| 1974 | 0x00000027,0x00002b6e,0x00001980,0x00001956, | 1561 | 0x00000111,0x00050095,0x000000ab,0x000018a3, |
| 1975 | 0x0000194c,0x00050041,0x00000028,0x0000198a, | 1562 | 0x00001841,0x00001822,0x00050051,0x00000006, |
| 1976 | 0x00001884,0x000000d7,0x0004003d,0x00000027, | 1563 | 0x000018a4,0x000018a3,0x00000001,0x00050051, |
| 1977 | 0x0000198b,0x0000198a,0x00050085,0x00000027, | 1564 | 0x00000006,0x000018a5,0x000018a3,0x00000000, |
| 1978 | 0x0000198e,0x0000198b,0x00002b6c,0x00050041, | 1565 | 0x00050080,0x00000006,0x000018aa,0x00001866, |
| 1979 | 0x00000028,0x0000198f,0x00001884,0x00000151, | 1566 | 0x000018a4,0x00050050,0x00000007,0x000018ab, |
| 1980 | 0x0004003d,0x00000027,0x00001990,0x0000198f, | 1567 | 0x000018a5,0x000018aa,0x0004007c,0x00000014, |
| 1981 | 0x00050085,0x00000027,0x00001993,0x00001990, | 1568 | 0x0000189b,0x000018ab,0x00060041,0x000000db, |
| 1982 | 0x00002b6d,0x00050081,0x00000027,0x00001994, | 1569 | 0x00001892,0x0000189b,0x000000da,0x000000da, |
| 1983 | 0x0000198e,0x00001993,0x00050041,0x00000028, | 1570 | 0x0006003d,0x00000006,0x00001893,0x00001892, |
| 1984 | 0x00001995,0x00001884,0x00000202,0x0004003d, | 1571 | 0x00000002,0x00000004,0x0004007c,0x00000027, |
| 1985 | 0x00000027,0x00001996,0x00001995,0x00050085, | 1572 | 0x00001826,0x00001893,0x00050080,0x00000006, |
| 1986 | 0x00000027,0x00001999,0x00001996,0x00002b6e, | 1573 | 0x00001828,0x00001815,0x00000118,0x00050095, |
| 1987 | 0x00050081,0x00000027,0x0000199a,0x00001994, | 1574 | 0x000000ab,0x000018c4,0x00001841,0x00001828, |
| 1988 | 0x00001999,0x00050041,0x00000028,0x0000199b, | 1575 | 0x00050051,0x00000006,0x000018c5,0x000018c4, |
| 1989 | 0x00001884,0x0000020a,0x0004003d,0x00000027, | 1576 | 0x00000001,0x00050051,0x00000006,0x000018c6, |
| 1990 | 0x0000199c,0x0000199b,0x00050081,0x00000027, | 1577 | 0x000018c4,0x00000000,0x00050080,0x00000006, |
| 1991 | 0x0000199d,0x0000199a,0x0000199c,0x00050041, | 1578 | 0x000018cb,0x00001866,0x000018c5,0x00050050, |
| 1992 | 0x00000028,0x0000199e,0x00001884,0x00000212, | 1579 | 0x00000007,0x000018cc,0x000018c6,0x000018cb, |
| 1993 | 0x0004003d,0x00000027,0x0000199f,0x0000199e, | 1580 | 0x0004007c,0x00000014,0x000018bc,0x000018cc, |
| 1994 | 0x00050085,0x00000027,0x000019a2,0x0000199f, | 1581 | 0x00060041,0x000000db,0x000018b3,0x000018bc, |
| 1995 | 0x00002b6c,0x00050041,0x00000028,0x000019a3, | 1582 | 0x000000da,0x000000da,0x0006003d,0x00000006, |
| 1996 | 0x00001884,0x0000021a,0x0004003d,0x00000027, | 1583 | 0x000018b4,0x000018b3,0x00000002,0x00000004, |
| 1997 | 0x000019a4,0x000019a3,0x00050085,0x00000027, | 1584 | 0x0004007c,0x00000027,0x0000182c,0x000018b4, |
| 1998 | 0x000019a7,0x000019a4,0x00002b6d,0x00050081, | 1585 | 0x00070050,0x000002bc,0x0000182d,0x0000181a, |
| 1999 | 0x00000027,0x000019a8,0x000019a2,0x000019a7, | 1586 | 0x00001820,0x00001826,0x0000182c,0x0008004f, |
| 2000 | 0x00050041,0x00000028,0x000019a9,0x00001884, | 1587 | 0x0000004b,0x00001830,0x0000182d,0x0000182d, |
| 2001 | 0x00000230,0x0004003d,0x00000027,0x000019aa, | 1588 | 0x00000000,0x00000001,0x00000002,0x00050094, |
| 2002 | 0x000019a9,0x00050085,0x00000027,0x000019ad, | 1589 | 0x00000027,0x00001832,0x00001830,0x00001783, |
| 2003 | 0x000019aa,0x00002b6e,0x00050081,0x00000027, | 1590 | 0x00050081,0x00000027,0x00001835,0x00001832, |
| 2004 | 0x000019ae,0x000019a8,0x000019ad,0x00050041, | 1591 | 0x0000182c,0x00050041,0x00000028,0x00001836, |
| 2005 | 0x00000028,0x000019af,0x00001884,0x000004d5, | 1592 | 0x00001805,0x00003247,0x0003003e,0x00001836, |
| 2006 | 0x0004003d,0x00000027,0x000019b0,0x000019af, | 1593 | 0x00001835,0x00050080,0x00000006,0x00001839, |
| 2007 | 0x00050081,0x00000027,0x000019b1,0x000019ae, | 1594 | 0x00003247,0x00000154,0x000200f9,0x0000180f, |
| 2008 | 0x000019b0,0x00050041,0x00000028,0x000019b2, | 1595 | 0x000200f8,0x0000183a,0x0004003d,0x0000004b, |
| 2009 | 0x00001884,0x00000305,0x0004003d,0x00000027, | 1596 | 0x0000183b,0x00001805,0x000200f9,0x0000183c, |
| 2010 | 0x000019b3,0x000019b2,0x00050085,0x00000027, | 1597 | 0x000200f8,0x0000183c,0x000700f5,0x0000004b, |
| 2011 | 0x000019b6,0x000019b3,0x00002b6c,0x00050041, | 1598 | 0x00003248,0x00001783,0x0000180c,0x0000183b, |
| 2012 | 0x00000028,0x000019b7,0x00001884,0x0000024d, | 1599 | 0x0000183a,0x00050041,0x0000004c,0x00001655, |
| 2013 | 0x0004003d,0x00000027,0x000019b8,0x000019b7, | 1600 | 0x0000161a,0x0000323a,0x0003003e,0x00001655, |
| 2014 | 0x00050085,0x00000027,0x000019bb,0x000019b8, | 1601 | 0x00003248,0x000200f9,0x00001656,0x000200f8, |
| 2015 | 0x00002b6d,0x00050081,0x00000027,0x000019bc, | 1602 | 0x00001656,0x00050080,0x00000006,0x00001658, |
| 2016 | 0x000019b6,0x000019bb,0x00050041,0x00000028, | 1603 | 0x0000323a,0x00000154,0x000200f9,0x00001648, |
| 2017 | 0x000019bd,0x00001884,0x00000263,0x0004003d, | 1604 | 0x000200f8,0x00001659,0x00050041,0x000000fe, |
| 2018 | 0x00000027,0x000019be,0x000019bd,0x00050085, | 1605 | 0x0000165a,0x000000fc,0x00000308,0x0004003d, |
| 2019 | 0x00000027,0x000019c1,0x000019be,0x00002b6e, | 1606 | 0x00000006,0x0000165b,0x0000165a,0x00050080, |
| 2020 | 0x00050081,0x00000027,0x000019c2,0x000019bc, | 1607 | 0x00000006,0x0000165d,0x0000165b,0x00000b11, |
| 2021 | 0x000019c1,0x00050041,0x00000028,0x000019c3, | 1608 | 0x00050041,0x000000fe,0x0000165e,0x000000fc, |
| 2022 | 0x00001884,0x00000278,0x0004003d,0x00000027, | 1609 | 0x0000022c,0x0004003d,0x00000006,0x0000165f, |
| 2023 | 0x000019c4,0x000019c3,0x00050081,0x00000027, | 1610 | 0x0000165e,0x00050084,0x00000006,0x00001661, |
| 2024 | 0x000019c5,0x000019c2,0x000019c4,0x00060050, | 1611 | 0x00000107,0x0000165d,0x00050080,0x00000006, |
| 2025 | 0x0000004b,0x000019c6,0x0000199d,0x000019b1, | 1612 | 0x00001662,0x0000165f,0x00001661,0x000200f9, |
| 2026 | 0x000019c5,0x0007000c,0x0000004b,0x000019c9, | 1613 | 0x00001663,0x000200f8,0x00001663,0x000700f5, |
| 2027 | 0x00000001,0x00000025,0x00002af9,0x000019c6, | 1614 | 0x00000006,0x0000323b,0x000000a6,0x00001659, |
| 2028 | 0x0007000c,0x0000004b,0x000019cc,0x00000001, | 1615 | 0x0000168a,0x00001667,0x000500b0,0x0000002f, |
| 2029 | 0x00000028,0x00002b0b,0x000019c6,0x00050080, | 1616 | 0x00001666,0x0000323b,0x000002b7,0x000400f6, |
| 2030 | 0x00000006,0x000019cf,0x00002ad6,0x00000151, | 1617 | 0x0000168b,0x00001667,0x00000000,0x000400fa, |
| 2031 | 0x000200f9,0x00001963,0x000200f8,0x000019d0, | 1618 | 0x00001666,0x00001667,0x0000168b,0x000200f8, |
| 2032 | 0x000200f9,0x000019d1,0x000200f8,0x000019d1, | 1619 | 0x00001667,0x00050084,0x00000006,0x0000166a, |
| 2033 | 0x000700f5,0x0000004b,0x00002b07,0x00002b66, | 1620 | 0x00000118,0x0000323b,0x00050080,0x00000006, |
| 2034 | 0x00001960,0x00002b0b,0x000019d0,0x000700f5, | 1621 | 0x0000166b,0x00001662,0x0000166a,0x00050041, |
| 2035 | 0x0000004b,0x00002af5,0x00002b64,0x00001960, | 1622 | 0x00000156,0x0000166d,0x000000fc,0x000000da, |
| 2036 | 0x00002af9,0x000019d0,0x000200f9,0x000019d2, | 1623 | 0x0004003d,0x00000007,0x0000166e,0x0000166d, |
| 2037 | 0x000200f8,0x000019d2,0x000700f5,0x0000004b, | 1624 | 0x00060041,0x00000028,0x0000166f,0x0000161a, |
| 2038 | 0x00002b05,0x00002b66,0x00001bb7,0x00002b07, | 1625 | 0x0000323b,0x000000a6,0x0004003d,0x00000027, |
| 2039 | 0x000019d1,0x000700f5,0x0000004b,0x00002af3, | 1626 | 0x00001670,0x0000166f,0x0004007c,0x00000006, |
| 2040 | 0x00002b64,0x00001bb7,0x00002af5,0x000019d1, | 1627 | 0x000018d2,0x00001670,0x00050051,0x00000006, |
| 2041 | 0x000700f5,0x00000006,0x00002adf,0x0000037d, | 1628 | 0x000018eb,0x0000166e,0x00000000,0x00050095, |
| 2042 | 0x00001bb7,0x00001bd5,0x000019d1,0x00050041, | 1629 | 0x000000ab,0x000018ed,0x000018eb,0x0000166b, |
| 2043 | 0x00000028,0x000019d3,0x00001884,0x000000d7, | 1630 | 0x00050051,0x00000006,0x000018ee,0x000018ed, |
| 2044 | 0x0004003d,0x00000027,0x000019d4,0x000019d3, | 1631 | 0x00000001,0x00050051,0x00000006,0x000018ef, |
| 2045 | 0x000500b4,0x0000002f,0x000019d5,0x000019d4, | 1632 | 0x000018ed,0x00000000,0x00050051,0x00000006, |
| 2046 | 0x000004f9,0x000300f7,0x000019da,0x00000000, | 1633 | 0x000018f2,0x0000166e,0x00000001,0x00050080, |
| 2047 | 0x000400fa,0x000019d5,0x000019d6,0x000019da, | 1634 | 0x00000006,0x000018f4,0x000018f2,0x000018ee, |
| 2048 | 0x000200f8,0x000019d6,0x00050041,0x00000028, | 1635 | 0x00050050,0x00000007,0x000018f5,0x000018ef, |
| 2049 | 0x000019d7,0x00001884,0x00000151,0x0004003d, | 1636 | 0x000018f4,0x0004007c,0x00000014,0x000018e5, |
| 2050 | 0x00000027,0x000019d8,0x000019d7,0x000500b4, | 1637 | 0x000018f5,0x00060041,0x000000db,0x000018dd, |
| 2051 | 0x0000002f,0x000019d9,0x000019d8,0x0000026a, | 1638 | 0x000018e5,0x000000da,0x000000da,0x0005003e, |
| 2052 | 0x000200f9,0x000019da,0x000200f8,0x000019da, | 1639 | 0x000018dd,0x000018d2,0x00000002,0x00000004, |
| 2053 | 0x000700f5,0x0000002f,0x000019db,0x000019d5, | 1640 | 0x00050080,0x00000006,0x00001676,0x0000166b, |
| 2054 | 0x000019d2,0x000019d9,0x000019d6,0x000300f7, | 1641 | 0x0000010a,0x00060041,0x00000028,0x0000167a, |
| 2055 | 0x000019e0,0x00000000,0x000400fa,0x000019db, | 1642 | 0x0000161a,0x0000323b,0x000000b0,0x0004003d, |
| 2056 | 0x000019dc,0x000019e0,0x000200f8,0x000019dc, | 1643 | 0x00000027,0x0000167b,0x0000167a,0x0004007c, |
| 2057 | 0x00050041,0x00000028,0x000019dd,0x00001884, | 1644 | 0x00000006,0x000018fb,0x0000167b,0x00050095, |
| 2058 | 0x00000202,0x0004003d,0x00000027,0x000019de, | 1645 | 0x000000ab,0x00001916,0x000018eb,0x00001676, |
| 2059 | 0x000019dd,0x000500b4,0x0000002f,0x000019df, | 1646 | 0x00050051,0x00000006,0x00001917,0x00001916, |
| 2060 | 0x000019de,0x0000026a,0x000200f9,0x000019e0, | 1647 | 0x00000001,0x00050051,0x00000006,0x00001918, |
| 2061 | 0x000200f8,0x000019e0,0x000700f5,0x0000002f, | 1648 | 0x00001916,0x00000000,0x00050080,0x00000006, |
| 2062 | 0x000019e1,0x000019db,0x000019da,0x000019df, | 1649 | 0x0000191d,0x000018f2,0x00001917,0x00050050, |
| 2063 | 0x000019dc,0x000300f7,0x000019e6,0x00000000, | 1650 | 0x00000007,0x0000191e,0x00001918,0x0000191d, |
| 2064 | 0x000400fa,0x000019e1,0x000019e2,0x000019e6, | 1651 | 0x0004007c,0x00000014,0x0000190e,0x0000191e, |
| 2065 | 0x000200f8,0x000019e2,0x00050041,0x00000028, | 1652 | 0x00060041,0x000000db,0x00001906,0x0000190e, |
| 2066 | 0x000019e3,0x00001884,0x00000212,0x0004003d, | 1653 | 0x000000da,0x000000da,0x0005003e,0x00001906, |
| 2067 | 0x00000027,0x000019e4,0x000019e3,0x000500b4, | 1654 | 0x000018fb,0x00000002,0x00000004,0x00050080, |
| 2068 | 0x0000002f,0x000019e5,0x000019e4,0x0000026a, | 1655 | 0x00000006,0x00001681,0x0000166b,0x00000111, |
| 2069 | 0x000200f9,0x000019e6,0x000200f8,0x000019e6, | 1656 | 0x00060041,0x00000028,0x00001685,0x0000161a, |
| 2070 | 0x000700f5,0x0000002f,0x000019e7,0x000019e1, | 1657 | 0x0000323b,0x00000170,0x0004003d,0x00000027, |
| 2071 | 0x000019e0,0x000019e5,0x000019e2,0x000300f7, | 1658 | 0x00001686,0x00001685,0x0004007c,0x00000006, |
| 2072 | 0x000019ec,0x00000000,0x000400fa,0x000019e7, | 1659 | 0x00001924,0x00001686,0x00050095,0x000000ab, |
| 2073 | 0x000019e8,0x000019ec,0x000200f8,0x000019e8, | 1660 | 0x0000193f,0x000018eb,0x00001681,0x00050051, |
| 2074 | 0x00050041,0x00000028,0x000019e9,0x00001884, | 1661 | 0x00000006,0x00001940,0x0000193f,0x00000001, |
| 2075 | 0x0000021a,0x0004003d,0x00000027,0x000019ea, | 1662 | 0x00050051,0x00000006,0x00001941,0x0000193f, |
| 2076 | 0x000019e9,0x000500b4,0x0000002f,0x000019eb, | 1663 | 0x00000000,0x00050080,0x00000006,0x00001946, |
| 2077 | 0x000019ea,0x000004f9,0x000200f9,0x000019ec, | 1664 | 0x000018f2,0x00001940,0x00050050,0x00000007, |
| 2078 | 0x000200f8,0x000019ec,0x000700f5,0x0000002f, | 1665 | 0x00001947,0x00001941,0x00001946,0x0004007c, |
| 2079 | 0x000019ed,0x000019e7,0x000019e6,0x000019eb, | 1666 | 0x00000014,0x00001937,0x00001947,0x00060041, |
| 2080 | 0x000019e8,0x000300f7,0x000019f2,0x00000000, | 1667 | 0x000000db,0x0000192f,0x00001937,0x000000da, |
| 2081 | 0x000400fa,0x000019ed,0x000019ee,0x000019f2, | 1668 | 0x000000da,0x0005003e,0x0000192f,0x00001924, |
| 2082 | 0x000200f8,0x000019ee,0x00050041,0x00000028, | ||
| 2083 | 0x000019ef,0x00001884,0x00000230,0x0004003d, | ||
| 2084 | 0x00000027,0x000019f0,0x000019ef,0x000500b4, | ||
| 2085 | 0x0000002f,0x000019f1,0x000019f0,0x0000026a, | ||
| 2086 | 0x000200f9,0x000019f2,0x000200f8,0x000019f2, | ||
| 2087 | 0x000700f5,0x0000002f,0x000019f3,0x000019ed, | ||
| 2088 | 0x000019ec,0x000019f1,0x000019ee,0x000300f7, | ||
| 2089 | 0x000019f8,0x00000000,0x000400fa,0x000019f3, | ||
| 2090 | 0x000019f4,0x000019f8,0x000200f8,0x000019f4, | ||
| 2091 | 0x00050041,0x00000028,0x000019f5,0x00001884, | ||
| 2092 | 0x00000305,0x0004003d,0x00000027,0x000019f6, | ||
| 2093 | 0x000019f5,0x000500b4,0x0000002f,0x000019f7, | ||
| 2094 | 0x000019f6,0x0000026a,0x000200f9,0x000019f8, | ||
| 2095 | 0x000200f8,0x000019f8,0x000700f5,0x0000002f, | ||
| 2096 | 0x000019f9,0x000019f3,0x000019f2,0x000019f7, | ||
| 2097 | 0x000019f4,0x000300f7,0x000019fe,0x00000000, | ||
| 2098 | 0x000400fa,0x000019f9,0x000019fa,0x000019fe, | ||
| 2099 | 0x000200f8,0x000019fa,0x00050041,0x00000028, | ||
| 2100 | 0x000019fb,0x00001884,0x0000024d,0x0004003d, | ||
| 2101 | 0x00000027,0x000019fc,0x000019fb,0x000500b4, | ||
| 2102 | 0x0000002f,0x000019fd,0x000019fc,0x0000026a, | ||
| 2103 | 0x000200f9,0x000019fe,0x000200f8,0x000019fe, | ||
| 2104 | 0x000700f5,0x0000002f,0x000019ff,0x000019f9, | ||
| 2105 | 0x000019f8,0x000019fd,0x000019fa,0x000300f7, | ||
| 2106 | 0x00001a04,0x00000000,0x000400fa,0x000019ff, | ||
| 2107 | 0x00001a00,0x00001a04,0x000200f8,0x00001a00, | ||
| 2108 | 0x00050041,0x00000028,0x00001a01,0x00001884, | ||
| 2109 | 0x00000263,0x0004003d,0x00000027,0x00001a02, | ||
| 2110 | 0x00001a01,0x000500b4,0x0000002f,0x00001a03, | ||
| 2111 | 0x00001a02,0x000004f9,0x000200f9,0x00001a04, | ||
| 2112 | 0x000200f8,0x00001a04,0x000700f5,0x0000002f, | ||
| 2113 | 0x00001a05,0x000019ff,0x000019fe,0x00001a03, | ||
| 2114 | 0x00001a00,0x00050080,0x00000006,0x00001a07, | ||
| 2115 | 0x00001916,0x0000037b,0x000500c7,0x00000006, | ||
| 2116 | 0x00001a09,0x00002adf,0x0000052e,0x000600a9, | ||
| 2117 | 0x00000006,0x00001a0b,0x00001a05,0x0000012d, | ||
| 2118 | 0x000000a3,0x000500c5,0x00000006,0x00001a0c, | ||
| 2119 | 0x00001a09,0x00001a0b,0x00050095,0x000000a8, | ||
| 2120 | 0x00001ce3,0x00001b83,0x00001a07,0x00050051, | ||
| 2121 | 0x00000006,0x00001ce4,0x00001ce3,0x00000001, | ||
| 2122 | 0x00050051,0x00000006,0x00001ce5,0x00001ce3, | ||
| 2123 | 0x00000000,0x00050080,0x00000006,0x00001cea, | ||
| 2124 | 0x00001b8a,0x00001ce4,0x00050050,0x00000007, | ||
| 2125 | 0x00001ceb,0x00001ce5,0x00001cea,0x0004007c, | ||
| 2126 | 0x00000014,0x00001cdb,0x00001ceb,0x00060041, | ||
| 2127 | 0x000000d8,0x00001cd3,0x00001cdb,0x000000d7, | ||
| 2128 | 0x000000d7,0x0005003e,0x00001cd3,0x00001a0c, | ||
| 2129 | 0x00000002,0x00000004,0x00050080,0x00000006, | ||
| 2130 | 0x00001a11,0x00001916,0x00000385,0x000500c2, | ||
| 2131 | 0x00000006,0x00001a14,0x00001b0b,0x00000305, | ||
| 2132 | 0x000500c4,0x00000006,0x00001a17,0x00001b2c, | ||
| 2133 | 0x0000047b,0x000500c5,0x00000006,0x00001a18, | ||
| 2134 | 0x00001a14,0x00001a17,0x00050095,0x000000a8, | ||
| 2135 | 0x00001d03,0x00001b83,0x00001a11,0x00050051, | ||
| 2136 | 0x00000006,0x00001d04,0x00001d03,0x00000001, | ||
| 2137 | 0x00050051,0x00000006,0x00001d05,0x00001d03, | ||
| 2138 | 0x00000000,0x00050080,0x00000006,0x00001d0a, | ||
| 2139 | 0x00001b8a,0x00001d04,0x00050050,0x00000007, | ||
| 2140 | 0x00001d0b,0x00001d05,0x00001d0a,0x0004007c, | ||
| 2141 | 0x00000014,0x00001cfb,0x00001d0b,0x00060041, | ||
| 2142 | 0x000000d8,0x00001cf3,0x00001cfb,0x000000d7, | ||
| 2143 | 0x000000d7,0x0005003e,0x00001cf3,0x00001a18, | ||
| 2144 | 0x00000002,0x00000004,0x0004003d,0x00000027, | ||
| 2145 | 0x00001a1d,0x000019d3,0x00050041,0x00000028, | ||
| 2146 | 0x00001a1e,0x00001884,0x00000212,0x0004003d, | ||
| 2147 | 0x00000027,0x00001a1f,0x00001a1e,0x00050041, | ||
| 2148 | 0x00000028,0x00001a20,0x00001884,0x00000305, | ||
| 2149 | 0x0004003d,0x00000027,0x00001a21,0x00001a20, | ||
| 2150 | 0x00050041,0x00000028,0x00001a22,0x00001884, | ||
| 2151 | 0x00000151,0x0004003d,0x00000027,0x00001a23, | ||
| 2152 | 0x00001a22,0x00050041,0x00000028,0x00001a24, | ||
| 2153 | 0x00001884,0x0000021a,0x0004003d,0x00000027, | ||
| 2154 | 0x00001a25,0x00001a24,0x00050041,0x00000028, | ||
| 2155 | 0x00001a26,0x00001884,0x0000024d,0x0004003d, | ||
| 2156 | 0x00000027,0x00001a27,0x00001a26,0x00050041, | ||
| 2157 | 0x00000028,0x00001a28,0x00001884,0x00000202, | ||
| 2158 | 0x0004003d,0x00000027,0x00001a29,0x00001a28, | ||
| 2159 | 0x00050041,0x00000028,0x00001a2a,0x00001884, | ||
| 2160 | 0x00000230,0x0004003d,0x00000027,0x00001a2b, | ||
| 2161 | 0x00001a2a,0x00050041,0x00000028,0x00001a2c, | ||
| 2162 | 0x00001884,0x00000263,0x0004003d,0x00000027, | ||
| 2163 | 0x00001a2d,0x00001a2c,0x00060050,0x0000004b, | ||
| 2164 | 0x00001a2e,0x00001a1d,0x00001a1f,0x00001a21, | ||
| 2165 | 0x00060050,0x0000004b,0x00001a2f,0x00001a23, | ||
| 2166 | 0x00001a25,0x00001a27,0x00060050,0x0000004b, | ||
| 2167 | 0x00001a30,0x00001a29,0x00001a2b,0x00001a2d, | ||
| 2168 | 0x00060050,0x00000548,0x00001a31,0x00001a2e, | ||
| 2169 | 0x00001a2f,0x00001a30,0x0006000c,0x00000027, | ||
| 2170 | 0x00001a33,0x00000001,0x00000021,0x00001a31, | ||
| 2171 | 0x000500b7,0x0000002f,0x00001a35,0x00001a33, | ||
| 2172 | 0x0000026a,0x000300f7,0x00001a3a,0x00000000, | ||
| 2173 | 0x000400fa,0x00001a35,0x00001a36,0x00001a39, | ||
| 2174 | 0x000200f8,0x00001a36,0x0006000c,0x00000548, | ||
| 2175 | 0x00001a38,0x00000001,0x00000022,0x00001a31, | ||
| 2176 | 0x000200f9,0x00001a3a,0x000200f8,0x00001a39, | ||
| 2177 | 0x000200f9,0x00001a3a,0x000200f8,0x00001a3a, | ||
| 2178 | 0x000700f5,0x00000548,0x00002ae6,0x00001a38, | ||
| 2179 | 0x00001a36,0x0000056e,0x00001a39,0x0003003e, | ||
| 2180 | 0x000018c5,0x00002ae6,0x00050041,0x00000028, | ||
| 2181 | 0x00001a3c,0x00001884,0x0000020a,0x0004003d, | ||
| 2182 | 0x00000027,0x00001a3d,0x00001a3c,0x00050041, | ||
| 2183 | 0x00000028,0x00001a3e,0x00001884,0x000004d5, | ||
| 2184 | 0x0004003d,0x00000027,0x00001a3f,0x00001a3e, | ||
| 2185 | 0x00050041,0x00000028,0x00001a40,0x00001884, | ||
| 2186 | 0x00000278,0x0004003d,0x00000027,0x00001a41, | ||
| 2187 | 0x00001a40,0x00060050,0x0000004b,0x00001a42, | ||
| 2188 | 0x00001a3d,0x00001a3f,0x00001a41,0x00050091, | ||
| 2189 | 0x0000004b,0x00001a45,0x00002ae6,0x00001a42, | ||
| 2190 | 0x0004007f,0x0000004b,0x00001a46,0x00001a45, | ||
| 2191 | 0x0003003e,0x000018c8,0x00001a46,0x000200f9, | ||
| 2192 | 0x00001a47,0x000200f8,0x00001a47,0x000700f5, | ||
| 2193 | 0x00000006,0x00002ae7,0x000000a3,0x00001a3a, | ||
| 2194 | 0x00001a7a,0x00001a4b,0x000500b0,0x0000002f, | ||
| 2195 | 0x00001a4a,0x00002ae7,0x000002b4,0x000400f6, | ||
| 2196 | 0x00001a7b,0x00001a4b,0x00000000,0x000400fa, | ||
| 2197 | 0x00001a4a,0x00001a4b,0x00001a7b,0x000200f8, | ||
| 2198 | 0x00001a4b,0x00050080,0x00000006,0x00001a4d, | ||
| 2199 | 0x00001916,0x00000104,0x00050084,0x00000006, | ||
| 2200 | 0x00001a4f,0x0000011c,0x00002ae7,0x00050080, | ||
| 2201 | 0x00000006,0x00001a50,0x00001a4d,0x00001a4f, | ||
| 2202 | 0x00060041,0x00000028,0x00001a54,0x000018c5, | ||
| 2203 | 0x000000d7,0x00002ae7,0x0004003d,0x00000027, | ||
| 2204 | 0x00001a55,0x00001a54,0x0004007c,0x00000006, | ||
| 2205 | 0x00001d11,0x00001a55,0x00050095,0x000000a8, | ||
| 2206 | 0x00001d2c,0x00001b83,0x00001a50,0x00050051, | ||
| 2207 | 0x00000006,0x00001d2d,0x00001d2c,0x00000001, | ||
| 2208 | 0x00050051,0x00000006,0x00001d2e,0x00001d2c, | ||
| 2209 | 0x00000000,0x00050080,0x00000006,0x00001d33, | ||
| 2210 | 0x00001b8a,0x00001d2d,0x00050050,0x00000007, | ||
| 2211 | 0x00001d34,0x00001d2e,0x00001d33,0x0004007c, | ||
| 2212 | 0x00000014,0x00001d24,0x00001d34,0x00060041, | ||
| 2213 | 0x000000d8,0x00001d1c,0x00001d24,0x000000d7, | ||
| 2214 | 0x000000d7,0x0005003e,0x00001d1c,0x00001d11, | ||
| 2215 | 0x00000002,0x00000004,0x00050080,0x00000006, | 1669 | 0x00000002,0x00000004,0x00050080,0x00000006, |
| 2216 | 0x00001a58,0x00001916,0x00000594,0x00050080, | 1670 | 0x0000168a,0x0000323b,0x00000154,0x000200f9, |
| 2217 | 0x00000006,0x00001a5b,0x00001a58,0x00001a4f, | 1671 | 0x00001663,0x000200f8,0x0000168b,0x00050080, |
| 2218 | 0x00060041,0x00000028,0x00001a5f,0x000018c5, | 1672 | 0x00000006,0x0000168d,0x00001662,0x00000347, |
| 2219 | 0x00000151,0x00002ae7,0x0004003d,0x00000027, | 1673 | 0x00050041,0x00000156,0x0000168e,0x000000fc, |
| 2220 | 0x00001a60,0x00001a5f,0x0004007c,0x00000006, | 1674 | 0x000000da,0x0004003d,0x00000007,0x0000168f, |
| 2221 | 0x00001d3a,0x00001a60,0x00050095,0x000000a8, | 1675 | 0x0000168e,0x00060041,0x00000028,0x00001690, |
| 2222 | 0x00001d55,0x00001b83,0x00001a5b,0x00050051, | 1676 | 0x0000161a,0x00000205,0x000000a6,0x0004003d, |
| 2223 | 0x00000006,0x00001d56,0x00001d55,0x00000001, | 1677 | 0x00000027,0x00001691,0x00001690,0x0004007c, |
| 2224 | 0x00050051,0x00000006,0x00001d57,0x00001d55, | 1678 | 0x00000006,0x0000194d,0x00001691,0x00050051, |
| 2225 | 0x00000000,0x00050080,0x00000006,0x00001d5c, | 1679 | 0x00000006,0x00001966,0x0000168f,0x00000000, |
| 2226 | 0x00001b8a,0x00001d56,0x00050050,0x00000007, | 1680 | 0x00050095,0x000000ab,0x00001968,0x00001966, |
| 2227 | 0x00001d5d,0x00001d57,0x00001d5c,0x0004007c, | 1681 | 0x0000168d,0x00050051,0x00000006,0x00001969, |
| 2228 | 0x00000014,0x00001d4d,0x00001d5d,0x00060041, | 1682 | 0x00001968,0x00000001,0x00050051,0x00000006, |
| 2229 | 0x000000d8,0x00001d45,0x00001d4d,0x000000d7, | 1683 | 0x0000196a,0x00001968,0x00000000,0x00050051, |
| 2230 | 0x000000d7,0x0005003e,0x00001d45,0x00001d3a, | 1684 | 0x00000006,0x0000196d,0x0000168f,0x00000001, |
| 1685 | 0x00050080,0x00000006,0x0000196f,0x0000196d, | ||
| 1686 | 0x00001969,0x00050050,0x00000007,0x00001970, | ||
| 1687 | 0x0000196a,0x0000196f,0x0004007c,0x00000014, | ||
| 1688 | 0x00001960,0x00001970,0x00060041,0x000000db, | ||
| 1689 | 0x00001958,0x00001960,0x000000da,0x000000da, | ||
| 1690 | 0x0005003e,0x00001958,0x0000194d,0x00000002, | ||
| 1691 | 0x00000004,0x00050080,0x00000006,0x00001694, | ||
| 1692 | 0x00001662,0x00000352,0x00060041,0x00000028, | ||
| 1693 | 0x00001697,0x0000161a,0x00000205,0x000000b0, | ||
| 1694 | 0x0004003d,0x00000027,0x00001698,0x00001697, | ||
| 1695 | 0x0004007c,0x00000006,0x00001976,0x00001698, | ||
| 1696 | 0x00050095,0x000000ab,0x00001991,0x00001966, | ||
| 1697 | 0x00001694,0x00050051,0x00000006,0x00001992, | ||
| 1698 | 0x00001991,0x00000001,0x00050051,0x00000006, | ||
| 1699 | 0x00001993,0x00001991,0x00000000,0x00050080, | ||
| 1700 | 0x00000006,0x00001998,0x0000196d,0x00001992, | ||
| 1701 | 0x00050050,0x00000007,0x00001999,0x00001993, | ||
| 1702 | 0x00001998,0x0004007c,0x00000014,0x00001989, | ||
| 1703 | 0x00001999,0x00060041,0x000000db,0x00001981, | ||
| 1704 | 0x00001989,0x000000da,0x000000da,0x0005003e, | ||
| 1705 | 0x00001981,0x00001976,0x00000002,0x00000004, | ||
| 1706 | 0x00050080,0x00000006,0x0000169b,0x00001662, | ||
| 1707 | 0x0000035d,0x00060041,0x00000028,0x0000169e, | ||
| 1708 | 0x0000161a,0x00000205,0x00000170,0x0004003d, | ||
| 1709 | 0x00000027,0x0000169f,0x0000169e,0x0004007c, | ||
| 1710 | 0x00000006,0x0000199f,0x0000169f,0x00050095, | ||
| 1711 | 0x000000ab,0x000019ba,0x00001966,0x0000169b, | ||
| 1712 | 0x00050051,0x00000006,0x000019bb,0x000019ba, | ||
| 1713 | 0x00000001,0x00050051,0x00000006,0x000019bc, | ||
| 1714 | 0x000019ba,0x00000000,0x00050080,0x00000006, | ||
| 1715 | 0x000019c1,0x0000196d,0x000019bb,0x00050050, | ||
| 1716 | 0x00000007,0x000019c2,0x000019bc,0x000019c1, | ||
| 1717 | 0x0004007c,0x00000014,0x000019b2,0x000019c2, | ||
| 1718 | 0x00060041,0x000000db,0x000019aa,0x000019b2, | ||
| 1719 | 0x000000da,0x000000da,0x0005003e,0x000019aa, | ||
| 1720 | 0x0000199f,0x00000002,0x00000004,0x00050080, | ||
| 1721 | 0x00000006,0x000016a2,0x00001662,0x00000368, | ||
| 1722 | 0x00050041,0x000000fe,0x000016a5,0x000000fc, | ||
| 1723 | 0x0000036a,0x0004003d,0x00000006,0x000016a6, | ||
| 1724 | 0x000016a5,0x00050095,0x000000ab,0x000019da, | ||
| 1725 | 0x00001966,0x000016a2,0x00050051,0x00000006, | ||
| 1726 | 0x000019db,0x000019da,0x00000001,0x00050051, | ||
| 1727 | 0x00000006,0x000019dc,0x000019da,0x00000000, | ||
| 1728 | 0x00050080,0x00000006,0x000019e1,0x0000196d, | ||
| 1729 | 0x000019db,0x00050050,0x00000007,0x000019e2, | ||
| 1730 | 0x000019dc,0x000019e1,0x0004007c,0x00000014, | ||
| 1731 | 0x000019d2,0x000019e2,0x00060041,0x000000db, | ||
| 1732 | 0x000019ca,0x000019d2,0x000000da,0x000000da, | ||
| 1733 | 0x0005003e,0x000019ca,0x000016a6,0x00000002, | ||
| 1734 | 0x00000004,0x00050080,0x00000006,0x000016a9, | ||
| 1735 | 0x00001662,0x00000374,0x00050095,0x000000ab, | ||
| 1736 | 0x000019fa,0x00001966,0x000016a9,0x00050051, | ||
| 1737 | 0x00000006,0x000019fb,0x000019fa,0x00000001, | ||
| 1738 | 0x00050051,0x00000006,0x000019fc,0x000019fa, | ||
| 1739 | 0x00000000,0x00050080,0x00000006,0x00001a01, | ||
| 1740 | 0x0000196d,0x000019fb,0x00050050,0x00000007, | ||
| 1741 | 0x00001a02,0x000019fc,0x00001a01,0x0004007c, | ||
| 1742 | 0x00000014,0x000019f2,0x00001a02,0x00060041, | ||
| 1743 | 0x000000db,0x000019ea,0x000019f2,0x000000da, | ||
| 1744 | 0x000000da,0x0005003e,0x000019ea,0x00000b11, | ||
| 2231 | 0x00000002,0x00000004,0x00050080,0x00000006, | 1745 | 0x00000002,0x00000004,0x00050080,0x00000006, |
| 2232 | 0x00001a63,0x00001916,0x000005a3,0x00050080, | 1746 | 0x000016af,0x00001662,0x0000037e,0x00050095, |
| 2233 | 0x00000006,0x00001a66,0x00001a63,0x00001a4f, | 1747 | 0x000000ab,0x00001a1a,0x00001966,0x000016af, |
| 2234 | 0x00060041,0x00000028,0x00001a6a,0x000018c5, | 1748 | 0x00050051,0x00000006,0x00001a1b,0x00001a1a, |
| 2235 | 0x00000202,0x00002ae7,0x0004003d,0x00000027, | 1749 | 0x00000001,0x00050051,0x00000006,0x00001a1c, |
| 2236 | 0x00001a6b,0x00001a6a,0x0004007c,0x00000006, | 1750 | 0x00001a1a,0x00000000,0x00050080,0x00000006, |
| 2237 | 0x00001d63,0x00001a6b,0x00050095,0x000000a8, | 1751 | 0x00001a21,0x0000196d,0x00001a1b,0x00050050, |
| 2238 | 0x00001d7e,0x00001b83,0x00001a66,0x00050051, | 1752 | 0x00000007,0x00001a22,0x00001a1c,0x00001a21, |
| 2239 | 0x00000006,0x00001d7f,0x00001d7e,0x00000001, | 1753 | 0x0004007c,0x00000014,0x00001a12,0x00001a22, |
| 2240 | 0x00050051,0x00000006,0x00001d80,0x00001d7e, | 1754 | 0x00060041,0x000000db,0x00001a0a,0x00001a12, |
| 2241 | 0x00000000,0x00050080,0x00000006,0x00001d85, | 1755 | 0x000000da,0x000000da,0x0005003e,0x00001a0a, |
| 2242 | 0x00001b8a,0x00001d7f,0x00050050,0x00000007, | 1756 | 0x00000380,0x00000002,0x00000004,0x00050080, |
| 2243 | 0x00001d86,0x00001d80,0x00001d85,0x0004007c, | 1757 | 0x00000006,0x000016b4,0x00001662,0x00000388, |
| 2244 | 0x00000014,0x00001d76,0x00001d86,0x00060041, | 1758 | 0x00050095,0x000000ab,0x00001a3a,0x00001966, |
| 2245 | 0x000000d8,0x00001d6e,0x00001d76,0x000000d7, | 1759 | 0x000016b4,0x00050051,0x00000006,0x00001a3b, |
| 2246 | 0x000000d7,0x0005003e,0x00001d6e,0x00001d63, | 1760 | 0x00001a3a,0x00000001,0x00050051,0x00000006, |
| 1761 | 0x00001a3c,0x00001a3a,0x00000000,0x00050080, | ||
| 1762 | 0x00000006,0x00001a41,0x0000196d,0x00001a3b, | ||
| 1763 | 0x00050050,0x00000007,0x00001a42,0x00001a3c, | ||
| 1764 | 0x00001a41,0x0004007c,0x00000014,0x00001a32, | ||
| 1765 | 0x00001a42,0x00060041,0x000000db,0x00001a2a, | ||
| 1766 | 0x00001a32,0x000000da,0x000000da,0x0005003e, | ||
| 1767 | 0x00001a2a,0x0000038a,0x00000002,0x00000004, | ||
| 1768 | 0x00050041,0x0000004c,0x000016b8,0x0000161a, | ||
| 1769 | 0x000000da,0x0004003d,0x0000004b,0x000016b9, | ||
| 1770 | 0x000016b8,0x0004009c,0x00000395,0x000016ba, | ||
| 1771 | 0x000016b9,0x0004009a,0x0000002f,0x000016bb, | ||
| 1772 | 0x000016ba,0x000400a8,0x0000002f,0x000016bc, | ||
| 1773 | 0x000016bb,0x000300f7,0x000016c2,0x00000000, | ||
| 1774 | 0x000400fa,0x000016bc,0x000016bd,0x000016c2, | ||
| 1775 | 0x000200f8,0x000016bd,0x00050041,0x0000004c, | ||
| 1776 | 0x000016be,0x0000161a,0x00000154,0x0004003d, | ||
| 1777 | 0x0000004b,0x000016bf,0x000016be,0x0004009c, | ||
| 1778 | 0x00000395,0x000016c0,0x000016bf,0x0004009a, | ||
| 1779 | 0x0000002f,0x000016c1,0x000016c0,0x000200f9, | ||
| 1780 | 0x000016c2,0x000200f8,0x000016c2,0x000700f5, | ||
| 1781 | 0x0000002f,0x000016c3,0x000016bb,0x0000168b, | ||
| 1782 | 0x000016c1,0x000016bd,0x000400a8,0x0000002f, | ||
| 1783 | 0x000016c4,0x000016c3,0x000300f7,0x000016ca, | ||
| 1784 | 0x00000000,0x000400fa,0x000016c4,0x000016c5, | ||
| 1785 | 0x000016ca,0x000200f8,0x000016c5,0x00050041, | ||
| 1786 | 0x0000004c,0x000016c6,0x0000161a,0x00000205, | ||
| 1787 | 0x0004003d,0x0000004b,0x000016c7,0x000016c6, | ||
| 1788 | 0x0004009c,0x00000395,0x000016c8,0x000016c7, | ||
| 1789 | 0x0004009a,0x0000002f,0x000016c9,0x000016c8, | ||
| 1790 | 0x000200f9,0x000016ca,0x000200f8,0x000016ca, | ||
| 1791 | 0x000700f5,0x0000002f,0x000016cb,0x000016c3, | ||
| 1792 | 0x000016c2,0x000016c9,0x000016c5,0x0004003d, | ||
| 1793 | 0x0000004b,0x000016cd,0x000016b8,0x00050041, | ||
| 1794 | 0x0000004c,0x000016ce,0x0000161a,0x00000154, | ||
| 1795 | 0x0004003d,0x0000004b,0x000016cf,0x000016ce, | ||
| 1796 | 0x0007000c,0x0000004b,0x000016d0,0x00000001, | ||
| 1797 | 0x00000025,0x000016cd,0x000016cf,0x00050041, | ||
| 1798 | 0x0000004c,0x000016d1,0x0000161a,0x00000205, | ||
| 1799 | 0x0004003d,0x0000004b,0x000016d2,0x000016d1, | ||
| 1800 | 0x0007000c,0x0000004b,0x000016d3,0x00000001, | ||
| 1801 | 0x00000025,0x000016d0,0x000016d2,0x0004003d, | ||
| 1802 | 0x0000004b,0x000016d5,0x000016b8,0x0004003d, | ||
| 1803 | 0x0000004b,0x000016d7,0x000016ce,0x0007000c, | ||
| 1804 | 0x0000004b,0x000016d8,0x00000001,0x00000028, | ||
| 1805 | 0x000016d5,0x000016d7,0x0004003d,0x0000004b, | ||
| 1806 | 0x000016da,0x000016d1,0x0007000c,0x0000004b, | ||
| 1807 | 0x000016db,0x00000001,0x00000028,0x000016d8, | ||
| 1808 | 0x000016da,0x00060050,0x00000395,0x000032a9, | ||
| 1809 | 0x000016cb,0x000016cb,0x000016cb,0x000600a9, | ||
| 1810 | 0x0000004b,0x000032aa,0x000032a9,0x000032a7, | ||
| 1811 | 0x000016db,0x000600a9,0x0000004b,0x000032ac, | ||
| 1812 | 0x000032a9,0x000032a5,0x000016d3,0x00050041, | ||
| 1813 | 0x000000fe,0x00001a8c,0x000000fc,0x000000fd, | ||
| 1814 | 0x0004003d,0x00000006,0x00001a8d,0x00001a8c, | ||
| 1815 | 0x00050084,0x00000006,0x00001a8e,0x0000011f, | ||
| 1816 | 0x00001a8d,0x00050080,0x00000006,0x00001a8f, | ||
| 1817 | 0x00000107,0x00001a8e,0x00050080,0x00000006, | ||
| 1818 | 0x00001a95,0x00001a8d,0x000032a8,0x00050086, | ||
| 1819 | 0x00000006,0x00001a96,0x00001a95,0x00000101, | ||
| 1820 | 0x00050084,0x00000006,0x00001a88,0x00000107, | ||
| 1821 | 0x00001a96,0x00050080,0x00000006,0x00001a89, | ||
| 1822 | 0x00001a8f,0x00001a88,0x00050084,0x00000006, | ||
| 1823 | 0x00001a59,0x00000150,0x0000165d,0x00050080, | ||
| 1824 | 0x00000006,0x00001a5a,0x00001a89,0x00001a59, | ||
| 1825 | 0x00050041,0x00000156,0x00001a5b,0x000000fc, | ||
| 1826 | 0x00000154,0x0004003d,0x00000007,0x00001a5c, | ||
| 1827 | 0x00001a5b,0x00050051,0x00000027,0x00001a5f, | ||
| 1828 | 0x000032ac,0x00000000,0x0004007c,0x00000006, | ||
| 1829 | 0x00001a9c,0x00001a5f,0x00050051,0x00000006, | ||
| 1830 | 0x00001ab5,0x00001a5c,0x00000000,0x00050095, | ||
| 1831 | 0x000000ab,0x00001ab7,0x00001ab5,0x00001a5a, | ||
| 1832 | 0x00050051,0x00000006,0x00001ab8,0x00001ab7, | ||
| 1833 | 0x00000001,0x00050051,0x00000006,0x00001ab9, | ||
| 1834 | 0x00001ab7,0x00000000,0x00050051,0x00000006, | ||
| 1835 | 0x00001abc,0x00001a5c,0x00000001,0x00050080, | ||
| 1836 | 0x00000006,0x00001abe,0x00001abc,0x00001ab8, | ||
| 1837 | 0x00050050,0x00000007,0x00001abf,0x00001ab9, | ||
| 1838 | 0x00001abe,0x0004007c,0x00000014,0x00001aaf, | ||
| 1839 | 0x00001abf,0x00060041,0x000000db,0x00001aa7, | ||
| 1840 | 0x00001aaf,0x000000da,0x000000da,0x0005003e, | ||
| 1841 | 0x00001aa7,0x00001a9c,0x00000002,0x00000004, | ||
| 1842 | 0x00050080,0x00000006,0x00001a62,0x00001a5a, | ||
| 1843 | 0x0000010a,0x00050051,0x00000027,0x00001a66, | ||
| 1844 | 0x000032ac,0x00000001,0x0004007c,0x00000006, | ||
| 1845 | 0x00001ac5,0x00001a66,0x00050095,0x000000ab, | ||
| 1846 | 0x00001ae0,0x00001ab5,0x00001a62,0x00050051, | ||
| 1847 | 0x00000006,0x00001ae1,0x00001ae0,0x00000001, | ||
| 1848 | 0x00050051,0x00000006,0x00001ae2,0x00001ae0, | ||
| 1849 | 0x00000000,0x00050080,0x00000006,0x00001ae7, | ||
| 1850 | 0x00001abc,0x00001ae1,0x00050050,0x00000007, | ||
| 1851 | 0x00001ae8,0x00001ae2,0x00001ae7,0x0004007c, | ||
| 1852 | 0x00000014,0x00001ad8,0x00001ae8,0x00060041, | ||
| 1853 | 0x000000db,0x00001ad0,0x00001ad8,0x000000da, | ||
| 1854 | 0x000000da,0x0005003e,0x00001ad0,0x00001ac5, | ||
| 2247 | 0x00000002,0x00000004,0x00050080,0x00000006, | 1855 | 0x00000002,0x00000004,0x00050080,0x00000006, |
| 2248 | 0x00001a6e,0x00001916,0x000005b2,0x00050080, | 1856 | 0x00001a69,0x00001a5a,0x00000111,0x00050051, |
| 2249 | 0x00000006,0x00001a71,0x00001a6e,0x00001a4f, | 1857 | 0x00000027,0x00001a6d,0x000032ac,0x00000002, |
| 2250 | 0x00050041,0x00000028,0x00001a75,0x000018c8, | 1858 | 0x0004007c,0x00000006,0x00001aee,0x00001a6d, |
| 2251 | 0x00002ae7,0x0004003d,0x00000027,0x00001a76, | 1859 | 0x00050095,0x000000ab,0x00001b09,0x00001ab5, |
| 2252 | 0x00001a75,0x0004007c,0x00000006,0x00001d8c, | 1860 | 0x00001a69,0x00050051,0x00000006,0x00001b0a, |
| 2253 | 0x00001a76,0x00050095,0x000000a8,0x00001da7, | 1861 | 0x00001b09,0x00000001,0x00050051,0x00000006, |
| 2254 | 0x00001b83,0x00001a71,0x00050051,0x00000006, | 1862 | 0x00001b0b,0x00001b09,0x00000000,0x00050080, |
| 2255 | 0x00001da8,0x00001da7,0x00000001,0x00050051, | 1863 | 0x00000006,0x00001b10,0x00001abc,0x00001b0a, |
| 2256 | 0x00000006,0x00001da9,0x00001da7,0x00000000, | 1864 | 0x00050050,0x00000007,0x00001b11,0x00001b0b, |
| 2257 | 0x00050080,0x00000006,0x00001dae,0x00001b8a, | 1865 | 0x00001b10,0x0004007c,0x00000014,0x00001b01, |
| 2258 | 0x00001da8,0x00050050,0x00000007,0x00001daf, | 1866 | 0x00001b11,0x00060041,0x000000db,0x00001af9, |
| 2259 | 0x00001da9,0x00001dae,0x0004007c,0x00000014, | 1867 | 0x00001b01,0x000000da,0x000000da,0x0005003e, |
| 2260 | 0x00001d9f,0x00001daf,0x00060041,0x000000d8, | 1868 | 0x00001af9,0x00001aee,0x00000002,0x00000004, |
| 2261 | 0x00001d97,0x00001d9f,0x000000d7,0x000000d7, | 1869 | 0x00050080,0x00000006,0x00001a70,0x00001a5a, |
| 2262 | 0x0005003e,0x00001d97,0x00001d8c,0x00000002, | 1870 | 0x00000118,0x00050051,0x00000027,0x00001a74, |
| 2263 | 0x00000004,0x00050080,0x00000006,0x00001a7a, | 1871 | 0x000032aa,0x00000000,0x0004007c,0x00000006, |
| 2264 | 0x00002ae7,0x00000151,0x000200f9,0x00001a47, | 1872 | 0x00001b17,0x00001a74,0x00050095,0x000000ab, |
| 2265 | 0x000200f8,0x00001a7b,0x00050080,0x00000006, | 1873 | 0x00001b32,0x00001ab5,0x00001a70,0x00050051, |
| 2266 | 0x00001a7d,0x00001916,0x000005c3,0x00050095, | 1874 | 0x00000006,0x00001b33,0x00001b32,0x00000001, |
| 2267 | 0x000000a8,0x00001dc7,0x00001b83,0x00001a7d, | 1875 | 0x00050051,0x00000006,0x00001b34,0x00001b32, |
| 2268 | 0x00050051,0x00000006,0x00001dc8,0x00001dc7, | 1876 | 0x00000000,0x00050080,0x00000006,0x00001b39, |
| 2269 | 0x00000001,0x00050051,0x00000006,0x00001dc9, | 1877 | 0x00001abc,0x00001b33,0x00050050,0x00000007, |
| 2270 | 0x00001dc7,0x00000000,0x00050080,0x00000006, | 1878 | 0x00001b3a,0x00001b34,0x00001b39,0x0004007c, |
| 2271 | 0x00001dce,0x00001b8a,0x00001dc8,0x00050050, | 1879 | 0x00000014,0x00001b2a,0x00001b3a,0x00060041, |
| 2272 | 0x00000007,0x00001dcf,0x00001dc9,0x00001dce, | 1880 | 0x000000db,0x00001b22,0x00001b2a,0x000000da, |
| 2273 | 0x0004007c,0x00000014,0x00001dbf,0x00001dcf, | 1881 | 0x000000da,0x0005003e,0x00001b22,0x00001b17, |
| 2274 | 0x00060041,0x000000d8,0x00001db7,0x00001dbf, | ||
| 2275 | 0x000000d7,0x000000d7,0x0005003e,0x00001db7, | ||
| 2276 | 0x000009e9,0x00000002,0x00000004,0x00050080, | ||
| 2277 | 0x00000006,0x00001a83,0x00001916,0x000005cd, | ||
| 2278 | 0x00050095,0x000000a8,0x00001de7,0x00001b83, | ||
| 2279 | 0x00001a83,0x00050051,0x00000006,0x00001de8, | ||
| 2280 | 0x00001de7,0x00000001,0x00050051,0x00000006, | ||
| 2281 | 0x00001de9,0x00001de7,0x00000000,0x00050080, | ||
| 2282 | 0x00000006,0x00001dee,0x00001b8a,0x00001de8, | ||
| 2283 | 0x00050050,0x00000007,0x00001def,0x00001de9, | ||
| 2284 | 0x00001dee,0x0004007c,0x00000014,0x00001ddf, | ||
| 2285 | 0x00001def,0x00060041,0x000000d8,0x00001dd7, | ||
| 2286 | 0x00001ddf,0x000000d7,0x000000d7,0x0005003e, | ||
| 2287 | 0x00001dd7,0x0000037d,0x00000002,0x00000004, | ||
| 2288 | 0x00050080,0x00000006,0x00001a88,0x00001916, | ||
| 2289 | 0x000005d6,0x00050095,0x000000a8,0x00001e07, | ||
| 2290 | 0x00001b83,0x00001a88,0x00050051,0x00000006, | ||
| 2291 | 0x00001e08,0x00001e07,0x00000001,0x00050051, | ||
| 2292 | 0x00000006,0x00001e09,0x00001e07,0x00000000, | ||
| 2293 | 0x00050080,0x00000006,0x00001e0e,0x00001b8a, | ||
| 2294 | 0x00001e08,0x00050050,0x00000007,0x00001e0f, | ||
| 2295 | 0x00001e09,0x00001e0e,0x0004007c,0x00000014, | ||
| 2296 | 0x00001dff,0x00001e0f,0x00060041,0x000000d8, | ||
| 2297 | 0x00001df7,0x00001dff,0x000000d7,0x000000d7, | ||
| 2298 | 0x0005003e,0x00001df7,0x000000a3,0x00000002, | ||
| 2299 | 0x00000004,0x00050080,0x00000006,0x00001a8d, | ||
| 2300 | 0x00001916,0x000005df,0x00050095,0x000000a8, | ||
| 2301 | 0x00001e27,0x00001b83,0x00001a8d,0x00050051, | ||
| 2302 | 0x00000006,0x00001e28,0x00001e27,0x00000001, | ||
| 2303 | 0x00050051,0x00000006,0x00001e29,0x00001e27, | ||
| 2304 | 0x00000000,0x00050080,0x00000006,0x00001e2e, | ||
| 2305 | 0x00001b8a,0x00001e28,0x00050050,0x00000007, | ||
| 2306 | 0x00001e2f,0x00001e29,0x00001e2e,0x0004007c, | ||
| 2307 | 0x00000014,0x00001e1f,0x00001e2f,0x00060041, | ||
| 2308 | 0x000000d8,0x00001e17,0x00001e1f,0x000000d7, | ||
| 2309 | 0x000000d7,0x0005003e,0x00001e17,0x000000a3, | ||
| 2310 | 0x00000002,0x00000004,0x000500b4,0x0000002f, | ||
| 2311 | 0x00001a92,0x00001a33,0x0000026a,0x00060050, | ||
| 2312 | 0x00000392,0x00002b6f,0x00001a92,0x00001a92, | ||
| 2313 | 0x00001a92,0x000600a9,0x0000004b,0x00002b70, | ||
| 2314 | 0x00002b6f,0x00002b66,0x00002b05,0x000600a9, | ||
| 2315 | 0x0000004b,0x00002b72,0x00002b6f,0x00002b64, | ||
| 2316 | 0x00002af3,0x00050041,0x000000fb,0x00001e79, | ||
| 2317 | 0x000000f9,0x000000fa,0x0004003d,0x00000006, | ||
| 2318 | 0x00001e7a,0x00001e79,0x00050084,0x00000006, | ||
| 2319 | 0x00001e7b,0x0000011c,0x00001e7a,0x00050080, | ||
| 2320 | 0x00000006,0x00001e7c,0x00000104,0x00001e7b, | ||
| 2321 | 0x00050080,0x00000006,0x00001e82,0x00001e7a, | ||
| 2322 | 0x00002b67,0x00050086,0x00000006,0x00001e83, | ||
| 2323 | 0x00001e82,0x000000fe,0x00050084,0x00000006, | ||
| 2324 | 0x00001e75,0x00000104,0x00001e83,0x00050080, | ||
| 2325 | 0x00000006,0x00001e76,0x00001e7c,0x00001e75, | ||
| 2326 | 0x00050084,0x00000006,0x00001e46,0x0000014d, | ||
| 2327 | 0x000009e9,0x00050080,0x00000006,0x00001e47, | ||
| 2328 | 0x00001e76,0x00001e46,0x00050041,0x00000153, | ||
| 2329 | 0x00001e48,0x000000f9,0x00000151,0x0004003d, | ||
| 2330 | 0x00000007,0x00001e49,0x00001e48,0x00050051, | ||
| 2331 | 0x00000027,0x00001e4c,0x00002b72,0x00000000, | ||
| 2332 | 0x0004007c,0x00000006,0x00001e89,0x00001e4c, | ||
| 2333 | 0x00050051,0x00000006,0x00001ea2,0x00001e49, | ||
| 2334 | 0x00000000,0x00050095,0x000000a8,0x00001ea4, | ||
| 2335 | 0x00001ea2,0x00001e47,0x00050051,0x00000006, | ||
| 2336 | 0x00001ea5,0x00001ea4,0x00000001,0x00050051, | ||
| 2337 | 0x00000006,0x00001ea6,0x00001ea4,0x00000000, | ||
| 2338 | 0x00050051,0x00000006,0x00001ea9,0x00001e49, | ||
| 2339 | 0x00000001,0x00050080,0x00000006,0x00001eab, | ||
| 2340 | 0x00001ea9,0x00001ea5,0x00050050,0x00000007, | ||
| 2341 | 0x00001eac,0x00001ea6,0x00001eab,0x0004007c, | ||
| 2342 | 0x00000014,0x00001e9c,0x00001eac,0x00060041, | ||
| 2343 | 0x000000d8,0x00001e94,0x00001e9c,0x000000d7, | ||
| 2344 | 0x000000d7,0x0005003e,0x00001e94,0x00001e89, | ||
| 2345 | 0x00000002,0x00000004,0x00050080,0x00000006, | 1882 | 0x00000002,0x00000004,0x00050080,0x00000006, |
| 2346 | 0x00001e4f,0x00001e47,0x00000107,0x00050051, | 1883 | 0x00001a77,0x00001a5a,0x0000011f,0x00050051, |
| 2347 | 0x00000027,0x00001e53,0x00002b72,0x00000001, | 1884 | 0x00000027,0x00001a7b,0x000032aa,0x00000001, |
| 2348 | 0x0004007c,0x00000006,0x00001eb2,0x00001e53, | 1885 | 0x0004007c,0x00000006,0x00001b40,0x00001a7b, |
| 2349 | 0x00050095,0x000000a8,0x00001ecd,0x00001ea2, | 1886 | 0x00050095,0x000000ab,0x00001b5b,0x00001ab5, |
| 2350 | 0x00001e4f,0x00050051,0x00000006,0x00001ece, | 1887 | 0x00001a77,0x00050051,0x00000006,0x00001b5c, |
| 2351 | 0x00001ecd,0x00000001,0x00050051,0x00000006, | 1888 | 0x00001b5b,0x00000001,0x00050051,0x00000006, |
| 2352 | 0x00001ecf,0x00001ecd,0x00000000,0x00050080, | 1889 | 0x00001b5d,0x00001b5b,0x00000000,0x00050080, |
| 2353 | 0x00000006,0x00001ed4,0x00001ea9,0x00001ece, | 1890 | 0x00000006,0x00001b62,0x00001abc,0x00001b5c, |
| 2354 | 0x00050050,0x00000007,0x00001ed5,0x00001ecf, | 1891 | 0x00050050,0x00000007,0x00001b63,0x00001b5d, |
| 2355 | 0x00001ed4,0x0004007c,0x00000014,0x00001ec5, | 1892 | 0x00001b62,0x0004007c,0x00000014,0x00001b53, |
| 2356 | 0x00001ed5,0x00060041,0x000000d8,0x00001ebd, | 1893 | 0x00001b63,0x00060041,0x000000db,0x00001b4b, |
| 2357 | 0x00001ec5,0x000000d7,0x000000d7,0x0005003e, | 1894 | 0x00001b53,0x000000da,0x000000da,0x0005003e, |
| 2358 | 0x00001ebd,0x00001eb2,0x00000002,0x00000004, | 1895 | 0x00001b4b,0x00001b40,0x00000002,0x00000004, |
| 2359 | 0x00050080,0x00000006,0x00001e56,0x00001e47, | 1896 | 0x00050080,0x00000006,0x00001a7e,0x00001a5a, |
| 2360 | 0x0000010e,0x00050051,0x00000027,0x00001e5a, | 1897 | 0x00000189,0x00050051,0x00000027,0x00001a82, |
| 2361 | 0x00002b72,0x00000002,0x0004007c,0x00000006, | 1898 | 0x000032aa,0x00000002,0x0004007c,0x00000006, |
| 2362 | 0x00001edb,0x00001e5a,0x00050095,0x000000a8, | 1899 | 0x00001b69,0x00001a82,0x00050095,0x000000ab, |
| 2363 | 0x00001ef6,0x00001ea2,0x00001e56,0x00050051, | 1900 | 0x00001b84,0x00001ab5,0x00001a7e,0x00050051, |
| 2364 | 0x00000006,0x00001ef7,0x00001ef6,0x00000001, | 1901 | 0x00000006,0x00001b85,0x00001b84,0x00000001, |
| 2365 | 0x00050051,0x00000006,0x00001ef8,0x00001ef6, | 1902 | 0x00050051,0x00000006,0x00001b86,0x00001b84, |
| 2366 | 0x00000000,0x00050080,0x00000006,0x00001efd, | 1903 | 0x00000000,0x00050080,0x00000006,0x00001b8b, |
| 2367 | 0x00001ea9,0x00001ef7,0x00050050,0x00000007, | 1904 | 0x00001abc,0x00001b85,0x00050050,0x00000007, |
| 2368 | 0x00001efe,0x00001ef8,0x00001efd,0x0004007c, | 1905 | 0x00001b8c,0x00001b86,0x00001b8b,0x0004007c, |
| 2369 | 0x00000014,0x00001eee,0x00001efe,0x00060041, | 1906 | 0x00000014,0x00001b7c,0x00001b8c,0x00060041, |
| 2370 | 0x000000d8,0x00001ee6,0x00001eee,0x000000d7, | 1907 | 0x000000db,0x00001b74,0x00001b7c,0x000000da, |
| 2371 | 0x000000d7,0x0005003e,0x00001ee6,0x00001edb, | 1908 | 0x000000da,0x0005003e,0x00001b74,0x00001b69, |
| 1909 | 0x00000002,0x00000004,0x000300f7,0x00001bcc, | ||
| 1910 | 0x00000000,0x000300fb,0x000000a6,0x00001b9b, | ||
| 1911 | 0x000200f8,0x00001b9b,0x000500bc,0x0000002f, | ||
| 1912 | 0x00001bd3,0x00001a5f,0x00001a74,0x000300f7, | ||
| 1913 | 0x00001bda,0x00000000,0x000400fa,0x00001bd3, | ||
| 1914 | 0x00001bd4,0x00001bda,0x000200f8,0x00001bd4, | ||
| 1915 | 0x000500bc,0x0000002f,0x00001bd9,0x00001a66, | ||
| 1916 | 0x00001a7b,0x000200f9,0x00001bda,0x000200f8, | ||
| 1917 | 0x00001bda,0x000700f5,0x0000002f,0x00001bdb, | ||
| 1918 | 0x00001bd3,0x00001b9b,0x00001bd9,0x00001bd4, | ||
| 1919 | 0x000300f7,0x00001be2,0x00000000,0x000400fa, | ||
| 1920 | 0x00001bdb,0x00001bdc,0x00001be2,0x000200f8, | ||
| 1921 | 0x00001bdc,0x000500bc,0x0000002f,0x00001be1, | ||
| 1922 | 0x00001a6d,0x00001a82,0x000200f9,0x00001be2, | ||
| 1923 | 0x000200f8,0x00001be2,0x000700f5,0x0000002f, | ||
| 1924 | 0x00001be3,0x00001bdb,0x00001bda,0x00001be1, | ||
| 1925 | 0x00001bdc,0x000400a8,0x0000002f,0x00001be4, | ||
| 1926 | 0x00001be3,0x000300f7,0x00001ba0,0x00000000, | ||
| 1927 | 0x000400fa,0x00001be4,0x00001b9f,0x00001ba0, | ||
| 1928 | 0x000200f8,0x00001b9f,0x000200f9,0x00001bcc, | ||
| 1929 | 0x000200f8,0x00001ba0,0x00050081,0x0000004b, | ||
| 1930 | 0x00001ba3,0x000032ac,0x000032aa,0x0005008e, | ||
| 1931 | 0x0000004b,0x00001ba4,0x00001ba3,0x000001ed, | ||
| 1932 | 0x00050095,0x000000ab,0x00001bf4,0x00001ab5, | ||
| 1933 | 0x000000a6,0x00050051,0x00000006,0x00001bf5, | ||
| 1934 | 0x00001bf4,0x00000001,0x00050051,0x00000006, | ||
| 1935 | 0x00001bf6,0x00001bf4,0x00000000,0x00050080, | ||
| 1936 | 0x00000006,0x00001bfb,0x00001abc,0x00001bf5, | ||
| 1937 | 0x00050050,0x00000007,0x00001bfc,0x00001bf6, | ||
| 1938 | 0x00001bfb,0x0004007c,0x00000014,0x00001bec, | ||
| 1939 | 0x00001bfc,0x00060041,0x000000db,0x00001ba9, | ||
| 1940 | 0x00001bec,0x000000da,0x000000da,0x00050051, | ||
| 1941 | 0x00000027,0x00001bab,0x00001ba4,0x00000000, | ||
| 1942 | 0x0004007c,0x00000006,0x00001c02,0x00001bab, | ||
| 1943 | 0x000500c7,0x00000006,0x00001c04,0x00001c02, | ||
| 1944 | 0x00000130,0x000500ab,0x0000002f,0x00001c05, | ||
| 1945 | 0x00001c04,0x000000a6,0x000300f7,0x00001c0c, | ||
| 1946 | 0x00000000,0x000400fa,0x00001c05,0x00001c06, | ||
| 1947 | 0x00001c09,0x000200f8,0x00001c06,0x000400c8, | ||
| 1948 | 0x00000006,0x00001c08,0x00001c02,0x000200f9, | ||
| 1949 | 0x00001c0c,0x000200f8,0x00001c09,0x000500c5, | ||
| 1950 | 0x00000006,0x00001c0b,0x00001c02,0x00000130, | ||
| 1951 | 0x000200f9,0x00001c0c,0x000200f8,0x00001c0c, | ||
| 1952 | 0x000700f5,0x00000006,0x0000323e,0x00001c08, | ||
| 1953 | 0x00001c06,0x00001c0b,0x00001c09,0x000700ed, | ||
| 1954 | 0x00000006,0x00001bad,0x00001ba9,0x000000b0, | ||
| 1955 | 0x000000a6,0x0000323e,0x00060041,0x000000db, | ||
| 1956 | 0x00001baf,0x00001bec,0x000000da,0x00000154, | ||
| 1957 | 0x00050051,0x00000027,0x00001bb1,0x00001ba4, | ||
| 1958 | 0x00000001,0x0004007c,0x00000006,0x00001c13, | ||
| 1959 | 0x00001bb1,0x000500c7,0x00000006,0x00001c15, | ||
| 1960 | 0x00001c13,0x00000130,0x000500ab,0x0000002f, | ||
| 1961 | 0x00001c16,0x00001c15,0x000000a6,0x000300f7, | ||
| 1962 | 0x00001c1d,0x00000000,0x000400fa,0x00001c16, | ||
| 1963 | 0x00001c17,0x00001c1a,0x000200f8,0x00001c17, | ||
| 1964 | 0x000400c8,0x00000006,0x00001c19,0x00001c13, | ||
| 1965 | 0x000200f9,0x00001c1d,0x000200f8,0x00001c1a, | ||
| 1966 | 0x000500c5,0x00000006,0x00001c1c,0x00001c13, | ||
| 1967 | 0x00000130,0x000200f9,0x00001c1d,0x000200f8, | ||
| 1968 | 0x00001c1d,0x000700f5,0x00000006,0x0000323f, | ||
| 1969 | 0x00001c19,0x00001c17,0x00001c1c,0x00001c1a, | ||
| 1970 | 0x000700ed,0x00000006,0x00001bb3,0x00001baf, | ||
| 1971 | 0x000000b0,0x000000a6,0x0000323f,0x00060041, | ||
| 1972 | 0x000000db,0x00001bb5,0x00001bec,0x000000da, | ||
| 1973 | 0x00000205,0x00050051,0x00000027,0x00001bb7, | ||
| 1974 | 0x00001ba4,0x00000002,0x0004007c,0x00000006, | ||
| 1975 | 0x00001c24,0x00001bb7,0x000500c7,0x00000006, | ||
| 1976 | 0x00001c26,0x00001c24,0x00000130,0x000500ab, | ||
| 1977 | 0x0000002f,0x00001c27,0x00001c26,0x000000a6, | ||
| 1978 | 0x000300f7,0x00001c2e,0x00000000,0x000400fa, | ||
| 1979 | 0x00001c27,0x00001c28,0x00001c2b,0x000200f8, | ||
| 1980 | 0x00001c28,0x000400c8,0x00000006,0x00001c2a, | ||
| 1981 | 0x00001c24,0x000200f9,0x00001c2e,0x000200f8, | ||
| 1982 | 0x00001c2b,0x000500c5,0x00000006,0x00001c2d, | ||
| 1983 | 0x00001c24,0x00000130,0x000200f9,0x00001c2e, | ||
| 1984 | 0x000200f8,0x00001c2e,0x000700f5,0x00000006, | ||
| 1985 | 0x00003240,0x00001c2a,0x00001c28,0x00001c2d, | ||
| 1986 | 0x00001c2b,0x000700ed,0x00000006,0x00001bb9, | ||
| 1987 | 0x00001bb5,0x000000b0,0x000000a6,0x00003240, | ||
| 1988 | 0x00060041,0x000000db,0x00001bbb,0x00001bec, | ||
| 1989 | 0x000000da,0x0000020d,0x000300f7,0x00001c3f, | ||
| 1990 | 0x00000000,0x000400fa,0x00001c05,0x00001c39, | ||
| 1991 | 0x00001c3c,0x000200f8,0x00001c39,0x000400c8, | ||
| 1992 | 0x00000006,0x00001c3b,0x00001c02,0x000200f9, | ||
| 1993 | 0x00001c3f,0x000200f8,0x00001c3c,0x000500c5, | ||
| 1994 | 0x00000006,0x00001c3e,0x00001c02,0x00000130, | ||
| 1995 | 0x000200f9,0x00001c3f,0x000200f8,0x00001c3f, | ||
| 1996 | 0x000700f5,0x00000006,0x00003241,0x00001c3b, | ||
| 1997 | 0x00001c39,0x00001c3e,0x00001c3c,0x000700ef, | ||
| 1998 | 0x00000006,0x00001bbf,0x00001bbb,0x000000b0, | ||
| 1999 | 0x000000a6,0x00003241,0x00060041,0x000000db, | ||
| 2000 | 0x00001bc1,0x00001bec,0x000000da,0x00000215, | ||
| 2001 | 0x000300f7,0x00001c50,0x00000000,0x000400fa, | ||
| 2002 | 0x00001c16,0x00001c4a,0x00001c4d,0x000200f8, | ||
| 2003 | 0x00001c4a,0x000400c8,0x00000006,0x00001c4c, | ||
| 2004 | 0x00001c13,0x000200f9,0x00001c50,0x000200f8, | ||
| 2005 | 0x00001c4d,0x000500c5,0x00000006,0x00001c4f, | ||
| 2006 | 0x00001c13,0x00000130,0x000200f9,0x00001c50, | ||
| 2007 | 0x000200f8,0x00001c50,0x000700f5,0x00000006, | ||
| 2008 | 0x00003242,0x00001c4c,0x00001c4a,0x00001c4f, | ||
| 2009 | 0x00001c4d,0x000700ef,0x00000006,0x00001bc5, | ||
| 2010 | 0x00001bc1,0x000000b0,0x000000a6,0x00003242, | ||
| 2011 | 0x00060041,0x000000db,0x00001bc7,0x00001bec, | ||
| 2012 | 0x000000da,0x0000021d,0x000300f7,0x00001c61, | ||
| 2013 | 0x00000000,0x000400fa,0x00001c27,0x00001c5b, | ||
| 2014 | 0x00001c5e,0x000200f8,0x00001c5b,0x000400c8, | ||
| 2015 | 0x00000006,0x00001c5d,0x00001c24,0x000200f9, | ||
| 2016 | 0x00001c61,0x000200f8,0x00001c5e,0x000500c5, | ||
| 2017 | 0x00000006,0x00001c60,0x00001c24,0x00000130, | ||
| 2018 | 0x000200f9,0x00001c61,0x000200f8,0x00001c61, | ||
| 2019 | 0x000700f5,0x00000006,0x00003243,0x00001c5d, | ||
| 2020 | 0x00001c5b,0x00001c60,0x00001c5e,0x000700ef, | ||
| 2021 | 0x00000006,0x00001bcb,0x00001bc7,0x000000b0, | ||
| 2022 | 0x000000a6,0x00003243,0x000200f9,0x00001bcc, | ||
| 2023 | 0x000200f8,0x00001bcc,0x000200f9,0x00000bd2, | ||
| 2024 | 0x000200f8,0x00000bd6,0x000500aa,0x0000002f, | ||
| 2025 | 0x00000bd9,0x00000b13,0x00000170,0x000300f7, | ||
| 2026 | 0x00000bdb,0x00000000,0x000400fa,0x00000bd9, | ||
| 2027 | 0x00000bda,0x00000bdf,0x000200f8,0x00000bda, | ||
| 2028 | 0x00050084,0x00000006,0x00001cca,0x00000107, | ||
| 2029 | 0x00000b11,0x000200f9,0x00001ccb,0x000200f8, | ||
| 2030 | 0x00001ccb,0x000700f5,0x00000006,0x000031f0, | ||
| 2031 | 0x000000a6,0x00000bda,0x00001cdc,0x00001ccf, | ||
| 2032 | 0x000500b0,0x0000002f,0x00001cce,0x000031f0, | ||
| 2033 | 0x00000118,0x000400f6,0x00001cdd,0x00001ccf, | ||
| 2034 | 0x00000000,0x000400fa,0x00001cce,0x00001ccf, | ||
| 2035 | 0x00001cdd,0x000200f8,0x00001ccf,0x00050084, | ||
| 2036 | 0x00000006,0x00001cd3,0x0000010a,0x000031f0, | ||
| 2037 | 0x00050080,0x00000006,0x00001cd4,0x00001cca, | ||
| 2038 | 0x00001cd3,0x00050041,0x00000156,0x00001cd5, | ||
| 2039 | 0x000000fc,0x00000205,0x0004003d,0x00000007, | ||
| 2040 | 0x00001cd6,0x00001cd5,0x00050051,0x00000006, | ||
| 2041 | 0x00001e97,0x00001cd6,0x00000000,0x00050095, | ||
| 2042 | 0x000000ab,0x00001e99,0x00001e97,0x00001cd4, | ||
| 2043 | 0x00050051,0x00000006,0x00001e9a,0x00001e99, | ||
| 2044 | 0x00000001,0x00050051,0x00000006,0x00001e9b, | ||
| 2045 | 0x00001e99,0x00000000,0x00050051,0x00000006, | ||
| 2046 | 0x00001e9e,0x00001cd6,0x00000001,0x00050080, | ||
| 2047 | 0x00000006,0x00001ea0,0x00001e9e,0x00001e9a, | ||
| 2048 | 0x00050050,0x00000007,0x00001ea1,0x00001e9b, | ||
| 2049 | 0x00001ea0,0x0004007c,0x00000014,0x00001e91, | ||
| 2050 | 0x00001ea1,0x00060041,0x000000db,0x00001e88, | ||
| 2051 | 0x00001e91,0x000000da,0x000000da,0x0006003d, | ||
| 2052 | 0x00000006,0x00001e89,0x00001e88,0x00000002, | ||
| 2053 | 0x00000004,0x0004007c,0x00000027,0x00001cd8, | ||
| 2054 | 0x00001e89,0x00050041,0x00000028,0x00001cd9, | ||
| 2055 | 0x00001c65,0x000031f0,0x0003003e,0x00001cd9, | ||
| 2056 | 0x00001cd8,0x00050080,0x00000006,0x00001cdc, | ||
| 2057 | 0x000031f0,0x00000154,0x000200f9,0x00001ccb, | ||
| 2058 | 0x000200f8,0x00001cdd,0x00050080,0x00000006, | ||
| 2059 | 0x00001cdf,0x00001cca,0x00000368,0x00050041, | ||
| 2060 | 0x00000156,0x00001ce0,0x000000fc,0x00000205, | ||
| 2061 | 0x0004003d,0x00000007,0x00001ce1,0x00001ce0, | ||
| 2062 | 0x00050051,0x00000006,0x00001eb8,0x00001ce1, | ||
| 2063 | 0x00000000,0x00050095,0x000000ab,0x00001eba, | ||
| 2064 | 0x00001eb8,0x00001cdf,0x00050051,0x00000006, | ||
| 2065 | 0x00001ebb,0x00001eba,0x00000001,0x00050051, | ||
| 2066 | 0x00000006,0x00001ebc,0x00001eba,0x00000000, | ||
| 2067 | 0x00050051,0x00000006,0x00001ebf,0x00001ce1, | ||
| 2068 | 0x00000001,0x00050080,0x00000006,0x00001ec1, | ||
| 2069 | 0x00001ebf,0x00001ebb,0x00050050,0x00000007, | ||
| 2070 | 0x00001ec2,0x00001ebc,0x00001ec1,0x0004007c, | ||
| 2071 | 0x00000014,0x00001eb2,0x00001ec2,0x00060041, | ||
| 2072 | 0x000000db,0x00001ea9,0x00001eb2,0x000000da, | ||
| 2073 | 0x000000da,0x0006003d,0x00000006,0x00001eaa, | ||
| 2074 | 0x00001ea9,0x00000002,0x00000004,0x00050080, | ||
| 2075 | 0x00000006,0x00001ce4,0x00001cca,0x00000374, | ||
| 2076 | 0x00050095,0x000000ab,0x00001edb,0x00001eb8, | ||
| 2077 | 0x00001ce4,0x00050051,0x00000006,0x00001edc, | ||
| 2078 | 0x00001edb,0x00000001,0x00050051,0x00000006, | ||
| 2079 | 0x00001edd,0x00001edb,0x00000000,0x00050080, | ||
| 2080 | 0x00000006,0x00001ee2,0x00001ebf,0x00001edc, | ||
| 2081 | 0x00050050,0x00000007,0x00001ee3,0x00001edd, | ||
| 2082 | 0x00001ee2,0x0004007c,0x00000014,0x00001ed3, | ||
| 2083 | 0x00001ee3,0x00060041,0x000000db,0x00001eca, | ||
| 2084 | 0x00001ed3,0x000000da,0x000000da,0x0006003d, | ||
| 2085 | 0x00000006,0x00001ecb,0x00001eca,0x00000002, | ||
| 2086 | 0x00000004,0x00050080,0x00000006,0x00001ce9, | ||
| 2087 | 0x00001cca,0x0000037e,0x00050095,0x000000ab, | ||
| 2088 | 0x00001efc,0x00001eb8,0x00001ce9,0x00050051, | ||
| 2089 | 0x00000006,0x00001efd,0x00001efc,0x00000001, | ||
| 2090 | 0x00050051,0x00000006,0x00001efe,0x00001efc, | ||
| 2091 | 0x00000000,0x00050080,0x00000006,0x00001f03, | ||
| 2092 | 0x00001ebf,0x00001efd,0x00050050,0x00000007, | ||
| 2093 | 0x00001f04,0x00001efe,0x00001f03,0x0004007c, | ||
| 2094 | 0x00000014,0x00001ef4,0x00001f04,0x00060041, | ||
| 2095 | 0x000000db,0x00001eeb,0x00001ef4,0x000000da, | ||
| 2096 | 0x000000da,0x0006003d,0x00000006,0x00001eec, | ||
| 2097 | 0x00001eeb,0x00000002,0x00000004,0x00050080, | ||
| 2098 | 0x00000006,0x00001cee,0x00001cca,0x00000388, | ||
| 2099 | 0x00050095,0x000000ab,0x00001f1d,0x00001eb8, | ||
| 2100 | 0x00001cee,0x00050051,0x00000006,0x00001f1e, | ||
| 2101 | 0x00001f1d,0x00000001,0x00050051,0x00000006, | ||
| 2102 | 0x00001f1f,0x00001f1d,0x00000000,0x00050080, | ||
| 2103 | 0x00000006,0x00001f24,0x00001ebf,0x00001f1e, | ||
| 2104 | 0x00050050,0x00000007,0x00001f25,0x00001f1f, | ||
| 2105 | 0x00001f24,0x0004007c,0x00000014,0x00001f15, | ||
| 2106 | 0x00001f25,0x00060041,0x000000db,0x00001f0c, | ||
| 2107 | 0x00001f15,0x000000da,0x000000da,0x0006003d, | ||
| 2108 | 0x00000006,0x00001f0d,0x00001f0c,0x00000002, | ||
| 2109 | 0x00000004,0x00050041,0x000000fe,0x00001cf3, | ||
| 2110 | 0x000000fc,0x0000022c,0x0004003d,0x00000006, | ||
| 2111 | 0x00001cf4,0x00001cf3,0x00050084,0x00000006, | ||
| 2112 | 0x00001cf6,0x00000228,0x00000b11,0x00050080, | ||
| 2113 | 0x00000006,0x00001cf7,0x00001cf4,0x00001cf6, | ||
| 2114 | 0x000200f9,0x00001cf8,0x000200f8,0x00001cf8, | ||
| 2115 | 0x000700f5,0x00000006,0x000031f1,0x000000a6, | ||
| 2116 | 0x00001cdd,0x00001d09,0x00001cfc,0x000500b0, | ||
| 2117 | 0x0000002f,0x00001cfb,0x000031f1,0x00000118, | ||
| 2118 | 0x000400f6,0x00001d0a,0x00001cfc,0x00000000, | ||
| 2119 | 0x000400fa,0x00001cfb,0x00001cfc,0x00001d0a, | ||
| 2120 | 0x000200f8,0x00001cfc,0x00050084,0x00000006, | ||
| 2121 | 0x00001cff,0x0000010a,0x000031f1,0x00050080, | ||
| 2122 | 0x00000006,0x00001d00,0x00001cf7,0x00001cff, | ||
| 2123 | 0x00050041,0x00000156,0x00001d02,0x000000fc, | ||
| 2124 | 0x000000da,0x0004003d,0x00000007,0x00001d03, | ||
| 2125 | 0x00001d02,0x00050041,0x00000028,0x00001d04, | ||
| 2126 | 0x00001c65,0x000031f1,0x0004003d,0x00000027, | ||
| 2127 | 0x00001d05,0x00001d04,0x0004007c,0x00000006, | ||
| 2128 | 0x00001f2b,0x00001d05,0x00050051,0x00000006, | ||
| 2129 | 0x00001f44,0x00001d03,0x00000000,0x00050095, | ||
| 2130 | 0x000000ab,0x00001f46,0x00001f44,0x00001d00, | ||
| 2131 | 0x00050051,0x00000006,0x00001f47,0x00001f46, | ||
| 2132 | 0x00000001,0x00050051,0x00000006,0x00001f48, | ||
| 2133 | 0x00001f46,0x00000000,0x00050051,0x00000006, | ||
| 2134 | 0x00001f4b,0x00001d03,0x00000001,0x00050080, | ||
| 2135 | 0x00000006,0x00001f4d,0x00001f4b,0x00001f47, | ||
| 2136 | 0x00050050,0x00000007,0x00001f4e,0x00001f48, | ||
| 2137 | 0x00001f4d,0x0004007c,0x00000014,0x00001f3e, | ||
| 2138 | 0x00001f4e,0x00060041,0x000000db,0x00001f36, | ||
| 2139 | 0x00001f3e,0x000000da,0x000000da,0x0005003e, | ||
| 2140 | 0x00001f36,0x00001f2b,0x00000002,0x00000004, | ||
| 2141 | 0x00050080,0x00000006,0x00001d09,0x000031f1, | ||
| 2142 | 0x00000154,0x000200f9,0x00001cf8,0x000200f8, | ||
| 2143 | 0x00001d0a,0x00050080,0x00000006,0x00001d0c, | ||
| 2144 | 0x00001cf7,0x00000368,0x00050041,0x00000156, | ||
| 2145 | 0x00001d0d,0x000000fc,0x000000da,0x0004003d, | ||
| 2146 | 0x00000007,0x00001d0e,0x00001d0d,0x00050051, | ||
| 2147 | 0x00000006,0x00001f64,0x00001d0e,0x00000000, | ||
| 2148 | 0x00050095,0x000000ab,0x00001f66,0x00001f64, | ||
| 2149 | 0x00001d0c,0x00050051,0x00000006,0x00001f67, | ||
| 2150 | 0x00001f66,0x00000001,0x00050051,0x00000006, | ||
| 2151 | 0x00001f68,0x00001f66,0x00000000,0x00050051, | ||
| 2152 | 0x00000006,0x00001f6b,0x00001d0e,0x00000001, | ||
| 2153 | 0x00050080,0x00000006,0x00001f6d,0x00001f6b, | ||
| 2154 | 0x00001f67,0x00050050,0x00000007,0x00001f6e, | ||
| 2155 | 0x00001f68,0x00001f6d,0x0004007c,0x00000014, | ||
| 2156 | 0x00001f5e,0x00001f6e,0x00060041,0x000000db, | ||
| 2157 | 0x00001f56,0x00001f5e,0x000000da,0x000000da, | ||
| 2158 | 0x0005003e,0x00001f56,0x00001eaa,0x00000002, | ||
| 2159 | 0x00000004,0x00050080,0x00000006,0x00001d12, | ||
| 2160 | 0x00001cf7,0x00000374,0x00050095,0x000000ab, | ||
| 2161 | 0x00001f86,0x00001f64,0x00001d12,0x00050051, | ||
| 2162 | 0x00000006,0x00001f87,0x00001f86,0x00000001, | ||
| 2163 | 0x00050051,0x00000006,0x00001f88,0x00001f86, | ||
| 2164 | 0x00000000,0x00050080,0x00000006,0x00001f8d, | ||
| 2165 | 0x00001f6b,0x00001f87,0x00050050,0x00000007, | ||
| 2166 | 0x00001f8e,0x00001f88,0x00001f8d,0x0004007c, | ||
| 2167 | 0x00000014,0x00001f7e,0x00001f8e,0x00060041, | ||
| 2168 | 0x000000db,0x00001f76,0x00001f7e,0x000000da, | ||
| 2169 | 0x000000da,0x0005003e,0x00001f76,0x00001ecb, | ||
| 2170 | 0x00000002,0x00000004,0x000500aa,0x0000002f, | ||
| 2171 | 0x00001f93,0x00001eec,0x000000a6,0x000300f7, | ||
| 2172 | 0x00001f98,0x00000000,0x000400fa,0x00001f93, | ||
| 2173 | 0x00001f94,0x00001f98,0x000200f8,0x00001f94, | ||
| 2174 | 0x000500aa,0x0000002f,0x00001f97,0x00001f0d, | ||
| 2175 | 0x000000a6,0x000200f9,0x00001f98,0x000200f8, | ||
| 2176 | 0x00001f98,0x000700f5,0x0000002f,0x00001f99, | ||
| 2177 | 0x00001f93,0x00001d0a,0x00001f97,0x00001f94, | ||
| 2178 | 0x000400a8,0x0000002f,0x00001d1d,0x00001f99, | ||
| 2179 | 0x000300f7,0x00001db3,0x00000000,0x000400fa, | ||
| 2180 | 0x00001d1d,0x00001d1e,0x00001db3,0x000200f8, | ||
| 2181 | 0x00001d1e,0x00050041,0x00000156,0x00001d20, | ||
| 2182 | 0x000000fc,0x0000021d,0x0004003d,0x00000007, | ||
| 2183 | 0x00001d21,0x00001d20,0x00050051,0x00000006, | ||
| 2184 | 0x00001fa1,0x00001d21,0x00000000,0x00050095, | ||
| 2185 | 0x000000ab,0x00001fa2,0x00001eec,0x00001fa1, | ||
| 2186 | 0x00050051,0x00000006,0x00001fa3,0x00001fa2, | ||
| 2187 | 0x00000001,0x00050051,0x00000006,0x00001fa4, | ||
| 2188 | 0x00001fa2,0x00000000,0x00050051,0x00000006, | ||
| 2189 | 0x00001fa9,0x00001d21,0x00000001,0x00050080, | ||
| 2190 | 0x00000006,0x00001faa,0x00001f0d,0x00001fa9, | ||
| 2191 | 0x00050080,0x00000006,0x00001fac,0x00001faa, | ||
| 2192 | 0x00001fa3,0x00050095,0x000000ab,0x00001fc6, | ||
| 2193 | 0x00001fa4,0x00000368,0x00050051,0x00000006, | ||
| 2194 | 0x00001fc7,0x00001fc6,0x00000001,0x00050051, | ||
| 2195 | 0x00000006,0x00001fc8,0x00001fc6,0x00000000, | ||
| 2196 | 0x00050080,0x00000006,0x00001fcd,0x00001fac, | ||
| 2197 | 0x00001fc7,0x00050050,0x00000007,0x00001fce, | ||
| 2198 | 0x00001fc8,0x00001fcd,0x0004007c,0x00000014, | ||
| 2199 | 0x00001fbe,0x00001fce,0x00060041,0x000000db, | ||
| 2200 | 0x00001fb5,0x00001fbe,0x000000da,0x000000da, | ||
| 2201 | 0x0006003d,0x00000006,0x00001fb6,0x00001fb5, | ||
| 2202 | 0x00000002,0x00000004,0x00050095,0x000000ab, | ||
| 2203 | 0x00001fe7,0x00001fa4,0x0000011f,0x00050051, | ||
| 2204 | 0x00000006,0x00001fe8,0x00001fe7,0x00000001, | ||
| 2205 | 0x00050051,0x00000006,0x00001fe9,0x00001fe7, | ||
| 2206 | 0x00000000,0x00050080,0x00000006,0x00001fee, | ||
| 2207 | 0x00001fac,0x00001fe8,0x00050050,0x00000007, | ||
| 2208 | 0x00001fef,0x00001fe9,0x00001fee,0x0004007c, | ||
| 2209 | 0x00000014,0x00001fdf,0x00001fef,0x00060041, | ||
| 2210 | 0x000000db,0x00001fd6,0x00001fdf,0x000000da, | ||
| 2211 | 0x000000da,0x0006003d,0x00000006,0x00001fd7, | ||
| 2212 | 0x00001fd6,0x00000002,0x00000004,0x0004007c, | ||
| 2213 | 0x00000027,0x00001d27,0x00001fd7,0x00050095, | ||
| 2214 | 0x000000ab,0x00002008,0x00001fa4,0x00000189, | ||
| 2215 | 0x00050051,0x00000006,0x00002009,0x00002008, | ||
| 2216 | 0x00000001,0x00050051,0x00000006,0x0000200a, | ||
| 2217 | 0x00002008,0x00000000,0x00050080,0x00000006, | ||
| 2218 | 0x0000200f,0x00001fac,0x00002009,0x00050050, | ||
| 2219 | 0x00000007,0x00002010,0x0000200a,0x0000200f, | ||
| 2220 | 0x0004007c,0x00000014,0x00002000,0x00002010, | ||
| 2221 | 0x00060041,0x000000db,0x00001ff7,0x00002000, | ||
| 2222 | 0x000000da,0x000000da,0x0006003d,0x00000006, | ||
| 2223 | 0x00001ff8,0x00001ff7,0x00000002,0x00000004, | ||
| 2224 | 0x0004007c,0x00000027,0x00001d2a,0x00001ff8, | ||
| 2225 | 0x00050095,0x000000ab,0x00002029,0x00001fa4, | ||
| 2226 | 0x00000150,0x00050051,0x00000006,0x0000202a, | ||
| 2227 | 0x00002029,0x00000001,0x00050051,0x00000006, | ||
| 2228 | 0x0000202b,0x00002029,0x00000000,0x00050080, | ||
| 2229 | 0x00000006,0x00002030,0x00001fac,0x0000202a, | ||
| 2230 | 0x00050050,0x00000007,0x00002031,0x0000202b, | ||
| 2231 | 0x00002030,0x0004007c,0x00000014,0x00002021, | ||
| 2232 | 0x00002031,0x00060041,0x000000db,0x00002018, | ||
| 2233 | 0x00002021,0x000000da,0x000000da,0x0006003d, | ||
| 2234 | 0x00000006,0x00002019,0x00002018,0x00000002, | ||
| 2235 | 0x00000004,0x0004007c,0x00000027,0x00001d2d, | ||
| 2236 | 0x00002019,0x00050095,0x000000ab,0x0000204a, | ||
| 2237 | 0x00001fa4,0x00000463,0x00050051,0x00000006, | ||
| 2238 | 0x0000204b,0x0000204a,0x00000001,0x00050051, | ||
| 2239 | 0x00000006,0x0000204c,0x0000204a,0x00000000, | ||
| 2240 | 0x00050080,0x00000006,0x00002051,0x00001fac, | ||
| 2241 | 0x0000204b,0x00050050,0x00000007,0x00002052, | ||
| 2242 | 0x0000204c,0x00002051,0x0004007c,0x00000014, | ||
| 2243 | 0x00002042,0x00002052,0x00060041,0x000000db, | ||
| 2244 | 0x00002039,0x00002042,0x000000da,0x000000da, | ||
| 2245 | 0x0006003d,0x00000006,0x0000203a,0x00002039, | ||
| 2246 | 0x00000002,0x00000004,0x0004007c,0x00000027, | ||
| 2247 | 0x00001d31,0x0000203a,0x00050095,0x000000ab, | ||
| 2248 | 0x0000206b,0x00001fa4,0x00000469,0x00050051, | ||
| 2249 | 0x00000006,0x0000206c,0x0000206b,0x00000001, | ||
| 2250 | 0x00050051,0x00000006,0x0000206d,0x0000206b, | ||
| 2251 | 0x00000000,0x00050080,0x00000006,0x00002072, | ||
| 2252 | 0x00001fac,0x0000206c,0x00050050,0x00000007, | ||
| 2253 | 0x00002073,0x0000206d,0x00002072,0x0004007c, | ||
| 2254 | 0x00000014,0x00002063,0x00002073,0x00060041, | ||
| 2255 | 0x000000db,0x0000205a,0x00002063,0x000000da, | ||
| 2256 | 0x000000da,0x0006003d,0x00000006,0x0000205b, | ||
| 2257 | 0x0000205a,0x00000002,0x00000004,0x0004007c, | ||
| 2258 | 0x00000027,0x00001d34,0x0000205b,0x00050095, | ||
| 2259 | 0x000000ab,0x0000208c,0x00001fa4,0x00000347, | ||
| 2260 | 0x00050051,0x00000006,0x0000208d,0x0000208c, | ||
| 2261 | 0x00000001,0x00050051,0x00000006,0x0000208e, | ||
| 2262 | 0x0000208c,0x00000000,0x00050080,0x00000006, | ||
| 2263 | 0x00002093,0x00001fac,0x0000208d,0x00050050, | ||
| 2264 | 0x00000007,0x00002094,0x0000208e,0x00002093, | ||
| 2265 | 0x0004007c,0x00000014,0x00002084,0x00002094, | ||
| 2266 | 0x00060041,0x000000db,0x0000207b,0x00002084, | ||
| 2267 | 0x000000da,0x000000da,0x0006003d,0x00000006, | ||
| 2268 | 0x0000207c,0x0000207b,0x00000002,0x00000004, | ||
| 2269 | 0x0004007c,0x00000027,0x00001d37,0x0000207c, | ||
| 2270 | 0x000500bc,0x0000002f,0x0000209b,0x00001d27, | ||
| 2271 | 0x00001d31,0x000300f7,0x000020a2,0x00000000, | ||
| 2272 | 0x000400fa,0x0000209b,0x0000209c,0x000020a2, | ||
| 2273 | 0x000200f8,0x0000209c,0x000500bc,0x0000002f, | ||
| 2274 | 0x000020a1,0x00001d2a,0x00001d34,0x000200f9, | ||
| 2275 | 0x000020a2,0x000200f8,0x000020a2,0x000700f5, | ||
| 2276 | 0x0000002f,0x000020a3,0x0000209b,0x00001d1e, | ||
| 2277 | 0x000020a1,0x0000209c,0x000300f7,0x000020aa, | ||
| 2278 | 0x00000000,0x000400fa,0x000020a3,0x000020a4, | ||
| 2279 | 0x000020aa,0x000200f8,0x000020a4,0x000500bc, | ||
| 2280 | 0x0000002f,0x000020a9,0x00001d2d,0x00001d37, | ||
| 2281 | 0x000200f9,0x000020aa,0x000200f8,0x000020aa, | ||
| 2282 | 0x000700f5,0x0000002f,0x000020ab,0x000020a3, | ||
| 2283 | 0x000020a2,0x000020a9,0x000020a4,0x000300f7, | ||
| 2284 | 0x00001d41,0x00000000,0x000400fa,0x000020ab, | ||
| 2285 | 0x00001d3d,0x00001d41,0x000200f8,0x00001d3d, | ||
| 2286 | 0x000500c2,0x00000006,0x00001d3f,0x00001eaa, | ||
| 2287 | 0x0000047e,0x000500ab,0x0000002f,0x00001d40, | ||
| 2288 | 0x00001d3f,0x000000a6,0x000200f9,0x00001d41, | ||
| 2289 | 0x000200f8,0x00001d41,0x000700f5,0x0000002f, | ||
| 2290 | 0x00001d42,0x000020ab,0x000020aa,0x00001d40, | ||
| 2291 | 0x00001d3d,0x000300f7,0x00001db2,0x00000000, | ||
| 2292 | 0x000400fa,0x00001d42,0x00001d43,0x00001db2, | ||
| 2293 | 0x000200f8,0x00001d43,0x000200f9,0x00001d44, | ||
| 2294 | 0x000200f8,0x00001d44,0x000700f5,0x0000004b, | ||
| 2295 | 0x00003227,0x000032a7,0x00001d43,0x00001dad, | ||
| 2296 | 0x00001d48,0x000700f5,0x0000004b,0x00003215, | ||
| 2297 | 0x000032a5,0x00001d43,0x00001daa,0x00001d48, | ||
| 2298 | 0x000700f5,0x00000006,0x000031f2,0x000000a6, | ||
| 2299 | 0x00001d43,0x00001db0,0x00001d48,0x000500b0, | ||
| 2300 | 0x0000002f,0x00001d47,0x000031f2,0x00000111, | ||
| 2301 | 0x000400f6,0x00001db1,0x00001d48,0x00000000, | ||
| 2302 | 0x000400fa,0x00001d47,0x00001d48,0x00001db1, | ||
| 2303 | 0x000200f8,0x00001d48,0x000500c7,0x00000006, | ||
| 2304 | 0x00001d4a,0x000031f2,0x000000b0,0x000500ab, | ||
| 2305 | 0x0000002f,0x00001d4b,0x00001d4a,0x000000a6, | ||
| 2306 | 0x000600a9,0x00000027,0x000032ad,0x00001d4b, | ||
| 2307 | 0x00001d31,0x00001d27,0x000500c7,0x00000006, | ||
| 2308 | 0x00001d55,0x000031f2,0x00000170,0x000500ab, | ||
| 2309 | 0x0000002f,0x00001d56,0x00001d55,0x000000a6, | ||
| 2310 | 0x000600a9,0x00000027,0x000032ae,0x00001d56, | ||
| 2311 | 0x00001d34,0x00001d2a,0x000500c7,0x00000006, | ||
| 2312 | 0x00001d60,0x000031f2,0x0000010a,0x000500ab, | ||
| 2313 | 0x0000002f,0x00001d61,0x00001d60,0x000000a6, | ||
| 2314 | 0x000600a9,0x00000027,0x000032af,0x00001d61, | ||
| 2315 | 0x00001d37,0x00001d2d,0x00050041,0x00000028, | ||
| 2316 | 0x00001d6b,0x00001c65,0x000000da,0x0004003d, | ||
| 2317 | 0x00000027,0x00001d6c,0x00001d6b,0x00050085, | ||
| 2318 | 0x00000027,0x00001d6f,0x00001d6c,0x000032ad, | ||
| 2319 | 0x00050041,0x00000028,0x00001d70,0x00001c65, | ||
| 2320 | 0x00000154,0x0004003d,0x00000027,0x00001d71, | ||
| 2321 | 0x00001d70,0x00050085,0x00000027,0x00001d74, | ||
| 2322 | 0x00001d71,0x000032ae,0x00050081,0x00000027, | ||
| 2323 | 0x00001d75,0x00001d6f,0x00001d74,0x00050041, | ||
| 2324 | 0x00000028,0x00001d76,0x00001c65,0x00000205, | ||
| 2325 | 0x0004003d,0x00000027,0x00001d77,0x00001d76, | ||
| 2326 | 0x00050085,0x00000027,0x00001d7a,0x00001d77, | ||
| 2327 | 0x000032af,0x00050081,0x00000027,0x00001d7b, | ||
| 2328 | 0x00001d75,0x00001d7a,0x00050041,0x00000028, | ||
| 2329 | 0x00001d7c,0x00001c65,0x0000020d,0x0004003d, | ||
| 2330 | 0x00000027,0x00001d7d,0x00001d7c,0x00050081, | ||
| 2331 | 0x00000027,0x00001d7e,0x00001d7b,0x00001d7d, | ||
| 2332 | 0x00050041,0x00000028,0x00001d7f,0x00001c65, | ||
| 2333 | 0x00000215,0x0004003d,0x00000027,0x00001d80, | ||
| 2334 | 0x00001d7f,0x00050085,0x00000027,0x00001d83, | ||
| 2335 | 0x00001d80,0x000032ad,0x00050041,0x00000028, | ||
| 2336 | 0x00001d84,0x00001c65,0x0000021d,0x0004003d, | ||
| 2337 | 0x00000027,0x00001d85,0x00001d84,0x00050085, | ||
| 2338 | 0x00000027,0x00001d88,0x00001d85,0x000032ae, | ||
| 2339 | 0x00050081,0x00000027,0x00001d89,0x00001d83, | ||
| 2340 | 0x00001d88,0x00050041,0x00000028,0x00001d8a, | ||
| 2341 | 0x00001c65,0x00000233,0x0004003d,0x00000027, | ||
| 2342 | 0x00001d8b,0x00001d8a,0x00050085,0x00000027, | ||
| 2343 | 0x00001d8e,0x00001d8b,0x000032af,0x00050081, | ||
| 2344 | 0x00000027,0x00001d8f,0x00001d89,0x00001d8e, | ||
| 2345 | 0x00050041,0x00000028,0x00001d90,0x00001c65, | ||
| 2346 | 0x000004d8,0x0004003d,0x00000027,0x00001d91, | ||
| 2347 | 0x00001d90,0x00050081,0x00000027,0x00001d92, | ||
| 2348 | 0x00001d8f,0x00001d91,0x00050041,0x00000028, | ||
| 2349 | 0x00001d93,0x00001c65,0x00000308,0x0004003d, | ||
| 2350 | 0x00000027,0x00001d94,0x00001d93,0x00050085, | ||
| 2351 | 0x00000027,0x00001d97,0x00001d94,0x000032ad, | ||
| 2352 | 0x00050041,0x00000028,0x00001d98,0x00001c65, | ||
| 2353 | 0x00000250,0x0004003d,0x00000027,0x00001d99, | ||
| 2354 | 0x00001d98,0x00050085,0x00000027,0x00001d9c, | ||
| 2355 | 0x00001d99,0x000032ae,0x00050081,0x00000027, | ||
| 2356 | 0x00001d9d,0x00001d97,0x00001d9c,0x00050041, | ||
| 2357 | 0x00000028,0x00001d9e,0x00001c65,0x00000266, | ||
| 2358 | 0x0004003d,0x00000027,0x00001d9f,0x00001d9e, | ||
| 2359 | 0x00050085,0x00000027,0x00001da2,0x00001d9f, | ||
| 2360 | 0x000032af,0x00050081,0x00000027,0x00001da3, | ||
| 2361 | 0x00001d9d,0x00001da2,0x00050041,0x00000028, | ||
| 2362 | 0x00001da4,0x00001c65,0x0000027b,0x0004003d, | ||
| 2363 | 0x00000027,0x00001da5,0x00001da4,0x00050081, | ||
| 2364 | 0x00000027,0x00001da6,0x00001da3,0x00001da5, | ||
| 2365 | 0x00060050,0x0000004b,0x00001da7,0x00001d7e, | ||
| 2366 | 0x00001d92,0x00001da6,0x0007000c,0x0000004b, | ||
| 2367 | 0x00001daa,0x00000001,0x00000025,0x00003215, | ||
| 2368 | 0x00001da7,0x0007000c,0x0000004b,0x00001dad, | ||
| 2369 | 0x00000001,0x00000028,0x00003227,0x00001da7, | ||
| 2370 | 0x00050080,0x00000006,0x00001db0,0x000031f2, | ||
| 2371 | 0x00000154,0x000200f9,0x00001d44,0x000200f8, | ||
| 2372 | 0x00001db1,0x000200f9,0x00001db2,0x000200f8, | ||
| 2373 | 0x00001db2,0x000700f5,0x0000004b,0x00003223, | ||
| 2374 | 0x000032a7,0x00001d41,0x00003227,0x00001db1, | ||
| 2375 | 0x000700f5,0x0000004b,0x00003211,0x000032a5, | ||
| 2376 | 0x00001d41,0x00003215,0x00001db1,0x000200f9, | ||
| 2377 | 0x00001db3,0x000200f8,0x00001db3,0x000700f5, | ||
| 2378 | 0x0000004b,0x00003221,0x000032a7,0x00001f98, | ||
| 2379 | 0x00003223,0x00001db2,0x000700f5,0x0000004b, | ||
| 2380 | 0x0000320f,0x000032a5,0x00001f98,0x00003211, | ||
| 2381 | 0x00001db2,0x000700f5,0x00000006,0x000031fb, | ||
| 2382 | 0x00000380,0x00001f98,0x00001fb6,0x00001db2, | ||
| 2383 | 0x00050041,0x00000028,0x00001db4,0x00001c65, | ||
| 2384 | 0x000000da,0x0004003d,0x00000027,0x00001db5, | ||
| 2385 | 0x00001db4,0x000500b4,0x0000002f,0x00001db6, | ||
| 2386 | 0x00001db5,0x000004fc,0x000300f7,0x00001dbb, | ||
| 2387 | 0x00000000,0x000400fa,0x00001db6,0x00001db7, | ||
| 2388 | 0x00001dbb,0x000200f8,0x00001db7,0x00050041, | ||
| 2389 | 0x00000028,0x00001db8,0x00001c65,0x00000154, | ||
| 2390 | 0x0004003d,0x00000027,0x00001db9,0x00001db8, | ||
| 2391 | 0x000500b4,0x0000002f,0x00001dba,0x00001db9, | ||
| 2392 | 0x0000026d,0x000200f9,0x00001dbb,0x000200f8, | ||
| 2393 | 0x00001dbb,0x000700f5,0x0000002f,0x00001dbc, | ||
| 2394 | 0x00001db6,0x00001db3,0x00001dba,0x00001db7, | ||
| 2395 | 0x000300f7,0x00001dc1,0x00000000,0x000400fa, | ||
| 2396 | 0x00001dbc,0x00001dbd,0x00001dc1,0x000200f8, | ||
| 2397 | 0x00001dbd,0x00050041,0x00000028,0x00001dbe, | ||
| 2398 | 0x00001c65,0x00000205,0x0004003d,0x00000027, | ||
| 2399 | 0x00001dbf,0x00001dbe,0x000500b4,0x0000002f, | ||
| 2400 | 0x00001dc0,0x00001dbf,0x0000026d,0x000200f9, | ||
| 2401 | 0x00001dc1,0x000200f8,0x00001dc1,0x000700f5, | ||
| 2402 | 0x0000002f,0x00001dc2,0x00001dbc,0x00001dbb, | ||
| 2403 | 0x00001dc0,0x00001dbd,0x000300f7,0x00001dc7, | ||
| 2404 | 0x00000000,0x000400fa,0x00001dc2,0x00001dc3, | ||
| 2405 | 0x00001dc7,0x000200f8,0x00001dc3,0x00050041, | ||
| 2406 | 0x00000028,0x00001dc4,0x00001c65,0x00000215, | ||
| 2407 | 0x0004003d,0x00000027,0x00001dc5,0x00001dc4, | ||
| 2408 | 0x000500b4,0x0000002f,0x00001dc6,0x00001dc5, | ||
| 2409 | 0x0000026d,0x000200f9,0x00001dc7,0x000200f8, | ||
| 2410 | 0x00001dc7,0x000700f5,0x0000002f,0x00001dc8, | ||
| 2411 | 0x00001dc2,0x00001dc1,0x00001dc6,0x00001dc3, | ||
| 2412 | 0x000300f7,0x00001dcd,0x00000000,0x000400fa, | ||
| 2413 | 0x00001dc8,0x00001dc9,0x00001dcd,0x000200f8, | ||
| 2414 | 0x00001dc9,0x00050041,0x00000028,0x00001dca, | ||
| 2415 | 0x00001c65,0x0000021d,0x0004003d,0x00000027, | ||
| 2416 | 0x00001dcb,0x00001dca,0x000500b4,0x0000002f, | ||
| 2417 | 0x00001dcc,0x00001dcb,0x000004fc,0x000200f9, | ||
| 2418 | 0x00001dcd,0x000200f8,0x00001dcd,0x000700f5, | ||
| 2419 | 0x0000002f,0x00001dce,0x00001dc8,0x00001dc7, | ||
| 2420 | 0x00001dcc,0x00001dc9,0x000300f7,0x00001dd3, | ||
| 2421 | 0x00000000,0x000400fa,0x00001dce,0x00001dcf, | ||
| 2422 | 0x00001dd3,0x000200f8,0x00001dcf,0x00050041, | ||
| 2423 | 0x00000028,0x00001dd0,0x00001c65,0x00000233, | ||
| 2424 | 0x0004003d,0x00000027,0x00001dd1,0x00001dd0, | ||
| 2425 | 0x000500b4,0x0000002f,0x00001dd2,0x00001dd1, | ||
| 2426 | 0x0000026d,0x000200f9,0x00001dd3,0x000200f8, | ||
| 2427 | 0x00001dd3,0x000700f5,0x0000002f,0x00001dd4, | ||
| 2428 | 0x00001dce,0x00001dcd,0x00001dd2,0x00001dcf, | ||
| 2429 | 0x000300f7,0x00001dd9,0x00000000,0x000400fa, | ||
| 2430 | 0x00001dd4,0x00001dd5,0x00001dd9,0x000200f8, | ||
| 2431 | 0x00001dd5,0x00050041,0x00000028,0x00001dd6, | ||
| 2432 | 0x00001c65,0x00000308,0x0004003d,0x00000027, | ||
| 2433 | 0x00001dd7,0x00001dd6,0x000500b4,0x0000002f, | ||
| 2434 | 0x00001dd8,0x00001dd7,0x0000026d,0x000200f9, | ||
| 2435 | 0x00001dd9,0x000200f8,0x00001dd9,0x000700f5, | ||
| 2436 | 0x0000002f,0x00001dda,0x00001dd4,0x00001dd3, | ||
| 2437 | 0x00001dd8,0x00001dd5,0x000300f7,0x00001ddf, | ||
| 2438 | 0x00000000,0x000400fa,0x00001dda,0x00001ddb, | ||
| 2439 | 0x00001ddf,0x000200f8,0x00001ddb,0x00050041, | ||
| 2440 | 0x00000028,0x00001ddc,0x00001c65,0x00000250, | ||
| 2441 | 0x0004003d,0x00000027,0x00001ddd,0x00001ddc, | ||
| 2442 | 0x000500b4,0x0000002f,0x00001dde,0x00001ddd, | ||
| 2443 | 0x0000026d,0x000200f9,0x00001ddf,0x000200f8, | ||
| 2444 | 0x00001ddf,0x000700f5,0x0000002f,0x00001de0, | ||
| 2445 | 0x00001dda,0x00001dd9,0x00001dde,0x00001ddb, | ||
| 2446 | 0x000300f7,0x00001de5,0x00000000,0x000400fa, | ||
| 2447 | 0x00001de0,0x00001de1,0x00001de5,0x000200f8, | ||
| 2448 | 0x00001de1,0x00050041,0x00000028,0x00001de2, | ||
| 2449 | 0x00001c65,0x00000266,0x0004003d,0x00000027, | ||
| 2450 | 0x00001de3,0x00001de2,0x000500b4,0x0000002f, | ||
| 2451 | 0x00001de4,0x00001de3,0x000004fc,0x000200f9, | ||
| 2452 | 0x00001de5,0x000200f8,0x00001de5,0x000700f5, | ||
| 2453 | 0x0000002f,0x00001de6,0x00001de0,0x00001ddf, | ||
| 2454 | 0x00001de4,0x00001de1,0x00050080,0x00000006, | ||
| 2455 | 0x00001de8,0x00001cf7,0x0000037e,0x000500c7, | ||
| 2456 | 0x00000006,0x00001dea,0x000031fb,0x00000531, | ||
| 2457 | 0x000600a9,0x00000006,0x00001dec,0x00001de6, | ||
| 2458 | 0x00000130,0x000000a6,0x000500c5,0x00000006, | ||
| 2459 | 0x00001ded,0x00001dea,0x00001dec,0x00050095, | ||
| 2460 | 0x000000ab,0x000020c4,0x00001f64,0x00001de8, | ||
| 2461 | 0x00050051,0x00000006,0x000020c5,0x000020c4, | ||
| 2462 | 0x00000001,0x00050051,0x00000006,0x000020c6, | ||
| 2463 | 0x000020c4,0x00000000,0x00050080,0x00000006, | ||
| 2464 | 0x000020cb,0x00001f6b,0x000020c5,0x00050050, | ||
| 2465 | 0x00000007,0x000020cc,0x000020c6,0x000020cb, | ||
| 2466 | 0x0004007c,0x00000014,0x000020bc,0x000020cc, | ||
| 2467 | 0x00060041,0x000000db,0x000020b4,0x000020bc, | ||
| 2468 | 0x000000da,0x000000da,0x0005003e,0x000020b4, | ||
| 2469 | 0x00001ded,0x00000002,0x00000004,0x00050080, | ||
| 2470 | 0x00000006,0x00001df2,0x00001cf7,0x00000388, | ||
| 2471 | 0x000500c2,0x00000006,0x00001df5,0x00001eec, | ||
| 2472 | 0x00000308,0x000500c4,0x00000006,0x00001df8, | ||
| 2473 | 0x00001f0d,0x0000047e,0x000500c5,0x00000006, | ||
| 2474 | 0x00001df9,0x00001df5,0x00001df8,0x00050095, | ||
| 2475 | 0x000000ab,0x000020e4,0x00001f64,0x00001df2, | ||
| 2476 | 0x00050051,0x00000006,0x000020e5,0x000020e4, | ||
| 2477 | 0x00000001,0x00050051,0x00000006,0x000020e6, | ||
| 2478 | 0x000020e4,0x00000000,0x00050080,0x00000006, | ||
| 2479 | 0x000020eb,0x00001f6b,0x000020e5,0x00050050, | ||
| 2480 | 0x00000007,0x000020ec,0x000020e6,0x000020eb, | ||
| 2481 | 0x0004007c,0x00000014,0x000020dc,0x000020ec, | ||
| 2482 | 0x00060041,0x000000db,0x000020d4,0x000020dc, | ||
| 2483 | 0x000000da,0x000000da,0x0005003e,0x000020d4, | ||
| 2484 | 0x00001df9,0x00000002,0x00000004,0x0004003d, | ||
| 2485 | 0x00000027,0x00001dfe,0x00001db4,0x00050041, | ||
| 2486 | 0x00000028,0x00001dff,0x00001c65,0x00000215, | ||
| 2487 | 0x0004003d,0x00000027,0x00001e00,0x00001dff, | ||
| 2488 | 0x00050041,0x00000028,0x00001e01,0x00001c65, | ||
| 2489 | 0x00000308,0x0004003d,0x00000027,0x00001e02, | ||
| 2490 | 0x00001e01,0x00050041,0x00000028,0x00001e03, | ||
| 2491 | 0x00001c65,0x00000154,0x0004003d,0x00000027, | ||
| 2492 | 0x00001e04,0x00001e03,0x00050041,0x00000028, | ||
| 2493 | 0x00001e05,0x00001c65,0x0000021d,0x0004003d, | ||
| 2494 | 0x00000027,0x00001e06,0x00001e05,0x00050041, | ||
| 2495 | 0x00000028,0x00001e07,0x00001c65,0x00000250, | ||
| 2496 | 0x0004003d,0x00000027,0x00001e08,0x00001e07, | ||
| 2497 | 0x00050041,0x00000028,0x00001e09,0x00001c65, | ||
| 2498 | 0x00000205,0x0004003d,0x00000027,0x00001e0a, | ||
| 2499 | 0x00001e09,0x00050041,0x00000028,0x00001e0b, | ||
| 2500 | 0x00001c65,0x00000233,0x0004003d,0x00000027, | ||
| 2501 | 0x00001e0c,0x00001e0b,0x00050041,0x00000028, | ||
| 2502 | 0x00001e0d,0x00001c65,0x00000266,0x0004003d, | ||
| 2503 | 0x00000027,0x00001e0e,0x00001e0d,0x00060050, | ||
| 2504 | 0x0000004b,0x00001e0f,0x00001dfe,0x00001e00, | ||
| 2505 | 0x00001e02,0x00060050,0x0000004b,0x00001e10, | ||
| 2506 | 0x00001e04,0x00001e06,0x00001e08,0x00060050, | ||
| 2507 | 0x0000004b,0x00001e11,0x00001e0a,0x00001e0c, | ||
| 2508 | 0x00001e0e,0x00060050,0x0000054b,0x00001e12, | ||
| 2509 | 0x00001e0f,0x00001e10,0x00001e11,0x0006000c, | ||
| 2510 | 0x00000027,0x00001e14,0x00000001,0x00000021, | ||
| 2511 | 0x00001e12,0x000500b7,0x0000002f,0x00001e16, | ||
| 2512 | 0x00001e14,0x0000026d,0x000300f7,0x00001e1b, | ||
| 2513 | 0x00000000,0x000400fa,0x00001e16,0x00001e17, | ||
| 2514 | 0x00001e1a,0x000200f8,0x00001e17,0x0006000c, | ||
| 2515 | 0x0000054b,0x00001e19,0x00000001,0x00000022, | ||
| 2516 | 0x00001e12,0x000200f9,0x00001e1b,0x000200f8, | ||
| 2517 | 0x00001e1a,0x000200f9,0x00001e1b,0x000200f8, | ||
| 2518 | 0x00001e1b,0x000700f5,0x0000054b,0x00003202, | ||
| 2519 | 0x00001e19,0x00001e17,0x00000571,0x00001e1a, | ||
| 2520 | 0x0003003e,0x00001ca6,0x00003202,0x00050041, | ||
| 2521 | 0x00000028,0x00001e1d,0x00001c65,0x0000020d, | ||
| 2522 | 0x0004003d,0x00000027,0x00001e1e,0x00001e1d, | ||
| 2523 | 0x00050041,0x00000028,0x00001e1f,0x00001c65, | ||
| 2524 | 0x000004d8,0x0004003d,0x00000027,0x00001e20, | ||
| 2525 | 0x00001e1f,0x00050041,0x00000028,0x00001e21, | ||
| 2526 | 0x00001c65,0x0000027b,0x0004003d,0x00000027, | ||
| 2527 | 0x00001e22,0x00001e21,0x00060050,0x0000004b, | ||
| 2528 | 0x00001e23,0x00001e1e,0x00001e20,0x00001e22, | ||
| 2529 | 0x00050091,0x0000004b,0x00001e26,0x00003202, | ||
| 2530 | 0x00001e23,0x0004007f,0x0000004b,0x00001e27, | ||
| 2531 | 0x00001e26,0x0003003e,0x00001ca9,0x00001e27, | ||
| 2532 | 0x000200f9,0x00001e28,0x000200f8,0x00001e28, | ||
| 2533 | 0x000700f5,0x00000006,0x00003203,0x000000a6, | ||
| 2534 | 0x00001e1b,0x00001e5b,0x00001e2c,0x000500b0, | ||
| 2535 | 0x0000002f,0x00001e2b,0x00003203,0x000002b7, | ||
| 2536 | 0x000400f6,0x00001e5c,0x00001e2c,0x00000000, | ||
| 2537 | 0x000400fa,0x00001e2b,0x00001e2c,0x00001e5c, | ||
| 2538 | 0x000200f8,0x00001e2c,0x00050080,0x00000006, | ||
| 2539 | 0x00001e2e,0x00001cf7,0x00000107,0x00050084, | ||
| 2540 | 0x00000006,0x00001e30,0x0000011f,0x00003203, | ||
| 2541 | 0x00050080,0x00000006,0x00001e31,0x00001e2e, | ||
| 2542 | 0x00001e30,0x00060041,0x00000028,0x00001e35, | ||
| 2543 | 0x00001ca6,0x000000da,0x00003203,0x0004003d, | ||
| 2544 | 0x00000027,0x00001e36,0x00001e35,0x0004007c, | ||
| 2545 | 0x00000006,0x000020f2,0x00001e36,0x00050095, | ||
| 2546 | 0x000000ab,0x0000210d,0x00001f64,0x00001e31, | ||
| 2547 | 0x00050051,0x00000006,0x0000210e,0x0000210d, | ||
| 2548 | 0x00000001,0x00050051,0x00000006,0x0000210f, | ||
| 2549 | 0x0000210d,0x00000000,0x00050080,0x00000006, | ||
| 2550 | 0x00002114,0x00001f6b,0x0000210e,0x00050050, | ||
| 2551 | 0x00000007,0x00002115,0x0000210f,0x00002114, | ||
| 2552 | 0x0004007c,0x00000014,0x00002105,0x00002115, | ||
| 2553 | 0x00060041,0x000000db,0x000020fd,0x00002105, | ||
| 2554 | 0x000000da,0x000000da,0x0005003e,0x000020fd, | ||
| 2555 | 0x000020f2,0x00000002,0x00000004,0x00050080, | ||
| 2556 | 0x00000006,0x00001e39,0x00001cf7,0x00000597, | ||
| 2557 | 0x00050080,0x00000006,0x00001e3c,0x00001e39, | ||
| 2558 | 0x00001e30,0x00060041,0x00000028,0x00001e40, | ||
| 2559 | 0x00001ca6,0x00000154,0x00003203,0x0004003d, | ||
| 2560 | 0x00000027,0x00001e41,0x00001e40,0x0004007c, | ||
| 2561 | 0x00000006,0x0000211b,0x00001e41,0x00050095, | ||
| 2562 | 0x000000ab,0x00002136,0x00001f64,0x00001e3c, | ||
| 2563 | 0x00050051,0x00000006,0x00002137,0x00002136, | ||
| 2564 | 0x00000001,0x00050051,0x00000006,0x00002138, | ||
| 2565 | 0x00002136,0x00000000,0x00050080,0x00000006, | ||
| 2566 | 0x0000213d,0x00001f6b,0x00002137,0x00050050, | ||
| 2567 | 0x00000007,0x0000213e,0x00002138,0x0000213d, | ||
| 2568 | 0x0004007c,0x00000014,0x0000212e,0x0000213e, | ||
| 2569 | 0x00060041,0x000000db,0x00002126,0x0000212e, | ||
| 2570 | 0x000000da,0x000000da,0x0005003e,0x00002126, | ||
| 2571 | 0x0000211b,0x00000002,0x00000004,0x00050080, | ||
| 2572 | 0x00000006,0x00001e44,0x00001cf7,0x000005a6, | ||
| 2573 | 0x00050080,0x00000006,0x00001e47,0x00001e44, | ||
| 2574 | 0x00001e30,0x00060041,0x00000028,0x00001e4b, | ||
| 2575 | 0x00001ca6,0x00000205,0x00003203,0x0004003d, | ||
| 2576 | 0x00000027,0x00001e4c,0x00001e4b,0x0004007c, | ||
| 2577 | 0x00000006,0x00002144,0x00001e4c,0x00050095, | ||
| 2578 | 0x000000ab,0x0000215f,0x00001f64,0x00001e47, | ||
| 2579 | 0x00050051,0x00000006,0x00002160,0x0000215f, | ||
| 2580 | 0x00000001,0x00050051,0x00000006,0x00002161, | ||
| 2581 | 0x0000215f,0x00000000,0x00050080,0x00000006, | ||
| 2582 | 0x00002166,0x00001f6b,0x00002160,0x00050050, | ||
| 2583 | 0x00000007,0x00002167,0x00002161,0x00002166, | ||
| 2584 | 0x0004007c,0x00000014,0x00002157,0x00002167, | ||
| 2585 | 0x00060041,0x000000db,0x0000214f,0x00002157, | ||
| 2586 | 0x000000da,0x000000da,0x0005003e,0x0000214f, | ||
| 2587 | 0x00002144,0x00000002,0x00000004,0x00050080, | ||
| 2588 | 0x00000006,0x00001e4f,0x00001cf7,0x000005b5, | ||
| 2589 | 0x00050080,0x00000006,0x00001e52,0x00001e4f, | ||
| 2590 | 0x00001e30,0x00050041,0x00000028,0x00001e56, | ||
| 2591 | 0x00001ca9,0x00003203,0x0004003d,0x00000027, | ||
| 2592 | 0x00001e57,0x00001e56,0x0004007c,0x00000006, | ||
| 2593 | 0x0000216d,0x00001e57,0x00050095,0x000000ab, | ||
| 2594 | 0x00002188,0x00001f64,0x00001e52,0x00050051, | ||
| 2595 | 0x00000006,0x00002189,0x00002188,0x00000001, | ||
| 2596 | 0x00050051,0x00000006,0x0000218a,0x00002188, | ||
| 2597 | 0x00000000,0x00050080,0x00000006,0x0000218f, | ||
| 2598 | 0x00001f6b,0x00002189,0x00050050,0x00000007, | ||
| 2599 | 0x00002190,0x0000218a,0x0000218f,0x0004007c, | ||
| 2600 | 0x00000014,0x00002180,0x00002190,0x00060041, | ||
| 2601 | 0x000000db,0x00002178,0x00002180,0x000000da, | ||
| 2602 | 0x000000da,0x0005003e,0x00002178,0x0000216d, | ||
| 2372 | 0x00000002,0x00000004,0x00050080,0x00000006, | 2603 | 0x00000002,0x00000004,0x00050080,0x00000006, |
| 2373 | 0x00001e5d,0x00001e47,0x00000115,0x00050051, | 2604 | 0x00001e5b,0x00003203,0x00000154,0x000200f9, |
| 2374 | 0x00000027,0x00001e61,0x00002b70,0x00000000, | 2605 | 0x00001e28,0x000200f8,0x00001e5c,0x00050080, |
| 2375 | 0x0004007c,0x00000006,0x00001f04,0x00001e61, | 2606 | 0x00000006,0x00001e5e,0x00001cf7,0x000005c6, |
| 2376 | 0x00050095,0x000000a8,0x00001f1f,0x00001ea2, | 2607 | 0x00050095,0x000000ab,0x000021a8,0x00001f64, |
| 2377 | 0x00001e5d,0x00050051,0x00000006,0x00001f20, | 2608 | 0x00001e5e,0x00050051,0x00000006,0x000021a9, |
| 2378 | 0x00001f1f,0x00000001,0x00050051,0x00000006, | 2609 | 0x000021a8,0x00000001,0x00050051,0x00000006, |
| 2379 | 0x00001f21,0x00001f1f,0x00000000,0x00050080, | 2610 | 0x000021aa,0x000021a8,0x00000000,0x00050080, |
| 2380 | 0x00000006,0x00001f26,0x00001ea9,0x00001f20, | 2611 | 0x00000006,0x000021af,0x00001f6b,0x000021a9, |
| 2381 | 0x00050050,0x00000007,0x00001f27,0x00001f21, | 2612 | 0x00050050,0x00000007,0x000021b0,0x000021aa, |
| 2382 | 0x00001f26,0x0004007c,0x00000014,0x00001f17, | 2613 | 0x000021af,0x0004007c,0x00000014,0x000021a0, |
| 2383 | 0x00001f27,0x00060041,0x000000d8,0x00001f0f, | 2614 | 0x000021b0,0x00060041,0x000000db,0x00002198, |
| 2384 | 0x00001f17,0x000000d7,0x000000d7,0x0005003e, | 2615 | 0x000021a0,0x000000da,0x000000da,0x0005003e, |
| 2385 | 0x00001f0f,0x00001f04,0x00000002,0x00000004, | 2616 | 0x00002198,0x00000b11,0x00000002,0x00000004, |
| 2386 | 0x00050080,0x00000006,0x00001e64,0x00001e47, | 2617 | 0x00050080,0x00000006,0x00001e64,0x00001cf7, |
| 2387 | 0x0000011c,0x00050051,0x00000027,0x00001e68, | 2618 | 0x000005d0,0x00050095,0x000000ab,0x000021c8, |
| 2388 | 0x00002b70,0x00000001,0x0004007c,0x00000006, | 2619 | 0x00001f64,0x00001e64,0x00050051,0x00000006, |
| 2389 | 0x00001f2d,0x00001e68,0x00050095,0x000000a8, | 2620 | 0x000021c9,0x000021c8,0x00000001,0x00050051, |
| 2390 | 0x00001f48,0x00001ea2,0x00001e64,0x00050051, | 2621 | 0x00000006,0x000021ca,0x000021c8,0x00000000, |
| 2391 | 0x00000006,0x00001f49,0x00001f48,0x00000001, | 2622 | 0x00050080,0x00000006,0x000021cf,0x00001f6b, |
| 2392 | 0x00050051,0x00000006,0x00001f4a,0x00001f48, | 2623 | 0x000021c9,0x00050050,0x00000007,0x000021d0, |
| 2393 | 0x00000000,0x00050080,0x00000006,0x00001f4f, | 2624 | 0x000021ca,0x000021cf,0x0004007c,0x00000014, |
| 2394 | 0x00001ea9,0x00001f49,0x00050050,0x00000007, | 2625 | 0x000021c0,0x000021d0,0x00060041,0x000000db, |
| 2395 | 0x00001f50,0x00001f4a,0x00001f4f,0x0004007c, | 2626 | 0x000021b8,0x000021c0,0x000000da,0x000000da, |
| 2396 | 0x00000014,0x00001f40,0x00001f50,0x00060041, | 2627 | 0x0005003e,0x000021b8,0x00000380,0x00000002, |
| 2397 | 0x000000d8,0x00001f38,0x00001f40,0x000000d7, | 2628 | 0x00000004,0x00050080,0x00000006,0x00001e69, |
| 2398 | 0x000000d7,0x0005003e,0x00001f38,0x00001f2d, | 2629 | 0x00001cf7,0x000005d9,0x00050095,0x000000ab, |
| 2630 | 0x000021e8,0x00001f64,0x00001e69,0x00050051, | ||
| 2631 | 0x00000006,0x000021e9,0x000021e8,0x00000001, | ||
| 2632 | 0x00050051,0x00000006,0x000021ea,0x000021e8, | ||
| 2633 | 0x00000000,0x00050080,0x00000006,0x000021ef, | ||
| 2634 | 0x00001f6b,0x000021e9,0x00050050,0x00000007, | ||
| 2635 | 0x000021f0,0x000021ea,0x000021ef,0x0004007c, | ||
| 2636 | 0x00000014,0x000021e0,0x000021f0,0x00060041, | ||
| 2637 | 0x000000db,0x000021d8,0x000021e0,0x000000da, | ||
| 2638 | 0x000000da,0x0005003e,0x000021d8,0x000000a6, | ||
| 2399 | 0x00000002,0x00000004,0x00050080,0x00000006, | 2639 | 0x00000002,0x00000004,0x00050080,0x00000006, |
| 2400 | 0x00001e6b,0x00001e47,0x00000186,0x00050051, | 2640 | 0x00001e6e,0x00001cf7,0x000005e2,0x00050095, |
| 2401 | 0x00000027,0x00001e6f,0x00002b70,0x00000002, | 2641 | 0x000000ab,0x00002208,0x00001f64,0x00001e6e, |
| 2402 | 0x0004007c,0x00000006,0x00001f56,0x00001e6f, | 2642 | 0x00050051,0x00000006,0x00002209,0x00002208, |
| 2403 | 0x00050095,0x000000a8,0x00001f71,0x00001ea2, | 2643 | 0x00000001,0x00050051,0x00000006,0x0000220a, |
| 2404 | 0x00001e6b,0x00050051,0x00000006,0x00001f72, | 2644 | 0x00002208,0x00000000,0x00050080,0x00000006, |
| 2405 | 0x00001f71,0x00000001,0x00050051,0x00000006, | 2645 | 0x0000220f,0x00001f6b,0x00002209,0x00050050, |
| 2406 | 0x00001f73,0x00001f71,0x00000000,0x00050080, | 2646 | 0x00000007,0x00002210,0x0000220a,0x0000220f, |
| 2407 | 0x00000006,0x00001f78,0x00001ea9,0x00001f72, | 2647 | 0x0004007c,0x00000014,0x00002200,0x00002210, |
| 2408 | 0x00050050,0x00000007,0x00001f79,0x00001f73, | 2648 | 0x00060041,0x000000db,0x000021f8,0x00002200, |
| 2409 | 0x00001f78,0x0004007c,0x00000014,0x00001f69, | 2649 | 0x000000da,0x000000da,0x0005003e,0x000021f8, |
| 2410 | 0x00001f79,0x00060041,0x000000d8,0x00001f61, | 2650 | 0x000000a6,0x00000002,0x00000004,0x000500b4, |
| 2411 | 0x00001f69,0x000000d7,0x000000d7,0x0005003e, | 2651 | 0x0000002f,0x00001e73,0x00001e14,0x0000026d, |
| 2412 | 0x00001f61,0x00001f56,0x00000002,0x00000004, | 2652 | 0x00060050,0x00000395,0x000032b0,0x00001e73, |
| 2413 | 0x000300f7,0x00001fb9,0x00000000,0x000300fb, | 2653 | 0x00001e73,0x00001e73,0x000600a9,0x0000004b, |
| 2414 | 0x000000a3,0x00001f88,0x000200f8,0x00001f88, | 2654 | 0x000032b1,0x000032b0,0x000032a7,0x00003221, |
| 2415 | 0x000500bc,0x0000002f,0x00001fc0,0x00001e4c, | 2655 | 0x000600a9,0x0000004b,0x000032b3,0x000032b0, |
| 2416 | 0x00001e61,0x000300f7,0x00001fc7,0x00000000, | 2656 | 0x000032a5,0x0000320f,0x00050041,0x000000fe, |
| 2417 | 0x000400fa,0x00001fc0,0x00001fc1,0x00001fc7, | 2657 | 0x0000225a,0x000000fc,0x000000fd,0x0004003d, |
| 2418 | 0x000200f8,0x00001fc1,0x000500bc,0x0000002f, | 2658 | 0x00000006,0x0000225b,0x0000225a,0x00050084, |
| 2419 | 0x00001fc6,0x00001e53,0x00001e68,0x000200f9, | 2659 | 0x00000006,0x0000225c,0x0000011f,0x0000225b, |
| 2420 | 0x00001fc7,0x000200f8,0x00001fc7,0x000700f5, | 2660 | 0x00050080,0x00000006,0x0000225d,0x00000107, |
| 2421 | 0x0000002f,0x00001fc8,0x00001fc0,0x00001f88, | 2661 | 0x0000225c,0x00050080,0x00000006,0x00002263, |
| 2422 | 0x00001fc6,0x00001fc1,0x000300f7,0x00001fcf, | 2662 | 0x0000225b,0x000032a8,0x00050086,0x00000006, |
| 2423 | 0x00000000,0x000400fa,0x00001fc8,0x00001fc9, | 2663 | 0x00002264,0x00002263,0x00000101,0x00050084, |
| 2424 | 0x00001fcf,0x000200f8,0x00001fc9,0x000500bc, | 2664 | 0x00000006,0x00002256,0x00000107,0x00002264, |
| 2425 | 0x0000002f,0x00001fce,0x00001e5a,0x00001e6f, | 2665 | 0x00050080,0x00000006,0x00002257,0x0000225d, |
| 2426 | 0x000200f9,0x00001fcf,0x000200f8,0x00001fcf, | 2666 | 0x00002256,0x00050084,0x00000006,0x00002227, |
| 2427 | 0x000700f5,0x0000002f,0x00001fd0,0x00001fc8, | 2667 | 0x00000150,0x00000b11,0x00050080,0x00000006, |
| 2428 | 0x00001fc7,0x00001fce,0x00001fc9,0x000400a8, | 2668 | 0x00002228,0x00002257,0x00002227,0x00050041, |
| 2429 | 0x0000002f,0x00001fd1,0x00001fd0,0x000300f7, | 2669 | 0x00000156,0x00002229,0x000000fc,0x00000154, |
| 2430 | 0x00001f8d,0x00000000,0x000400fa,0x00001fd1, | 2670 | 0x0004003d,0x00000007,0x0000222a,0x00002229, |
| 2431 | 0x00001f8c,0x00001f8d,0x000200f8,0x00001f8c, | 2671 | 0x00050051,0x00000027,0x0000222d,0x000032b3, |
| 2432 | 0x000200f9,0x00001fb9,0x000200f8,0x00001f8d, | 2672 | 0x00000000,0x0004007c,0x00000006,0x0000226a, |
| 2433 | 0x00050081,0x0000004b,0x00001f90,0x00002b72, | 2673 | 0x0000222d,0x00050051,0x00000006,0x00002283, |
| 2434 | 0x00002b70,0x0005008e,0x0000004b,0x00001f91, | 2674 | 0x0000222a,0x00000000,0x00050095,0x000000ab, |
| 2435 | 0x00001f90,0x000001ea,0x00050095,0x000000a8, | 2675 | 0x00002285,0x00002283,0x00002228,0x00050051, |
| 2436 | 0x00001fe1,0x00001ea2,0x000000a3,0x00050051, | 2676 | 0x00000006,0x00002286,0x00002285,0x00000001, |
| 2437 | 0x00000006,0x00001fe2,0x00001fe1,0x00000001, | 2677 | 0x00050051,0x00000006,0x00002287,0x00002285, |
| 2438 | 0x00050051,0x00000006,0x00001fe3,0x00001fe1, | 2678 | 0x00000000,0x00050051,0x00000006,0x0000228a, |
| 2439 | 0x00000000,0x00050080,0x00000006,0x00001fe8, | 2679 | 0x0000222a,0x00000001,0x00050080,0x00000006, |
| 2440 | 0x00001ea9,0x00001fe2,0x00050050,0x00000007, | 2680 | 0x0000228c,0x0000228a,0x00002286,0x00050050, |
| 2441 | 0x00001fe9,0x00001fe3,0x00001fe8,0x0004007c, | 2681 | 0x00000007,0x0000228d,0x00002287,0x0000228c, |
| 2442 | 0x00000014,0x00001fd9,0x00001fe9,0x00060041, | 2682 | 0x0004007c,0x00000014,0x0000227d,0x0000228d, |
| 2443 | 0x000000d8,0x00001f96,0x00001fd9,0x000000d7, | 2683 | 0x00060041,0x000000db,0x00002275,0x0000227d, |
| 2444 | 0x000000d7,0x00050051,0x00000027,0x00001f98, | 2684 | 0x000000da,0x000000da,0x0005003e,0x00002275, |
| 2445 | 0x00001f91,0x00000000,0x0004007c,0x00000006, | 2685 | 0x0000226a,0x00000002,0x00000004,0x00050080, |
| 2446 | 0x00001fef,0x00001f98,0x000500c7,0x00000006, | 2686 | 0x00000006,0x00002230,0x00002228,0x0000010a, |
| 2447 | 0x00001ff1,0x00001fef,0x0000012d,0x000500ab, | 2687 | 0x00050051,0x00000027,0x00002234,0x000032b3, |
| 2448 | 0x0000002f,0x00001ff2,0x00001ff1,0x000000a3, | 2688 | 0x00000001,0x0004007c,0x00000006,0x00002293, |
| 2449 | 0x000300f7,0x00001ff9,0x00000000,0x000400fa, | 2689 | 0x00002234,0x00050095,0x000000ab,0x000022ae, |
| 2450 | 0x00001ff2,0x00001ff3,0x00001ff6,0x000200f8, | 2690 | 0x00002283,0x00002230,0x00050051,0x00000006, |
| 2451 | 0x00001ff3,0x000400c8,0x00000006,0x00001ff5, | 2691 | 0x000022af,0x000022ae,0x00000001,0x00050051, |
| 2452 | 0x00001fef,0x000200f9,0x00001ff9,0x000200f8, | 2692 | 0x00000006,0x000022b0,0x000022ae,0x00000000, |
| 2453 | 0x00001ff6,0x000500c5,0x00000006,0x00001ff8, | 2693 | 0x00050080,0x00000006,0x000022b5,0x0000228a, |
| 2454 | 0x00001fef,0x0000012d,0x000200f9,0x00001ff9, | 2694 | 0x000022af,0x00050050,0x00000007,0x000022b6, |
| 2455 | 0x000200f8,0x00001ff9,0x000700f5,0x00000006, | 2695 | 0x000022b0,0x000022b5,0x0004007c,0x00000014, |
| 2456 | 0x00002b0c,0x00001ff5,0x00001ff3,0x00001ff8, | 2696 | 0x000022a6,0x000022b6,0x00060041,0x000000db, |
| 2457 | 0x00001ff6,0x000700ed,0x00000006,0x00001f9a, | 2697 | 0x0000229e,0x000022a6,0x000000da,0x000000da, |
| 2458 | 0x00001f96,0x000000ad,0x000000a3,0x00002b0c, | 2698 | 0x0005003e,0x0000229e,0x00002293,0x00000002, |
| 2459 | 0x00060041,0x000000d8,0x00001f9c,0x00001fd9, | 2699 | 0x00000004,0x00050080,0x00000006,0x00002237, |
| 2460 | 0x000000d7,0x00000151,0x00050051,0x00000027, | 2700 | 0x00002228,0x00000111,0x00050051,0x00000027, |
| 2461 | 0x00001f9e,0x00001f91,0x00000001,0x0004007c, | 2701 | 0x0000223b,0x000032b3,0x00000002,0x0004007c, |
| 2462 | 0x00000006,0x00002000,0x00001f9e,0x000500c7, | 2702 | 0x00000006,0x000022bc,0x0000223b,0x00050095, |
| 2463 | 0x00000006,0x00002002,0x00002000,0x0000012d, | 2703 | 0x000000ab,0x000022d7,0x00002283,0x00002237, |
| 2464 | 0x000500ab,0x0000002f,0x00002003,0x00002002, | 2704 | 0x00050051,0x00000006,0x000022d8,0x000022d7, |
| 2465 | 0x000000a3,0x000300f7,0x0000200a,0x00000000, | 2705 | 0x00000001,0x00050051,0x00000006,0x000022d9, |
| 2466 | 0x000400fa,0x00002003,0x00002004,0x00002007, | 2706 | 0x000022d7,0x00000000,0x00050080,0x00000006, |
| 2467 | 0x000200f8,0x00002004,0x000400c8,0x00000006, | 2707 | 0x000022de,0x0000228a,0x000022d8,0x00050050, |
| 2468 | 0x00002006,0x00002000,0x000200f9,0x0000200a, | 2708 | 0x00000007,0x000022df,0x000022d9,0x000022de, |
| 2469 | 0x000200f8,0x00002007,0x000500c5,0x00000006, | 2709 | 0x0004007c,0x00000014,0x000022cf,0x000022df, |
| 2470 | 0x00002009,0x00002000,0x0000012d,0x000200f9, | 2710 | 0x00060041,0x000000db,0x000022c7,0x000022cf, |
| 2471 | 0x0000200a,0x000200f8,0x0000200a,0x000700f5, | 2711 | 0x000000da,0x000000da,0x0005003e,0x000022c7, |
| 2472 | 0x00000006,0x00002b0d,0x00002006,0x00002004, | 2712 | 0x000022bc,0x00000002,0x00000004,0x00050080, |
| 2473 | 0x00002009,0x00002007,0x000700ed,0x00000006, | 2713 | 0x00000006,0x0000223e,0x00002228,0x00000118, |
| 2474 | 0x00001fa0,0x00001f9c,0x000000ad,0x000000a3, | 2714 | 0x00050051,0x00000027,0x00002242,0x000032b1, |
| 2475 | 0x00002b0d,0x00060041,0x000000d8,0x00001fa2, | 2715 | 0x00000000,0x0004007c,0x00000006,0x000022e5, |
| 2476 | 0x00001fd9,0x000000d7,0x00000202,0x00050051, | 2716 | 0x00002242,0x00050095,0x000000ab,0x00002300, |
| 2477 | 0x00000027,0x00001fa4,0x00001f91,0x00000002, | 2717 | 0x00002283,0x0000223e,0x00050051,0x00000006, |
| 2478 | 0x0004007c,0x00000006,0x00002011,0x00001fa4, | 2718 | 0x00002301,0x00002300,0x00000001,0x00050051, |
| 2479 | 0x000500c7,0x00000006,0x00002013,0x00002011, | 2719 | 0x00000006,0x00002302,0x00002300,0x00000000, |
| 2480 | 0x0000012d,0x000500ab,0x0000002f,0x00002014, | 2720 | 0x00050080,0x00000006,0x00002307,0x0000228a, |
| 2481 | 0x00002013,0x000000a3,0x000300f7,0x0000201b, | 2721 | 0x00002301,0x00050050,0x00000007,0x00002308, |
| 2482 | 0x00000000,0x000400fa,0x00002014,0x00002015, | 2722 | 0x00002302,0x00002307,0x0004007c,0x00000014, |
| 2483 | 0x00002018,0x000200f8,0x00002015,0x000400c8, | 2723 | 0x000022f8,0x00002308,0x00060041,0x000000db, |
| 2484 | 0x00000006,0x00002017,0x00002011,0x000200f9, | 2724 | 0x000022f0,0x000022f8,0x000000da,0x000000da, |
| 2485 | 0x0000201b,0x000200f8,0x00002018,0x000500c5, | 2725 | 0x0005003e,0x000022f0,0x000022e5,0x00000002, |
| 2486 | 0x00000006,0x0000201a,0x00002011,0x0000012d, | 2726 | 0x00000004,0x00050080,0x00000006,0x00002245, |
| 2487 | 0x000200f9,0x0000201b,0x000200f8,0x0000201b, | 2727 | 0x00002228,0x0000011f,0x00050051,0x00000027, |
| 2488 | 0x000700f5,0x00000006,0x00002b0e,0x00002017, | 2728 | 0x00002249,0x000032b1,0x00000001,0x0004007c, |
| 2489 | 0x00002015,0x0000201a,0x00002018,0x000700ed, | 2729 | 0x00000006,0x0000230e,0x00002249,0x00050095, |
| 2490 | 0x00000006,0x00001fa6,0x00001fa2,0x000000ad, | 2730 | 0x000000ab,0x00002329,0x00002283,0x00002245, |
| 2491 | 0x000000a3,0x00002b0e,0x00060041,0x000000d8, | 2731 | 0x00050051,0x00000006,0x0000232a,0x00002329, |
| 2492 | 0x00001fa8,0x00001fd9,0x000000d7,0x0000020a, | 2732 | 0x00000001,0x00050051,0x00000006,0x0000232b, |
| 2493 | 0x000300f7,0x0000202c,0x00000000,0x000400fa, | 2733 | 0x00002329,0x00000000,0x00050080,0x00000006, |
| 2494 | 0x00001ff2,0x00002026,0x00002029,0x000200f8, | 2734 | 0x00002330,0x0000228a,0x0000232a,0x00050050, |
| 2495 | 0x00002026,0x000400c8,0x00000006,0x00002028, | 2735 | 0x00000007,0x00002331,0x0000232b,0x00002330, |
| 2496 | 0x00001fef,0x000200f9,0x0000202c,0x000200f8, | 2736 | 0x0004007c,0x00000014,0x00002321,0x00002331, |
| 2497 | 0x00002029,0x000500c5,0x00000006,0x0000202b, | 2737 | 0x00060041,0x000000db,0x00002319,0x00002321, |
| 2498 | 0x00001fef,0x0000012d,0x000200f9,0x0000202c, | 2738 | 0x000000da,0x000000da,0x0005003e,0x00002319, |
| 2499 | 0x000200f8,0x0000202c,0x000700f5,0x00000006, | 2739 | 0x0000230e,0x00000002,0x00000004,0x00050080, |
| 2500 | 0x00002b0f,0x00002028,0x00002026,0x0000202b, | 2740 | 0x00000006,0x0000224c,0x00002228,0x00000189, |
| 2501 | 0x00002029,0x000700ef,0x00000006,0x00001fac, | 2741 | 0x00050051,0x00000027,0x00002250,0x000032b1, |
| 2502 | 0x00001fa8,0x000000ad,0x000000a3,0x00002b0f, | 2742 | 0x00000002,0x0004007c,0x00000006,0x00002337, |
| 2503 | 0x00060041,0x000000d8,0x00001fae,0x00001fd9, | 2743 | 0x00002250,0x00050095,0x000000ab,0x00002352, |
| 2504 | 0x000000d7,0x00000212,0x000300f7,0x0000203d, | 2744 | 0x00002283,0x0000224c,0x00050051,0x00000006, |
| 2505 | 0x00000000,0x000400fa,0x00002003,0x00002037, | 2745 | 0x00002353,0x00002352,0x00000001,0x00050051, |
| 2506 | 0x0000203a,0x000200f8,0x00002037,0x000400c8, | 2746 | 0x00000006,0x00002354,0x00002352,0x00000000, |
| 2507 | 0x00000006,0x00002039,0x00002000,0x000200f9, | 2747 | 0x00050080,0x00000006,0x00002359,0x0000228a, |
| 2508 | 0x0000203d,0x000200f8,0x0000203a,0x000500c5, | 2748 | 0x00002353,0x00050050,0x00000007,0x0000235a, |
| 2509 | 0x00000006,0x0000203c,0x00002000,0x0000012d, | 2749 | 0x00002354,0x00002359,0x0004007c,0x00000014, |
| 2510 | 0x000200f9,0x0000203d,0x000200f8,0x0000203d, | 2750 | 0x0000234a,0x0000235a,0x00060041,0x000000db, |
| 2511 | 0x000700f5,0x00000006,0x00002b10,0x00002039, | 2751 | 0x00002342,0x0000234a,0x000000da,0x000000da, |
| 2512 | 0x00002037,0x0000203c,0x0000203a,0x000700ef, | 2752 | 0x0005003e,0x00002342,0x00002337,0x00000002, |
| 2513 | 0x00000006,0x00001fb2,0x00001fae,0x000000ad, | 2753 | 0x00000004,0x000300f7,0x0000239a,0x00000000, |
| 2514 | 0x000000a3,0x00002b10,0x00060041,0x000000d8, | 2754 | 0x000300fb,0x000000a6,0x00002369,0x000200f8, |
| 2515 | 0x00001fb4,0x00001fd9,0x000000d7,0x0000021a, | 2755 | 0x00002369,0x000500bc,0x0000002f,0x000023a1, |
| 2516 | 0x000300f7,0x0000204e,0x00000000,0x000400fa, | 2756 | 0x0000222d,0x00002242,0x000300f7,0x000023a8, |
| 2517 | 0x00002014,0x00002048,0x0000204b,0x000200f8, | 2757 | 0x00000000,0x000400fa,0x000023a1,0x000023a2, |
| 2518 | 0x00002048,0x000400c8,0x00000006,0x0000204a, | 2758 | 0x000023a8,0x000200f8,0x000023a2,0x000500bc, |
| 2519 | 0x00002011,0x000200f9,0x0000204e,0x000200f8, | 2759 | 0x0000002f,0x000023a7,0x00002234,0x00002249, |
| 2520 | 0x0000204b,0x000500c5,0x00000006,0x0000204d, | 2760 | 0x000200f9,0x000023a8,0x000200f8,0x000023a8, |
| 2521 | 0x00002011,0x0000012d,0x000200f9,0x0000204e, | 2761 | 0x000700f5,0x0000002f,0x000023a9,0x000023a1, |
| 2522 | 0x000200f8,0x0000204e,0x000700f5,0x00000006, | 2762 | 0x00002369,0x000023a7,0x000023a2,0x000300f7, |
| 2523 | 0x00002b11,0x0000204a,0x00002048,0x0000204d, | 2763 | 0x000023b0,0x00000000,0x000400fa,0x000023a9, |
| 2524 | 0x0000204b,0x000700ef,0x00000006,0x00001fb8, | 2764 | 0x000023aa,0x000023b0,0x000200f8,0x000023aa, |
| 2525 | 0x00001fb4,0x000000ad,0x000000a3,0x00002b11, | 2765 | 0x000500bc,0x0000002f,0x000023af,0x0000223b, |
| 2526 | 0x000200f9,0x00001fb9,0x000200f8,0x00001fb9, | 2766 | 0x00002250,0x000200f9,0x000023b0,0x000200f8, |
| 2527 | 0x000200f9,0x00000a56,0x000200f8,0x00000a5a, | 2767 | 0x000023b0,0x000700f5,0x0000002f,0x000023b1, |
| 2528 | 0x000500aa,0x0000002f,0x00000a5d,0x000009eb, | 2768 | 0x000023a9,0x000023a8,0x000023af,0x000023aa, |
| 2529 | 0x000002b4,0x000300f7,0x00000a5f,0x00000000, | 2769 | 0x000400a8,0x0000002f,0x000023b2,0x000023b1, |
| 2530 | 0x000400fa,0x00000a5d,0x00000a5e,0x00000a63, | 2770 | 0x000300f7,0x0000236e,0x00000000,0x000400fa, |
| 2531 | 0x000200f8,0x00000a5e,0x00050041,0x000000fb, | 2771 | 0x000023b2,0x0000236d,0x0000236e,0x000200f8, |
| 2532 | 0x00002103,0x000000f9,0x000000fa,0x0004003d, | 2772 | 0x0000236d,0x000200f9,0x0000239a,0x000200f8, |
| 2533 | 0x00000006,0x00002104,0x00002103,0x00050084, | 2773 | 0x0000236e,0x00050081,0x0000004b,0x00002371, |
| 2534 | 0x00000006,0x00002105,0x0000011c,0x00002104, | 2774 | 0x000032b3,0x000032b1,0x0005008e,0x0000004b, |
| 2535 | 0x00050080,0x00000006,0x00002106,0x00000104, | 2775 | 0x00002372,0x00002371,0x000001ed,0x00050095, |
| 2536 | 0x00002105,0x00050080,0x00000006,0x0000210c, | 2776 | 0x000000ab,0x000023c2,0x00002283,0x000000a6, |
| 2537 | 0x00002104,0x00002b67,0x00050086,0x00000006, | 2777 | 0x00050051,0x00000006,0x000023c3,0x000023c2, |
| 2538 | 0x0000210d,0x0000210c,0x000000fe,0x00050084, | 2778 | 0x00000001,0x00050051,0x00000006,0x000023c4, |
| 2539 | 0x00000006,0x000020ff,0x00000104,0x0000210d, | 2779 | 0x000023c2,0x00000000,0x00050080,0x00000006, |
| 2540 | 0x00050080,0x00000006,0x00002100,0x00002106, | 2780 | 0x000023c9,0x0000228a,0x000023c3,0x00050050, |
| 2541 | 0x000020ff,0x00050084,0x00000006,0x000020d4, | 2781 | 0x00000007,0x000023ca,0x000023c4,0x000023c9, |
| 2542 | 0x0000014d,0x000009e9,0x00050080,0x00000006, | 2782 | 0x0004007c,0x00000014,0x000023ba,0x000023ca, |
| 2543 | 0x000020d5,0x00002100,0x000020d4,0x00050041, | 2783 | 0x00060041,0x000000db,0x00002377,0x000023ba, |
| 2544 | 0x00000153,0x000020d6,0x000000f9,0x00000151, | 2784 | 0x000000da,0x000000da,0x00050051,0x00000027, |
| 2545 | 0x0004003d,0x00000007,0x000020d7,0x000020d6, | 2785 | 0x00002379,0x00002372,0x00000000,0x0004007c, |
| 2546 | 0x00050051,0x00000006,0x00002124,0x000020d7, | 2786 | 0x00000006,0x000023d0,0x00002379,0x000500c7, |
| 2547 | 0x00000000,0x00050095,0x000000a8,0x00002126, | 2787 | 0x00000006,0x000023d2,0x000023d0,0x00000130, |
| 2548 | 0x00002124,0x000020d5,0x00050051,0x00000006, | 2788 | 0x000500ab,0x0000002f,0x000023d3,0x000023d2, |
| 2549 | 0x00002127,0x00002126,0x00000001,0x00050051, | 2789 | 0x000000a6,0x000300f7,0x000023da,0x00000000, |
| 2550 | 0x00000006,0x00002128,0x00002126,0x00000000, | 2790 | 0x000400fa,0x000023d3,0x000023d4,0x000023d7, |
| 2551 | 0x00050051,0x00000006,0x0000212b,0x000020d7, | 2791 | 0x000200f8,0x000023d4,0x000400c8,0x00000006, |
| 2552 | 0x00000001,0x00050080,0x00000006,0x0000212d, | 2792 | 0x000023d6,0x000023d0,0x000200f9,0x000023da, |
| 2553 | 0x0000212b,0x00002127,0x00050050,0x00000007, | 2793 | 0x000200f8,0x000023d7,0x000500c5,0x00000006, |
| 2554 | 0x0000212e,0x00002128,0x0000212d,0x0004007c, | 2794 | 0x000023d9,0x000023d0,0x00000130,0x000200f9, |
| 2555 | 0x00000014,0x0000211e,0x0000212e,0x00060041, | 2795 | 0x000023da,0x000200f8,0x000023da,0x000700f5, |
| 2556 | 0x000000d8,0x00002115,0x0000211e,0x000000d7, | 2796 | 0x00000006,0x00003228,0x000023d6,0x000023d4, |
| 2557 | 0x000000d7,0x0006003d,0x00000006,0x00002116, | 2797 | 0x000023d9,0x000023d7,0x000700ed,0x00000006, |
| 2558 | 0x00002115,0x00000002,0x00000004,0x0004007c, | 2798 | 0x0000237b,0x00002377,0x000000b0,0x000000a6, |
| 2559 | 0x00000027,0x000020da,0x00002116,0x00050080, | 2799 | 0x00003228,0x00060041,0x000000db,0x0000237d, |
| 2560 | 0x00000006,0x000020dc,0x000020d5,0x00000107, | 2800 | 0x000023ba,0x000000da,0x00000154,0x00050051, |
| 2561 | 0x00050095,0x000000a8,0x00002147,0x00002124, | 2801 | 0x00000027,0x0000237f,0x00002372,0x00000001, |
| 2562 | 0x000020dc,0x00050051,0x00000006,0x00002148, | 2802 | 0x0004007c,0x00000006,0x000023e1,0x0000237f, |
| 2563 | 0x00002147,0x00000001,0x00050051,0x00000006, | 2803 | 0x000500c7,0x00000006,0x000023e3,0x000023e1, |
| 2564 | 0x00002149,0x00002147,0x00000000,0x00050080, | 2804 | 0x00000130,0x000500ab,0x0000002f,0x000023e4, |
| 2565 | 0x00000006,0x0000214e,0x0000212b,0x00002148, | 2805 | 0x000023e3,0x000000a6,0x000300f7,0x000023eb, |
| 2566 | 0x00050050,0x00000007,0x0000214f,0x00002149, | 2806 | 0x00000000,0x000400fa,0x000023e4,0x000023e5, |
| 2567 | 0x0000214e,0x0004007c,0x00000014,0x0000213f, | 2807 | 0x000023e8,0x000200f8,0x000023e5,0x000400c8, |
| 2568 | 0x0000214f,0x00060041,0x000000d8,0x00002136, | 2808 | 0x00000006,0x000023e7,0x000023e1,0x000200f9, |
| 2569 | 0x0000213f,0x000000d7,0x000000d7,0x0006003d, | 2809 | 0x000023eb,0x000200f8,0x000023e8,0x000500c5, |
| 2570 | 0x00000006,0x00002137,0x00002136,0x00000002, | 2810 | 0x00000006,0x000023ea,0x000023e1,0x00000130, |
| 2571 | 0x00000004,0x0004007c,0x00000027,0x000020e0, | 2811 | 0x000200f9,0x000023eb,0x000200f8,0x000023eb, |
| 2572 | 0x00002137,0x00050080,0x00000006,0x000020e2, | 2812 | 0x000700f5,0x00000006,0x00003229,0x000023e7, |
| 2573 | 0x000020d5,0x0000010e,0x00050095,0x000000a8, | 2813 | 0x000023e5,0x000023ea,0x000023e8,0x000700ed, |
| 2574 | 0x00002168,0x00002124,0x000020e2,0x00050051, | 2814 | 0x00000006,0x00002381,0x0000237d,0x000000b0, |
| 2575 | 0x00000006,0x00002169,0x00002168,0x00000001, | 2815 | 0x000000a6,0x00003229,0x00060041,0x000000db, |
| 2576 | 0x00050051,0x00000006,0x0000216a,0x00002168, | 2816 | 0x00002383,0x000023ba,0x000000da,0x00000205, |
| 2577 | 0x00000000,0x00050080,0x00000006,0x0000216f, | 2817 | 0x00050051,0x00000027,0x00002385,0x00002372, |
| 2578 | 0x0000212b,0x00002169,0x00050050,0x00000007, | 2818 | 0x00000002,0x0004007c,0x00000006,0x000023f2, |
| 2579 | 0x00002170,0x0000216a,0x0000216f,0x0004007c, | 2819 | 0x00002385,0x000500c7,0x00000006,0x000023f4, |
| 2580 | 0x00000014,0x00002160,0x00002170,0x00060041, | 2820 | 0x000023f2,0x00000130,0x000500ab,0x0000002f, |
| 2581 | 0x000000d8,0x00002157,0x00002160,0x000000d7, | 2821 | 0x000023f5,0x000023f4,0x000000a6,0x000300f7, |
| 2582 | 0x000000d7,0x0006003d,0x00000006,0x00002158, | 2822 | 0x000023fc,0x00000000,0x000400fa,0x000023f5, |
| 2583 | 0x00002157,0x00000002,0x00000004,0x0004007c, | 2823 | 0x000023f6,0x000023f9,0x000200f8,0x000023f6, |
| 2584 | 0x00000027,0x000020e6,0x00002158,0x00060050, | 2824 | 0x000400c8,0x00000006,0x000023f8,0x000023f2, |
| 2585 | 0x0000004b,0x000020e7,0x000020da,0x000020e0, | 2825 | 0x000200f9,0x000023fc,0x000200f8,0x000023f9, |
| 2586 | 0x000020e6,0x00050080,0x00000006,0x000020e9, | 2826 | 0x000500c5,0x00000006,0x000023fb,0x000023f2, |
| 2587 | 0x000020d5,0x00000115,0x00050095,0x000000a8, | 2827 | 0x00000130,0x000200f9,0x000023fc,0x000200f8, |
| 2588 | 0x00002189,0x00002124,0x000020e9,0x00050051, | 2828 | 0x000023fc,0x000700f5,0x00000006,0x0000322a, |
| 2589 | 0x00000006,0x0000218a,0x00002189,0x00000001, | 2829 | 0x000023f8,0x000023f6,0x000023fb,0x000023f9, |
| 2590 | 0x00050051,0x00000006,0x0000218b,0x00002189, | 2830 | 0x000700ed,0x00000006,0x00002387,0x00002383, |
| 2591 | 0x00000000,0x00050080,0x00000006,0x00002190, | 2831 | 0x000000b0,0x000000a6,0x0000322a,0x00060041, |
| 2592 | 0x0000212b,0x0000218a,0x00050050,0x00000007, | 2832 | 0x000000db,0x00002389,0x000023ba,0x000000da, |
| 2593 | 0x00002191,0x0000218b,0x00002190,0x0004007c, | 2833 | 0x0000020d,0x000300f7,0x0000240d,0x00000000, |
| 2594 | 0x00000014,0x00002181,0x00002191,0x00060041, | 2834 | 0x000400fa,0x000023d3,0x00002407,0x0000240a, |
| 2595 | 0x000000d8,0x00002178,0x00002181,0x000000d7, | 2835 | 0x000200f8,0x00002407,0x000400c8,0x00000006, |
| 2596 | 0x000000d7,0x0006003d,0x00000006,0x00002179, | 2836 | 0x00002409,0x000023d0,0x000200f9,0x0000240d, |
| 2597 | 0x00002178,0x00000002,0x00000004,0x0004007c, | 2837 | 0x000200f8,0x0000240a,0x000500c5,0x00000006, |
| 2598 | 0x00000027,0x000020ed,0x00002179,0x00050080, | 2838 | 0x0000240c,0x000023d0,0x00000130,0x000200f9, |
| 2599 | 0x00000006,0x000020ef,0x000020d5,0x0000011c, | 2839 | 0x0000240d,0x000200f8,0x0000240d,0x000700f5, |
| 2600 | 0x00050095,0x000000a8,0x000021aa,0x00002124, | 2840 | 0x00000006,0x0000322b,0x00002409,0x00002407, |
| 2601 | 0x000020ef,0x00050051,0x00000006,0x000021ab, | 2841 | 0x0000240c,0x0000240a,0x000700ef,0x00000006, |
| 2602 | 0x000021aa,0x00000001,0x00050051,0x00000006, | 2842 | 0x0000238d,0x00002389,0x000000b0,0x000000a6, |
| 2603 | 0x000021ac,0x000021aa,0x00000000,0x00050080, | 2843 | 0x0000322b,0x00060041,0x000000db,0x0000238f, |
| 2604 | 0x00000006,0x000021b1,0x0000212b,0x000021ab, | 2844 | 0x000023ba,0x000000da,0x00000215,0x000300f7, |
| 2605 | 0x00050050,0x00000007,0x000021b2,0x000021ac, | 2845 | 0x0000241e,0x00000000,0x000400fa,0x000023e4, |
| 2606 | 0x000021b1,0x0004007c,0x00000014,0x000021a2, | 2846 | 0x00002418,0x0000241b,0x000200f8,0x00002418, |
| 2607 | 0x000021b2,0x00060041,0x000000d8,0x00002199, | 2847 | 0x000400c8,0x00000006,0x0000241a,0x000023e1, |
| 2608 | 0x000021a2,0x000000d7,0x000000d7,0x0006003d, | 2848 | 0x000200f9,0x0000241e,0x000200f8,0x0000241b, |
| 2609 | 0x00000006,0x0000219a,0x00002199,0x00000002, | 2849 | 0x000500c5,0x00000006,0x0000241d,0x000023e1, |
| 2610 | 0x00000004,0x0004007c,0x00000027,0x000020f3, | 2850 | 0x00000130,0x000200f9,0x0000241e,0x000200f8, |
| 2611 | 0x0000219a,0x00050080,0x00000006,0x000020f5, | 2851 | 0x0000241e,0x000700f5,0x00000006,0x0000322c, |
| 2612 | 0x000020d5,0x00000186,0x00050095,0x000000a8, | 2852 | 0x0000241a,0x00002418,0x0000241d,0x0000241b, |
| 2613 | 0x000021cb,0x00002124,0x000020f5,0x00050051, | 2853 | 0x000700ef,0x00000006,0x00002393,0x0000238f, |
| 2614 | 0x00000006,0x000021cc,0x000021cb,0x00000001, | 2854 | 0x000000b0,0x000000a6,0x0000322c,0x00060041, |
| 2615 | 0x00050051,0x00000006,0x000021cd,0x000021cb, | 2855 | 0x000000db,0x00002395,0x000023ba,0x000000da, |
| 2616 | 0x00000000,0x00050080,0x00000006,0x000021d2, | 2856 | 0x0000021d,0x000300f7,0x0000242f,0x00000000, |
| 2617 | 0x0000212b,0x000021cc,0x00050050,0x00000007, | 2857 | 0x000400fa,0x000023f5,0x00002429,0x0000242c, |
| 2618 | 0x000021d3,0x000021cd,0x000021d2,0x0004007c, | 2858 | 0x000200f8,0x00002429,0x000400c8,0x00000006, |
| 2619 | 0x00000014,0x000021c3,0x000021d3,0x00060041, | 2859 | 0x0000242b,0x000023f2,0x000200f9,0x0000242f, |
| 2620 | 0x000000d8,0x000021ba,0x000021c3,0x000000d7, | 2860 | 0x000200f8,0x0000242c,0x000500c5,0x00000006, |
| 2621 | 0x000000d7,0x0006003d,0x00000006,0x000021bb, | 2861 | 0x0000242e,0x000023f2,0x00000130,0x000200f9, |
| 2622 | 0x000021ba,0x00000002,0x00000004,0x0004007c, | 2862 | 0x0000242f,0x000200f8,0x0000242f,0x000700f5, |
| 2623 | 0x00000027,0x000020f9,0x000021bb,0x00060050, | 2863 | 0x00000006,0x0000322d,0x0000242b,0x00002429, |
| 2624 | 0x0000004b,0x000020fa,0x000020ed,0x000020f3, | 2864 | 0x0000242e,0x0000242c,0x000700ef,0x00000006, |
| 2625 | 0x000020f9,0x000500bc,0x0000002f,0x000021da, | 2865 | 0x00002399,0x00002395,0x000000b0,0x000000a6, |
| 2626 | 0x000020da,0x000020ed,0x000300f7,0x000021e1, | 2866 | 0x0000322d,0x000200f9,0x0000239a,0x000200f8, |
| 2627 | 0x00000000,0x000400fa,0x000021da,0x000021db, | 2867 | 0x0000239a,0x000200f9,0x00000bdb,0x000200f8, |
| 2628 | 0x000021e1,0x000200f8,0x000021db,0x000500bc, | 2868 | 0x00000bdf,0x000500aa,0x0000002f,0x00000be2, |
| 2629 | 0x0000002f,0x000021e0,0x000020e0,0x000020f3, | 2869 | 0x00000b13,0x000002b7,0x000300f7,0x00000be4, |
| 2630 | 0x000200f9,0x000021e1,0x000200f8,0x000021e1, | 2870 | 0x00000000,0x000400fa,0x00000be2,0x00000be3, |
| 2631 | 0x000700f5,0x0000002f,0x000021e2,0x000021da, | 2871 | 0x00000be8,0x000200f8,0x00000be3,0x00050041, |
| 2632 | 0x00000a5e,0x000021e0,0x000021db,0x000300f7, | 2872 | 0x000000fe,0x000024e4,0x000000fc,0x000000fd, |
| 2633 | 0x000021e9,0x00000000,0x000400fa,0x000021e2, | 2873 | 0x0004003d,0x00000006,0x000024e5,0x000024e4, |
| 2634 | 0x000021e3,0x000021e9,0x000200f8,0x000021e3, | 2874 | 0x00050084,0x00000006,0x000024e6,0x0000011f, |
| 2635 | 0x000500bc,0x0000002f,0x000021e8,0x000020e6, | 2875 | 0x000024e5,0x00050080,0x00000006,0x000024e7, |
| 2636 | 0x000020f9,0x000200f9,0x000021e9,0x000200f8, | 2876 | 0x00000107,0x000024e6,0x00050080,0x00000006, |
| 2637 | 0x000021e9,0x000700f5,0x0000002f,0x000021ea, | 2877 | 0x000024ed,0x000024e5,0x000032a8,0x00050086, |
| 2638 | 0x000021e2,0x000021e1,0x000021e8,0x000021e3, | 2878 | 0x00000006,0x000024ee,0x000024ed,0x00000101, |
| 2639 | 0x000300f7,0x000020b3,0x00000000,0x000400fa, | 2879 | 0x00050084,0x00000006,0x000024e0,0x00000107, |
| 2640 | 0x000021ea,0x00002077,0x000020b3,0x000200f8, | 2880 | 0x000024ee,0x00050080,0x00000006,0x000024e1, |
| 2641 | 0x00002077,0x00050095,0x000000a8,0x000021fb, | 2881 | 0x000024e7,0x000024e0,0x00050084,0x00000006, |
| 2642 | 0x00002124,0x000000a3,0x00050051,0x00000006, | 2882 | 0x000024b5,0x00000150,0x00000b11,0x00050080, |
| 2643 | 0x000021fc,0x000021fb,0x00000001,0x00050051, | 2883 | 0x00000006,0x000024b6,0x000024e1,0x000024b5, |
| 2644 | 0x00000006,0x000021fd,0x000021fb,0x00000000, | 2884 | 0x00050041,0x00000156,0x000024b7,0x000000fc, |
| 2645 | 0x00050080,0x00000006,0x00002202,0x0000212b, | 2885 | 0x00000154,0x0004003d,0x00000007,0x000024b8, |
| 2646 | 0x000021fc,0x00050050,0x00000007,0x00002203, | 2886 | 0x000024b7,0x00050051,0x00000006,0x00002505, |
| 2647 | 0x000021fd,0x00002202,0x0004007c,0x00000014, | 2887 | 0x000024b8,0x00000000,0x00050095,0x000000ab, |
| 2648 | 0x000021f3,0x00002203,0x00060041,0x000000d8, | 2888 | 0x00002507,0x00002505,0x000024b6,0x00050051, |
| 2649 | 0x0000207c,0x000021f3,0x000000d7,0x000000d7, | 2889 | 0x00000006,0x00002508,0x00002507,0x00000001, |
| 2650 | 0x0006003d,0x00000006,0x0000207d,0x0000207c, | 2890 | 0x00050051,0x00000006,0x00002509,0x00002507, |
| 2891 | 0x00000000,0x00050051,0x00000006,0x0000250c, | ||
| 2892 | 0x000024b8,0x00000001,0x00050080,0x00000006, | ||
| 2893 | 0x0000250e,0x0000250c,0x00002508,0x00050050, | ||
| 2894 | 0x00000007,0x0000250f,0x00002509,0x0000250e, | ||
| 2895 | 0x0004007c,0x00000014,0x000024ff,0x0000250f, | ||
| 2896 | 0x00060041,0x000000db,0x000024f6,0x000024ff, | ||
| 2897 | 0x000000da,0x000000da,0x0006003d,0x00000006, | ||
| 2898 | 0x000024f7,0x000024f6,0x00000002,0x00000004, | ||
| 2899 | 0x0004007c,0x00000027,0x000024bb,0x000024f7, | ||
| 2900 | 0x00050080,0x00000006,0x000024bd,0x000024b6, | ||
| 2901 | 0x0000010a,0x00050095,0x000000ab,0x00002528, | ||
| 2902 | 0x00002505,0x000024bd,0x00050051,0x00000006, | ||
| 2903 | 0x00002529,0x00002528,0x00000001,0x00050051, | ||
| 2904 | 0x00000006,0x0000252a,0x00002528,0x00000000, | ||
| 2905 | 0x00050080,0x00000006,0x0000252f,0x0000250c, | ||
| 2906 | 0x00002529,0x00050050,0x00000007,0x00002530, | ||
| 2907 | 0x0000252a,0x0000252f,0x0004007c,0x00000014, | ||
| 2908 | 0x00002520,0x00002530,0x00060041,0x000000db, | ||
| 2909 | 0x00002517,0x00002520,0x000000da,0x000000da, | ||
| 2910 | 0x0006003d,0x00000006,0x00002518,0x00002517, | ||
| 2911 | 0x00000002,0x00000004,0x0004007c,0x00000027, | ||
| 2912 | 0x000024c1,0x00002518,0x00050080,0x00000006, | ||
| 2913 | 0x000024c3,0x000024b6,0x00000111,0x00050095, | ||
| 2914 | 0x000000ab,0x00002549,0x00002505,0x000024c3, | ||
| 2915 | 0x00050051,0x00000006,0x0000254a,0x00002549, | ||
| 2916 | 0x00000001,0x00050051,0x00000006,0x0000254b, | ||
| 2917 | 0x00002549,0x00000000,0x00050080,0x00000006, | ||
| 2918 | 0x00002550,0x0000250c,0x0000254a,0x00050050, | ||
| 2919 | 0x00000007,0x00002551,0x0000254b,0x00002550, | ||
| 2920 | 0x0004007c,0x00000014,0x00002541,0x00002551, | ||
| 2921 | 0x00060041,0x000000db,0x00002538,0x00002541, | ||
| 2922 | 0x000000da,0x000000da,0x0006003d,0x00000006, | ||
| 2923 | 0x00002539,0x00002538,0x00000002,0x00000004, | ||
| 2924 | 0x0004007c,0x00000027,0x000024c7,0x00002539, | ||
| 2925 | 0x00060050,0x0000004b,0x000024c8,0x000024bb, | ||
| 2926 | 0x000024c1,0x000024c7,0x00050080,0x00000006, | ||
| 2927 | 0x000024ca,0x000024b6,0x00000118,0x00050095, | ||
| 2928 | 0x000000ab,0x0000256a,0x00002505,0x000024ca, | ||
| 2929 | 0x00050051,0x00000006,0x0000256b,0x0000256a, | ||
| 2930 | 0x00000001,0x00050051,0x00000006,0x0000256c, | ||
| 2931 | 0x0000256a,0x00000000,0x00050080,0x00000006, | ||
| 2932 | 0x00002571,0x0000250c,0x0000256b,0x00050050, | ||
| 2933 | 0x00000007,0x00002572,0x0000256c,0x00002571, | ||
| 2934 | 0x0004007c,0x00000014,0x00002562,0x00002572, | ||
| 2935 | 0x00060041,0x000000db,0x00002559,0x00002562, | ||
| 2936 | 0x000000da,0x000000da,0x0006003d,0x00000006, | ||
| 2937 | 0x0000255a,0x00002559,0x00000002,0x00000004, | ||
| 2938 | 0x0004007c,0x00000027,0x000024ce,0x0000255a, | ||
| 2939 | 0x00050080,0x00000006,0x000024d0,0x000024b6, | ||
| 2940 | 0x0000011f,0x00050095,0x000000ab,0x0000258b, | ||
| 2941 | 0x00002505,0x000024d0,0x00050051,0x00000006, | ||
| 2942 | 0x0000258c,0x0000258b,0x00000001,0x00050051, | ||
| 2943 | 0x00000006,0x0000258d,0x0000258b,0x00000000, | ||
| 2944 | 0x00050080,0x00000006,0x00002592,0x0000250c, | ||
| 2945 | 0x0000258c,0x00050050,0x00000007,0x00002593, | ||
| 2946 | 0x0000258d,0x00002592,0x0004007c,0x00000014, | ||
| 2947 | 0x00002583,0x00002593,0x00060041,0x000000db, | ||
| 2948 | 0x0000257a,0x00002583,0x000000da,0x000000da, | ||
| 2949 | 0x0006003d,0x00000006,0x0000257b,0x0000257a, | ||
| 2950 | 0x00000002,0x00000004,0x0004007c,0x00000027, | ||
| 2951 | 0x000024d4,0x0000257b,0x00050080,0x00000006, | ||
| 2952 | 0x000024d6,0x000024b6,0x00000189,0x00050095, | ||
| 2953 | 0x000000ab,0x000025ac,0x00002505,0x000024d6, | ||
| 2954 | 0x00050051,0x00000006,0x000025ad,0x000025ac, | ||
| 2955 | 0x00000001,0x00050051,0x00000006,0x000025ae, | ||
| 2956 | 0x000025ac,0x00000000,0x00050080,0x00000006, | ||
| 2957 | 0x000025b3,0x0000250c,0x000025ad,0x00050050, | ||
| 2958 | 0x00000007,0x000025b4,0x000025ae,0x000025b3, | ||
| 2959 | 0x0004007c,0x00000014,0x000025a4,0x000025b4, | ||
| 2960 | 0x00060041,0x000000db,0x0000259b,0x000025a4, | ||
| 2961 | 0x000000da,0x000000da,0x0006003d,0x00000006, | ||
| 2962 | 0x0000259c,0x0000259b,0x00000002,0x00000004, | ||
| 2963 | 0x0004007c,0x00000027,0x000024da,0x0000259c, | ||
| 2964 | 0x00060050,0x0000004b,0x000024db,0x000024ce, | ||
| 2965 | 0x000024d4,0x000024da,0x000500bc,0x0000002f, | ||
| 2966 | 0x000025bb,0x000024bb,0x000024ce,0x000300f7, | ||
| 2967 | 0x000025c2,0x00000000,0x000400fa,0x000025bb, | ||
| 2968 | 0x000025bc,0x000025c2,0x000200f8,0x000025bc, | ||
| 2969 | 0x000500bc,0x0000002f,0x000025c1,0x000024c1, | ||
| 2970 | 0x000024d4,0x000200f9,0x000025c2,0x000200f8, | ||
| 2971 | 0x000025c2,0x000700f5,0x0000002f,0x000025c3, | ||
| 2972 | 0x000025bb,0x00000be3,0x000025c1,0x000025bc, | ||
| 2973 | 0x000300f7,0x000025ca,0x00000000,0x000400fa, | ||
| 2974 | 0x000025c3,0x000025c4,0x000025ca,0x000200f8, | ||
| 2975 | 0x000025c4,0x000500bc,0x0000002f,0x000025c9, | ||
| 2976 | 0x000024c7,0x000024da,0x000200f9,0x000025ca, | ||
| 2977 | 0x000200f8,0x000025ca,0x000700f5,0x0000002f, | ||
| 2978 | 0x000025cb,0x000025c3,0x000025c2,0x000025c9, | ||
| 2979 | 0x000025c4,0x000300f7,0x00002494,0x00000000, | ||
| 2980 | 0x000400fa,0x000025cb,0x00002458,0x00002494, | ||
| 2981 | 0x000200f8,0x00002458,0x00050095,0x000000ab, | ||
| 2982 | 0x000025dc,0x00002505,0x000000a6,0x00050051, | ||
| 2983 | 0x00000006,0x000025dd,0x000025dc,0x00000001, | ||
| 2984 | 0x00050051,0x00000006,0x000025de,0x000025dc, | ||
| 2985 | 0x00000000,0x00050080,0x00000006,0x000025e3, | ||
| 2986 | 0x0000250c,0x000025dd,0x00050050,0x00000007, | ||
| 2987 | 0x000025e4,0x000025de,0x000025e3,0x0004007c, | ||
| 2988 | 0x00000014,0x000025d4,0x000025e4,0x00060041, | ||
| 2989 | 0x000000db,0x0000245d,0x000025d4,0x000000da, | ||
| 2990 | 0x000000da,0x0006003d,0x00000006,0x0000245e, | ||
| 2991 | 0x0000245d,0x00000002,0x00000004,0x000500c7, | ||
| 2992 | 0x00000006,0x000025e9,0x0000245e,0x00000130, | ||
| 2993 | 0x000500ab,0x0000002f,0x000025ea,0x000025e9, | ||
| 2994 | 0x000000a6,0x000300f7,0x000025f1,0x00000000, | ||
| 2995 | 0x000400fa,0x000025ea,0x000025eb,0x000025ee, | ||
| 2996 | 0x000200f8,0x000025eb,0x000500c7,0x00000006, | ||
| 2997 | 0x000025ed,0x0000245e,0x00000145,0x000200f9, | ||
| 2998 | 0x000025f1,0x000200f8,0x000025ee,0x000400c8, | ||
| 2999 | 0x00000006,0x000025f0,0x0000245e,0x000200f9, | ||
| 3000 | 0x000025f1,0x000200f8,0x000025f1,0x000700f5, | ||
| 3001 | 0x00000006,0x000031e7,0x000025ed,0x000025eb, | ||
| 3002 | 0x000025f0,0x000025ee,0x0004007c,0x00000027, | ||
| 3003 | 0x000025f3,0x000031e7,0x00060041,0x000000db, | ||
| 3004 | 0x00002461,0x000025d4,0x000000da,0x00000154, | ||
| 3005 | 0x0006003d,0x00000006,0x00002462,0x00002461, | ||
| 3006 | 0x00000002,0x00000004,0x000500c7,0x00000006, | ||
| 3007 | 0x000025f8,0x00002462,0x00000130,0x000500ab, | ||
| 3008 | 0x0000002f,0x000025f9,0x000025f8,0x000000a6, | ||
| 3009 | 0x000300f7,0x00002600,0x00000000,0x000400fa, | ||
| 3010 | 0x000025f9,0x000025fa,0x000025fd,0x000200f8, | ||
| 3011 | 0x000025fa,0x000500c7,0x00000006,0x000025fc, | ||
| 3012 | 0x00002462,0x00000145,0x000200f9,0x00002600, | ||
| 3013 | 0x000200f8,0x000025fd,0x000400c8,0x00000006, | ||
| 3014 | 0x000025ff,0x00002462,0x000200f9,0x00002600, | ||
| 3015 | 0x000200f8,0x00002600,0x000700f5,0x00000006, | ||
| 3016 | 0x000031e8,0x000025fc,0x000025fa,0x000025ff, | ||
| 3017 | 0x000025fd,0x0004007c,0x00000027,0x00002602, | ||
| 3018 | 0x000031e8,0x00060041,0x000000db,0x00002465, | ||
| 3019 | 0x000025d4,0x000000da,0x00000205,0x0006003d, | ||
| 3020 | 0x00000006,0x00002466,0x00002465,0x00000002, | ||
| 3021 | 0x00000004,0x000500c7,0x00000006,0x00002607, | ||
| 3022 | 0x00002466,0x00000130,0x000500ab,0x0000002f, | ||
| 3023 | 0x00002608,0x00002607,0x000000a6,0x000300f7, | ||
| 3024 | 0x0000260f,0x00000000,0x000400fa,0x00002608, | ||
| 3025 | 0x00002609,0x0000260c,0x000200f8,0x00002609, | ||
| 3026 | 0x000500c7,0x00000006,0x0000260b,0x00002466, | ||
| 3027 | 0x00000145,0x000200f9,0x0000260f,0x000200f8, | ||
| 3028 | 0x0000260c,0x000400c8,0x00000006,0x0000260e, | ||
| 3029 | 0x00002466,0x000200f9,0x0000260f,0x000200f8, | ||
| 3030 | 0x0000260f,0x000700f5,0x00000006,0x000031e9, | ||
| 3031 | 0x0000260b,0x00002609,0x0000260e,0x0000260c, | ||
| 3032 | 0x0004007c,0x00000027,0x00002611,0x000031e9, | ||
| 3033 | 0x00060050,0x0000004b,0x00002468,0x000025f3, | ||
| 3034 | 0x00002602,0x00002611,0x00060041,0x000000db, | ||
| 3035 | 0x0000246a,0x000025d4,0x000000da,0x0000020d, | ||
| 3036 | 0x0006003d,0x00000006,0x0000246b,0x0000246a, | ||
| 2651 | 0x00000002,0x00000004,0x000500c7,0x00000006, | 3037 | 0x00000002,0x00000004,0x000500c7,0x00000006, |
| 2652 | 0x00002208,0x0000207d,0x0000012d,0x000500ab, | 3038 | 0x00002616,0x0000246b,0x00000130,0x000500ab, |
| 2653 | 0x0000002f,0x00002209,0x00002208,0x000000a3, | 3039 | 0x0000002f,0x00002617,0x00002616,0x000000a6, |
| 2654 | 0x000300f7,0x00002210,0x00000000,0x000400fa, | 3040 | 0x000300f7,0x0000261e,0x00000000,0x000400fa, |
| 2655 | 0x00002209,0x0000220a,0x0000220d,0x000200f8, | 3041 | 0x00002617,0x00002618,0x0000261b,0x000200f8, |
| 2656 | 0x0000220a,0x000500c7,0x00000006,0x0000220c, | 3042 | 0x00002618,0x000500c7,0x00000006,0x0000261a, |
| 2657 | 0x0000207d,0x00000142,0x000200f9,0x00002210, | 3043 | 0x0000246b,0x00000145,0x000200f9,0x0000261e, |
| 2658 | 0x000200f8,0x0000220d,0x000400c8,0x00000006, | 3044 | 0x000200f8,0x0000261b,0x000400c8,0x00000006, |
| 2659 | 0x0000220f,0x0000207d,0x000200f9,0x00002210, | 3045 | 0x0000261d,0x0000246b,0x000200f9,0x0000261e, |
| 2660 | 0x000200f8,0x00002210,0x000700f5,0x00000006, | 3046 | 0x000200f8,0x0000261e,0x000700f5,0x00000006, |
| 2661 | 0x00002acb,0x0000220c,0x0000220a,0x0000220f, | 3047 | 0x000031ea,0x0000261a,0x00002618,0x0000261d, |
| 2662 | 0x0000220d,0x0004007c,0x00000027,0x00002212, | 3048 | 0x0000261b,0x0004007c,0x00000027,0x00002620, |
| 2663 | 0x00002acb,0x00060041,0x000000d8,0x00002080, | 3049 | 0x000031ea,0x00060041,0x000000db,0x0000246e, |
| 2664 | 0x000021f3,0x000000d7,0x00000151,0x0006003d, | 3050 | 0x000025d4,0x000000da,0x00000215,0x0006003d, |
| 2665 | 0x00000006,0x00002081,0x00002080,0x00000002, | 3051 | 0x00000006,0x0000246f,0x0000246e,0x00000002, |
| 2666 | 0x00000004,0x000500c7,0x00000006,0x00002217, | 3052 | 0x00000004,0x000500c7,0x00000006,0x00002625, |
| 2667 | 0x00002081,0x0000012d,0x000500ab,0x0000002f, | 3053 | 0x0000246f,0x00000130,0x000500ab,0x0000002f, |
| 2668 | 0x00002218,0x00002217,0x000000a3,0x000300f7, | 3054 | 0x00002626,0x00002625,0x000000a6,0x000300f7, |
| 2669 | 0x0000221f,0x00000000,0x000400fa,0x00002218, | 3055 | 0x0000262d,0x00000000,0x000400fa,0x00002626, |
| 2670 | 0x00002219,0x0000221c,0x000200f8,0x00002219, | 3056 | 0x00002627,0x0000262a,0x000200f8,0x00002627, |
| 2671 | 0x000500c7,0x00000006,0x0000221b,0x00002081, | 3057 | 0x000500c7,0x00000006,0x00002629,0x0000246f, |
| 2672 | 0x00000142,0x000200f9,0x0000221f,0x000200f8, | 3058 | 0x00000145,0x000200f9,0x0000262d,0x000200f8, |
| 2673 | 0x0000221c,0x000400c8,0x00000006,0x0000221e, | 3059 | 0x0000262a,0x000400c8,0x00000006,0x0000262c, |
| 2674 | 0x00002081,0x000200f9,0x0000221f,0x000200f8, | 3060 | 0x0000246f,0x000200f9,0x0000262d,0x000200f8, |
| 2675 | 0x0000221f,0x000700f5,0x00000006,0x00002acc, | 3061 | 0x0000262d,0x000700f5,0x00000006,0x000031eb, |
| 2676 | 0x0000221b,0x00002219,0x0000221e,0x0000221c, | 3062 | 0x00002629,0x00002627,0x0000262c,0x0000262a, |
| 2677 | 0x0004007c,0x00000027,0x00002221,0x00002acc, | 3063 | 0x0004007c,0x00000027,0x0000262f,0x000031eb, |
| 2678 | 0x00060041,0x000000d8,0x00002084,0x000021f3, | 3064 | 0x00060041,0x000000db,0x00002472,0x000025d4, |
| 2679 | 0x000000d7,0x00000202,0x0006003d,0x00000006, | 3065 | 0x000000da,0x0000021d,0x0006003d,0x00000006, |
| 2680 | 0x00002085,0x00002084,0x00000002,0x00000004, | 3066 | 0x00002473,0x00002472,0x00000002,0x00000004, |
| 2681 | 0x000500c7,0x00000006,0x00002226,0x00002085, | 3067 | 0x000500c7,0x00000006,0x00002634,0x00002473, |
| 2682 | 0x0000012d,0x000500ab,0x0000002f,0x00002227, | 3068 | 0x00000130,0x000500ab,0x0000002f,0x00002635, |
| 2683 | 0x00002226,0x000000a3,0x000300f7,0x0000222e, | 3069 | 0x00002634,0x000000a6,0x000300f7,0x0000263c, |
| 2684 | 0x00000000,0x000400fa,0x00002227,0x00002228, | 3070 | 0x00000000,0x000400fa,0x00002635,0x00002636, |
| 2685 | 0x0000222b,0x000200f8,0x00002228,0x000500c7, | 3071 | 0x00002639,0x000200f8,0x00002636,0x000500c7, |
| 2686 | 0x00000006,0x0000222a,0x00002085,0x00000142, | 3072 | 0x00000006,0x00002638,0x00002473,0x00000145, |
| 2687 | 0x000200f9,0x0000222e,0x000200f8,0x0000222b, | 3073 | 0x000200f9,0x0000263c,0x000200f8,0x00002639, |
| 2688 | 0x000400c8,0x00000006,0x0000222d,0x00002085, | 3074 | 0x000400c8,0x00000006,0x0000263b,0x00002473, |
| 2689 | 0x000200f9,0x0000222e,0x000200f8,0x0000222e, | 3075 | 0x000200f9,0x0000263c,0x000200f8,0x0000263c, |
| 2690 | 0x000700f5,0x00000006,0x00002acd,0x0000222a, | 3076 | 0x000700f5,0x00000006,0x000031ec,0x00002638, |
| 2691 | 0x00002228,0x0000222d,0x0000222b,0x0004007c, | 3077 | 0x00002636,0x0000263b,0x00002639,0x0004007c, |
| 2692 | 0x00000027,0x00002230,0x00002acd,0x00060050, | 3078 | 0x00000027,0x0000263e,0x000031ec,0x00060050, |
| 2693 | 0x0000004b,0x00002087,0x00002212,0x00002221, | 3079 | 0x0000004b,0x00002475,0x00002620,0x0000262f, |
| 2694 | 0x00002230,0x00060041,0x000000d8,0x00002089, | 3080 | 0x0000263e,0x00050083,0x0000004b,0x00002478, |
| 2695 | 0x000021f3,0x000000d7,0x0000020a,0x0006003d, | 3081 | 0x00002475,0x00002468,0x0007000c,0x0000004b, |
| 2696 | 0x00000006,0x0000208a,0x00002089,0x00000002, | 3082 | 0x00002479,0x00000001,0x00000028,0x00002478, |
| 2697 | 0x00000004,0x000500c7,0x00000006,0x00002235, | 3083 | 0x0000065b,0x00050081,0x0000004b,0x0000247c, |
| 2698 | 0x0000208a,0x0000012d,0x000500ab,0x0000002f, | 3084 | 0x000024c8,0x000024db,0x0005008e,0x0000004b, |
| 2699 | 0x00002236,0x00002235,0x000000a3,0x000300f7, | 3085 | 0x0000247d,0x0000247c,0x000001ed,0x00050083, |
| 2700 | 0x0000223d,0x00000000,0x000400fa,0x00002236, | 3086 | 0x0000004b,0x0000247f,0x0000247d,0x00002468, |
| 2701 | 0x00002237,0x0000223a,0x000200f8,0x00002237, | 3087 | 0x00050088,0x0000004b,0x00002481,0x0000247f, |
| 2702 | 0x000500c7,0x00000006,0x00002239,0x0000208a, | 3088 | 0x00002479,0x0008000c,0x0000004b,0x00002484, |
| 2703 | 0x00000142,0x000200f9,0x0000223d,0x000200f8, | 3089 | 0x00000001,0x0000002b,0x00002481,0x00000570, |
| 2704 | 0x0000223a,0x000400c8,0x00000006,0x0000223c, | 3090 | 0x000032a2,0x0005008e,0x0000004b,0x00002485, |
| 2705 | 0x0000208a,0x000200f9,0x0000223d,0x000200f8, | 3091 | 0x00002484,0x0000066b,0x0004006d,0x0000065d, |
| 2706 | 0x0000223d,0x000700f5,0x00000006,0x00002ace, | 3092 | 0x00002486,0x00002485,0x00050051,0x00000006, |
| 2707 | 0x00002239,0x00002237,0x0000223c,0x0000223a, | 3093 | 0x00002488,0x00002486,0x00000000,0x000500c7, |
| 2708 | 0x0004007c,0x00000027,0x0000223f,0x00002ace, | 3094 | 0x00000006,0x00002642,0x00002488,0x000005fe, |
| 2709 | 0x00060041,0x000000d8,0x0000208d,0x000021f3, | 3095 | 0x000500c4,0x00000006,0x00002645,0x00002642, |
| 2710 | 0x000000d7,0x00000212,0x0006003d,0x00000006, | 3096 | 0x0000023e,0x000500c5,0x00000006,0x00002646, |
| 2711 | 0x0000208e,0x0000208d,0x00000002,0x00000004, | 3097 | 0x00002642,0x00002645,0x000500c7,0x00000006, |
| 2712 | 0x000500c7,0x00000006,0x00002244,0x0000208e, | 3098 | 0x00002647,0x00002646,0x00000605,0x000500c4, |
| 2713 | 0x0000012d,0x000500ab,0x0000002f,0x00002245, | 3099 | 0x00000006,0x0000264a,0x00002647,0x00000308, |
| 2714 | 0x00002244,0x000000a3,0x000300f7,0x0000224c, | 3100 | 0x000500c5,0x00000006,0x0000264b,0x00002647, |
| 2715 | 0x00000000,0x000400fa,0x00002245,0x00002246, | 3101 | 0x0000264a,0x000500c7,0x00000006,0x0000264c, |
| 2716 | 0x00002249,0x000200f8,0x00002246,0x000500c7, | 3102 | 0x0000264b,0x0000060b,0x000500c4,0x00000006, |
| 2717 | 0x00000006,0x00002248,0x0000208e,0x00000142, | 3103 | 0x0000264f,0x0000264c,0x00000215,0x000500c5, |
| 2718 | 0x000200f9,0x0000224c,0x000200f8,0x00002249, | 3104 | 0x00000006,0x00002650,0x0000264c,0x0000264f, |
| 2719 | 0x000400c8,0x00000006,0x0000224b,0x0000208e, | 3105 | 0x000500c7,0x00000006,0x00002651,0x00002650, |
| 2720 | 0x000200f9,0x0000224c,0x000200f8,0x0000224c, | 3106 | 0x00000611,0x000500c4,0x00000006,0x00002654, |
| 2721 | 0x000700f5,0x00000006,0x00002acf,0x00002248, | 3107 | 0x00002651,0x00000205,0x000500c5,0x00000006, |
| 2722 | 0x00002246,0x0000224b,0x00002249,0x0004007c, | 3108 | 0x00002655,0x00002651,0x00002654,0x000500c7, |
| 2723 | 0x00000027,0x0000224e,0x00002acf,0x00060041, | 3109 | 0x00000006,0x00002656,0x00002655,0x00000617, |
| 2724 | 0x000000d8,0x00002091,0x000021f3,0x000000d7, | 3110 | 0x000500c4,0x00000006,0x0000248a,0x00002656, |
| 2725 | 0x0000021a,0x0006003d,0x00000006,0x00002092, | 3111 | 0x00000205,0x00050051,0x00000006,0x0000248c, |
| 2726 | 0x00002091,0x00000002,0x00000004,0x000500c7, | 3112 | 0x00002486,0x00000001,0x000500c7,0x00000006, |
| 2727 | 0x00000006,0x00002253,0x00002092,0x0000012d, | 3113 | 0x0000265b,0x0000248c,0x000005fe,0x000500c4, |
| 2728 | 0x000500ab,0x0000002f,0x00002254,0x00002253, | 3114 | 0x00000006,0x0000265e,0x0000265b,0x0000023e, |
| 2729 | 0x000000a3,0x000300f7,0x0000225b,0x00000000, | 3115 | 0x000500c5,0x00000006,0x0000265f,0x0000265b, |
| 2730 | 0x000400fa,0x00002254,0x00002255,0x00002258, | 3116 | 0x0000265e,0x000500c7,0x00000006,0x00002660, |
| 2731 | 0x000200f8,0x00002255,0x000500c7,0x00000006, | 3117 | 0x0000265f,0x00000605,0x000500c4,0x00000006, |
| 2732 | 0x00002257,0x00002092,0x00000142,0x000200f9, | 3118 | 0x00002663,0x00002660,0x00000308,0x000500c5, |
| 2733 | 0x0000225b,0x000200f8,0x00002258,0x000400c8, | 3119 | 0x00000006,0x00002664,0x00002660,0x00002663, |
| 2734 | 0x00000006,0x0000225a,0x00002092,0x000200f9, | 3120 | 0x000500c7,0x00000006,0x00002665,0x00002664, |
| 2735 | 0x0000225b,0x000200f8,0x0000225b,0x000700f5, | 3121 | 0x0000060b,0x000500c4,0x00000006,0x00002668, |
| 2736 | 0x00000006,0x00002ad0,0x00002257,0x00002255, | 3122 | 0x00002665,0x00000215,0x000500c5,0x00000006, |
| 2737 | 0x0000225a,0x00002258,0x0004007c,0x00000027, | 3123 | 0x00002669,0x00002665,0x00002668,0x000500c7, |
| 2738 | 0x0000225d,0x00002ad0,0x00060050,0x0000004b, | 3124 | 0x00000006,0x0000266a,0x00002669,0x00000611, |
| 2739 | 0x00002094,0x0000223f,0x0000224e,0x0000225d, | 3125 | 0x000500c4,0x00000006,0x0000266d,0x0000266a, |
| 2740 | 0x00050083,0x0000004b,0x00002097,0x00002094, | 3126 | 0x00000205,0x000500c5,0x00000006,0x0000266e, |
| 2741 | 0x00002087,0x0007000c,0x0000004b,0x00002098, | 3127 | 0x0000266a,0x0000266d,0x000500c7,0x00000006, |
| 2742 | 0x00000001,0x00000028,0x00002097,0x00000658, | 3128 | 0x0000266f,0x0000266e,0x00000617,0x000500c4, |
| 2743 | 0x00050081,0x0000004b,0x0000209b,0x000020e7, | 3129 | 0x00000006,0x0000248e,0x0000266f,0x00000154, |
| 2744 | 0x000020fa,0x0005008e,0x0000004b,0x0000209c, | 3130 | 0x000500c5,0x00000006,0x0000248f,0x0000248a, |
| 2745 | 0x0000209b,0x000001ea,0x00050083,0x0000004b, | 3131 | 0x0000248e,0x00050051,0x00000006,0x00002491, |
| 2746 | 0x0000209e,0x0000209c,0x00002087,0x00050088, | 3132 | 0x00002486,0x00000002,0x000500c7,0x00000006, |
| 2747 | 0x0000004b,0x000020a0,0x0000209e,0x00002098, | 3133 | 0x00002674,0x00002491,0x000005fe,0x000500c4, |
| 2748 | 0x0008000c,0x0000004b,0x000020a3,0x00000001, | 3134 | 0x00000006,0x00002677,0x00002674,0x0000023e, |
| 2749 | 0x0000002b,0x000020a0,0x0000056d,0x00002b61, | 3135 | 0x000500c5,0x00000006,0x00002678,0x00002674, |
| 2750 | 0x0005008e,0x0000004b,0x000020a4,0x000020a3, | 3136 | 0x00002677,0x000500c7,0x00000006,0x00002679, |
| 2751 | 0x00000668,0x0004006d,0x0000065a,0x000020a5, | 3137 | 0x00002678,0x00000605,0x000500c4,0x00000006, |
| 2752 | 0x000020a4,0x00050051,0x00000006,0x000020a7, | 3138 | 0x0000267c,0x00002679,0x00000308,0x000500c5, |
| 2753 | 0x000020a5,0x00000000,0x000500c7,0x00000006, | 3139 | 0x00000006,0x0000267d,0x00002679,0x0000267c, |
| 2754 | 0x00002261,0x000020a7,0x000005fb,0x000500c4, | 3140 | 0x000500c7,0x00000006,0x0000267e,0x0000267d, |
| 2755 | 0x00000006,0x00002264,0x00002261,0x0000023b, | 3141 | 0x0000060b,0x000500c4,0x00000006,0x00002681, |
| 2756 | 0x000500c5,0x00000006,0x00002265,0x00002261, | 3142 | 0x0000267e,0x00000215,0x000500c5,0x00000006, |
| 2757 | 0x00002264,0x000500c7,0x00000006,0x00002266, | 3143 | 0x00002682,0x0000267e,0x00002681,0x000500c7, |
| 2758 | 0x00002265,0x00000602,0x000500c4,0x00000006, | 3144 | 0x00000006,0x00002683,0x00002682,0x00000611, |
| 2759 | 0x00002269,0x00002266,0x00000305,0x000500c5, | 3145 | 0x000500c4,0x00000006,0x00002686,0x00002683, |
| 2760 | 0x00000006,0x0000226a,0x00002266,0x00002269, | 3146 | 0x00000205,0x000500c5,0x00000006,0x00002687, |
| 2761 | 0x000500c7,0x00000006,0x0000226b,0x0000226a, | 3147 | 0x00002683,0x00002686,0x000500c7,0x00000006, |
| 2762 | 0x00000608,0x000500c4,0x00000006,0x0000226e, | 3148 | 0x00002688,0x00002687,0x00000617,0x000500c5, |
| 2763 | 0x0000226b,0x00000212,0x000500c5,0x00000006, | 3149 | 0x00000006,0x00002493,0x0000248f,0x00002688, |
| 2764 | 0x0000226f,0x0000226b,0x0000226e,0x000500c7, | 3150 | 0x000200f9,0x00002494,0x000200f8,0x00002494, |
| 2765 | 0x00000006,0x00002270,0x0000226f,0x0000060e, | 3151 | 0x000700f5,0x00000006,0x000031ed,0x00000531, |
| 2766 | 0x000500c4,0x00000006,0x00002273,0x00002270, | 3152 | 0x000025ca,0x00002493,0x0000263c,0x00050084, |
| 2767 | 0x00000202,0x000500c5,0x00000006,0x00002274, | 3153 | 0x00000006,0x00002497,0x0000010a,0x00000b11, |
| 2768 | 0x00002270,0x00002273,0x000500c7,0x00000006, | 3154 | 0x00050080,0x00000006,0x00002498,0x00000107, |
| 2769 | 0x00002275,0x00002274,0x00000614,0x000500c4, | 3155 | 0x00002497,0x00050095,0x000000ab,0x000026a3, |
| 2770 | 0x00000006,0x000020a9,0x00002275,0x00000202, | 3156 | 0x00002505,0x00002498,0x00050051,0x00000006, |
| 2771 | 0x00050051,0x00000006,0x000020ab,0x000020a5, | 3157 | 0x000026a4,0x000026a3,0x00000001,0x00050051, |
| 2772 | 0x00000001,0x000500c7,0x00000006,0x0000227a, | 3158 | 0x00000006,0x000026a5,0x000026a3,0x00000000, |
| 2773 | 0x000020ab,0x000005fb,0x000500c4,0x00000006, | 3159 | 0x00050080,0x00000006,0x000026aa,0x0000250c, |
| 2774 | 0x0000227d,0x0000227a,0x0000023b,0x000500c5, | 3160 | 0x000026a4,0x00050050,0x00000007,0x000026ab, |
| 2775 | 0x00000006,0x0000227e,0x0000227a,0x0000227d, | 3161 | 0x000026a5,0x000026aa,0x0004007c,0x00000014, |
| 2776 | 0x000500c7,0x00000006,0x0000227f,0x0000227e, | 3162 | 0x0000269b,0x000026ab,0x00060041,0x000000db, |
| 2777 | 0x00000602,0x000500c4,0x00000006,0x00002282, | 3163 | 0x00002693,0x0000269b,0x000000da,0x000000da, |
| 2778 | 0x0000227f,0x00000305,0x000500c5,0x00000006, | 3164 | 0x0005003e,0x00002693,0x000031ed,0x00000002, |
| 2779 | 0x00002283,0x0000227f,0x00002282,0x000500c7, | 3165 | 0x00000004,0x00050084,0x00000006,0x000026b0, |
| 2780 | 0x00000006,0x00002284,0x00002283,0x00000608, | 3166 | 0x0000010a,0x000024e5,0x00050080,0x00000006, |
| 2781 | 0x000500c4,0x00000006,0x00002287,0x00002284, | 3167 | 0x000026b1,0x00000107,0x000026b0,0x00050080, |
| 2782 | 0x00000212,0x000500c5,0x00000006,0x00002288, | 3168 | 0x00000006,0x000024a0,0x000026b1,0x00002497, |
| 2783 | 0x00002284,0x00002287,0x000500c7,0x00000006, | 3169 | 0x00050095,0x000000ab,0x000026c9,0x00002505, |
| 2784 | 0x00002289,0x00002288,0x0000060e,0x000500c4, | 3170 | 0x000024a0,0x00050051,0x00000006,0x000026ca, |
| 2785 | 0x00000006,0x0000228c,0x00002289,0x00000202, | 3171 | 0x000026c9,0x00000001,0x00050051,0x00000006, |
| 2786 | 0x000500c5,0x00000006,0x0000228d,0x00002289, | 3172 | 0x000026cb,0x000026c9,0x00000000,0x00050080, |
| 2787 | 0x0000228c,0x000500c7,0x00000006,0x0000228e, | 3173 | 0x00000006,0x000026d0,0x0000250c,0x000026ca, |
| 2788 | 0x0000228d,0x00000614,0x000500c4,0x00000006, | 3174 | 0x00050050,0x00000007,0x000026d1,0x000026cb, |
| 2789 | 0x000020ad,0x0000228e,0x00000151,0x000500c5, | 3175 | 0x000026d0,0x0004007c,0x00000014,0x000026c1, |
| 2790 | 0x00000006,0x000020ae,0x000020a9,0x000020ad, | 3176 | 0x000026d1,0x00060041,0x000000db,0x000026b9, |
| 2791 | 0x00050051,0x00000006,0x000020b0,0x000020a5, | 3177 | 0x000026c1,0x000000da,0x000000da,0x0005003e, |
| 2792 | 0x00000002,0x000500c7,0x00000006,0x00002293, | 3178 | 0x000026b9,0x00000b11,0x00000002,0x00000004, |
| 2793 | 0x000020b0,0x000005fb,0x000500c4,0x00000006, | 3179 | 0x000200f9,0x00000be4,0x000200f8,0x00000be8, |
| 2794 | 0x00002296,0x00002293,0x0000023b,0x000500c5, | 3180 | 0x000500aa,0x0000002f,0x00000beb,0x00000b13, |
| 2795 | 0x00000006,0x00002297,0x00002293,0x00002296, | 3181 | 0x00000246,0x000300f7,0x00000bed,0x00000000, |
| 2796 | 0x000500c7,0x00000006,0x00002298,0x00002297, | 3182 | 0x000400fa,0x00000beb,0x00000bec,0x00000bed, |
| 2797 | 0x00000602,0x000500c4,0x00000006,0x0000229b, | 3183 | 0x000200f8,0x00000bec,0x00050041,0x000000fe, |
| 2798 | 0x00002298,0x00000305,0x000500c5,0x00000006, | 3184 | 0x00002720,0x000000fc,0x00000308,0x0004003d, |
| 2799 | 0x0000229c,0x00002298,0x0000229b,0x000500c7, | 3185 | 0x00000006,0x00002721,0x00002720,0x00050080, |
| 2800 | 0x00000006,0x0000229d,0x0000229c,0x00000608, | 3186 | 0x00000006,0x00002723,0x00002721,0x00000b11, |
| 2801 | 0x000500c4,0x00000006,0x000022a0,0x0000229d, | 3187 | 0x00050041,0x000000fe,0x00002829,0x000000fc, |
| 2802 | 0x00000212,0x000500c5,0x00000006,0x000022a1, | 3188 | 0x0000023e,0x0004003d,0x00000006,0x0000282a, |
| 2803 | 0x0000229d,0x000022a0,0x000500c7,0x00000006, | 3189 | 0x00002829,0x00050084,0x00000006,0x0000282c, |
| 2804 | 0x000022a2,0x000022a1,0x0000060e,0x000500c4, | 3190 | 0x00002723,0x00000228,0x00050080,0x00000006, |
| 2805 | 0x00000006,0x000022a5,0x000022a2,0x00000202, | 3191 | 0x0000282d,0x0000282a,0x0000282c,0x000500c2, |
| 2806 | 0x000500c5,0x00000006,0x000022a6,0x000022a2, | 3192 | 0x00000006,0x0000282e,0x0000282d,0x00000233, |
| 2807 | 0x000022a5,0x000500c7,0x00000006,0x000022a7, | 3193 | 0x000500c4,0x00000006,0x0000282f,0x0000282e, |
| 2808 | 0x000022a6,0x00000614,0x000500c5,0x00000006, | 3194 | 0x0000020d,0x000500c5,0x00000006,0x00002830, |
| 2809 | 0x000020b2,0x000020ae,0x000022a7,0x000200f9, | 3195 | 0x0000282f,0x00000246,0x000200f9,0x0000272f, |
| 2810 | 0x000020b3,0x000200f8,0x000020b3,0x000700f5, | 3196 | 0x000200f8,0x0000272f,0x000700f5,0x0000004b, |
| 2811 | 0x00000006,0x00002ad1,0x0000052e,0x000021e9, | 3197 | 0x000031a2,0x000032a7,0x00000bec,0x0000328b, |
| 2812 | 0x000020b2,0x0000225b,0x00050084,0x00000006, | 3198 | 0x0000280b,0x000700f5,0x0000004b,0x000031a0, |
| 2813 | 0x000020b6,0x00000107,0x000009e9,0x00050080, | 3199 | 0x000032a5,0x00000bec,0x00003286,0x0000280b, |
| 2814 | 0x00000006,0x000020b7,0x00000104,0x000020b6, | 3200 | 0x000700f5,0x00000006,0x0000319d,0x000000a6, |
| 2815 | 0x00050095,0x000000a8,0x000022c2,0x00002124, | 3201 | 0x00000bec,0x0000280d,0x0000280b,0x000500b0, |
| 2816 | 0x000020b7,0x00050051,0x00000006,0x000022c3, | 3202 | 0x0000002f,0x00002732,0x0000319d,0x0000010a, |
| 2817 | 0x000022c2,0x00000001,0x00050051,0x00000006, | 3203 | 0x000400f6,0x0000280e,0x0000280b,0x00000000, |
| 2818 | 0x000022c4,0x000022c2,0x00000000,0x00050080, | 3204 | 0x000400fa,0x00002732,0x00002733,0x0000280e, |
| 2819 | 0x00000006,0x000022c9,0x0000212b,0x000022c3, | 3205 | 0x000200f8,0x00002733,0x00050084,0x00000006, |
| 2820 | 0x00050050,0x00000007,0x000022ca,0x000022c4, | 3206 | 0x00002735,0x0000010a,0x00000b11,0x00050080, |
| 2821 | 0x000022c9,0x0004007c,0x00000014,0x000022ba, | 3207 | 0x00000006,0x00002737,0x00002735,0x0000319d, |
| 2822 | 0x000022ca,0x00060041,0x000000d8,0x000022b2, | 3208 | 0x00050041,0x000000fe,0x0000273c,0x000000fc, |
| 2823 | 0x000022ba,0x000000d7,0x000000d7,0x0005003e, | 3209 | 0x0000027b,0x0004003d,0x00000006,0x0000273d, |
| 2824 | 0x000022b2,0x00002ad1,0x00000002,0x00000004, | 3210 | 0x0000273c,0x000500aa,0x0000002f,0x0000273e, |
| 2825 | 0x00050084,0x00000006,0x000022cf,0x00000107, | 3211 | 0x0000273d,0x000000b0,0x000300f7,0x000027d4, |
| 2826 | 0x00002104,0x00050080,0x00000006,0x000022d0, | 3212 | 0x00000000,0x000400fa,0x0000273e,0x0000273f, |
| 2827 | 0x00000104,0x000022cf,0x00050080,0x00000006, | 3213 | 0x00002784,0x000200f8,0x0000273f,0x00050084, |
| 2828 | 0x000020bf,0x000022d0,0x000020b6,0x00050095, | 3214 | 0x00000006,0x00002742,0x0000010a,0x0000319d, |
| 2829 | 0x000000a8,0x000022e8,0x00002124,0x000020bf, | 3215 | 0x00050080,0x00000006,0x00002743,0x0000282d, |
| 2830 | 0x00050051,0x00000006,0x000022e9,0x000022e8, | 3216 | 0x00002742,0x00050041,0x00000156,0x00002744, |
| 2831 | 0x00000001,0x00050051,0x00000006,0x000022ea, | 3217 | 0x000000fc,0x000000da,0x0004003d,0x00000007, |
| 2832 | 0x000022e8,0x00000000,0x00050080,0x00000006, | 3218 | 0x00002745,0x00002744,0x00050051,0x00000006, |
| 2833 | 0x000022ef,0x0000212b,0x000022e9,0x00050050, | 3219 | 0x00002847,0x00002745,0x00000000,0x00050095, |
| 2834 | 0x00000007,0x000022f0,0x000022ea,0x000022ef, | 3220 | 0x000000ab,0x00002849,0x00002847,0x00002743, |
| 2835 | 0x0004007c,0x00000014,0x000022e0,0x000022f0, | 3221 | 0x00050051,0x00000006,0x0000284a,0x00002849, |
| 2836 | 0x00060041,0x000000d8,0x000022d8,0x000022e0, | 3222 | 0x00000001,0x00050051,0x00000006,0x0000284b, |
| 2837 | 0x000000d7,0x000000d7,0x0005003e,0x000022d8, | 3223 | 0x00002849,0x00000000,0x00050051,0x00000006, |
| 2838 | 0x000009e9,0x00000002,0x00000004,0x000200f9, | 3224 | 0x0000284e,0x00002745,0x00000001,0x00050080, |
| 2839 | 0x00000a5f,0x000200f8,0x00000a63,0x000500aa, | 3225 | 0x00000006,0x00002850,0x0000284e,0x0000284a, |
| 2840 | 0x0000002f,0x00000a66,0x000009eb,0x00000243, | 3226 | 0x00050050,0x00000007,0x00002851,0x0000284b, |
| 2841 | 0x000300f7,0x00000a68,0x00000000,0x000400fa, | 3227 | 0x00002850,0x0004007c,0x00000014,0x00002841, |
| 2842 | 0x00000a66,0x00000a67,0x00000a68,0x000200f8, | 3228 | 0x00002851,0x00060041,0x000000db,0x00002838, |
| 2843 | 0x00000a67,0x00050041,0x000000fb,0x0000232f, | 3229 | 0x00002841,0x000000da,0x000000da,0x0006003d, |
| 2844 | 0x000000f9,0x00000305,0x0004003d,0x00000006, | 3230 | 0x00000006,0x00002839,0x00002838,0x00000002, |
| 2845 | 0x00002330,0x0000232f,0x00050080,0x00000006, | 3231 | 0x00000004,0x000500ab,0x0000002f,0x00002748, |
| 2846 | 0x00002332,0x00002330,0x000009e9,0x00050041, | 3232 | 0x00002839,0x00000380,0x000300f7,0x00002783, |
| 2847 | 0x000000fb,0x000023ee,0x000000f9,0x0000023b, | 3233 | 0x00000000,0x000400fa,0x00002748,0x00002749, |
| 2848 | 0x0004003d,0x00000006,0x000023ef,0x000023ee, | 3234 | 0x00002783,0x000200f8,0x00002749,0x000500c2, |
| 2849 | 0x00050084,0x00000006,0x000023f1,0x00002332, | 3235 | 0x00000006,0x00002855,0x00002839,0x0000020d, |
| 2850 | 0x00000225,0x00050080,0x00000006,0x000023f2, | 3236 | 0x00050084,0x00000006,0x0000274c,0x00002855, |
| 2851 | 0x000023ef,0x000023f1,0x000500c2,0x00000006, | 3237 | 0x00000107,0x000500c7,0x00000006,0x0000274e, |
| 2852 | 0x000023f3,0x000023f2,0x00000230,0x000500c4, | 3238 | 0x00002839,0x00000967,0x000500aa,0x0000002f, |
| 2853 | 0x00000006,0x000023f4,0x000023f3,0x0000020a, | 3239 | 0x0000274f,0x0000274e,0x00000246,0x000300f7, |
| 2854 | 0x000500c5,0x00000006,0x000023f5,0x000023f4, | 3240 | 0x00002776,0x00000000,0x000400fa,0x0000274f, |
| 2855 | 0x00000243,0x000200f9,0x0000233e,0x000200f8, | 3241 | 0x00002750,0x0000275c,0x000200f8,0x00002750, |
| 2856 | 0x0000233e,0x000700f5,0x0000004b,0x00002aaa, | 3242 | 0x00050041,0x000000fe,0x00002751,0x000000fc, |
| 2857 | 0x00002b66,0x00000a67,0x00002b57,0x000023d0, | 3243 | 0x0000096c,0x0004003d,0x00000006,0x00002752, |
| 2858 | 0x000700f5,0x0000004b,0x00002aa8,0x00002b64, | 3244 | 0x00002751,0x00050082,0x00000006,0x00002756, |
| 2859 | 0x00000a67,0x00002b55,0x000023d0,0x000700f5, | 3245 | 0x0000274c,0x0000282a,0x00050086,0x00000006, |
| 2860 | 0x00000006,0x00002aa5,0x000000a3,0x00000a67, | 3246 | 0x00002757,0x00002756,0x00000228,0x00050080, |
| 2861 | 0x000023d2,0x000023d0,0x000500b0,0x0000002f, | 3247 | 0x00000006,0x00002758,0x00002752,0x00002757, |
| 2862 | 0x00002341,0x00002aa5,0x00000107,0x000400f6, | 3248 | 0x00050041,0x000000fe,0x00002895,0x000000fc, |
| 2863 | 0x000023d3,0x000023d0,0x00000000,0x000400fa, | 3249 | 0x000000fd,0x0004003d,0x00000006,0x00002896, |
| 2864 | 0x00002341,0x00002342,0x000023d3,0x000200f8, | 3250 | 0x00002895,0x00050084,0x00000006,0x00002897, |
| 2865 | 0x00002342,0x00050084,0x00000006,0x00002344, | 3251 | 0x0000011f,0x00002896,0x00050080,0x00000006, |
| 2866 | 0x00000107,0x000009e9,0x00050080,0x00000006, | 3252 | 0x00002898,0x00000107,0x00002897,0x00050080, |
| 2867 | 0x00002346,0x00002344,0x00002aa5,0x00050041, | 3253 | 0x00000006,0x0000289e,0x00002896,0x000032a8, |
| 2868 | 0x000000fb,0x0000234c,0x000000f9,0x0000024d, | 3254 | 0x00050086,0x00000006,0x0000289f,0x0000289e, |
| 2869 | 0x0004003d,0x00000006,0x0000234d,0x0000234c, | 3255 | 0x00000101,0x00050084,0x00000006,0x00002891, |
| 2870 | 0x000500b0,0x0000002f,0x0000234e,0x00002346, | 3256 | 0x00000107,0x0000289f,0x00050080,0x00000006, |
| 2871 | 0x0000234d,0x000300f7,0x00002399,0x00000000, | 3257 | 0x00002892,0x00002898,0x00002891,0x00050084, |
| 2872 | 0x000400fa,0x0000234e,0x0000234f,0x00002399, | 3258 | 0x00000006,0x00002866,0x00000150,0x00002758, |
| 2873 | 0x000200f8,0x0000234f,0x00050041,0x000000fb, | 3259 | 0x00050080,0x00000006,0x00002867,0x00002892, |
| 2874 | 0x00002350,0x000000f9,0x00000263,0x0004003d, | 3260 | 0x00002866,0x00050041,0x00000156,0x00002868, |
| 2875 | 0x00000006,0x00002351,0x00002350,0x000500aa, | 3261 | 0x000000fc,0x00000154,0x0004003d,0x00000007, |
| 2876 | 0x0000002f,0x00002352,0x00002351,0x0000037d, | 3262 | 0x00002869,0x00002868,0x00050051,0x00000006, |
| 2877 | 0x000300f7,0x0000237e,0x00000000,0x000400fa, | 3263 | 0x000028b6,0x00002869,0x00000000,0x00050095, |
| 2878 | 0x00002352,0x00002353,0x00002370,0x000200f8, | 3264 | 0x000000ab,0x000028b8,0x000028b6,0x00002867, |
| 2879 | 0x00002353,0x00050041,0x000000fb,0x000023f8, | 3265 | 0x00050051,0x00000006,0x000028b9,0x000028b8, |
| 2880 | 0x000000f9,0x000000fa,0x0004003d,0x00000006, | 3266 | 0x00000001,0x00050051,0x00000006,0x000028ba, |
| 2881 | 0x000023f9,0x000023f8,0x00050084,0x00000006, | 3267 | 0x000028b8,0x00000000,0x00050051,0x00000006, |
| 2882 | 0x000023fa,0x00000107,0x000023f9,0x00050080, | 3268 | 0x000028bd,0x00002869,0x00000001,0x00050080, |
| 2883 | 0x00000006,0x000023fb,0x00000104,0x000023fa, | 3269 | 0x00000006,0x000028bf,0x000028bd,0x000028b9, |
| 2884 | 0x00050084,0x00000006,0x00002356,0x00000107, | 3270 | 0x00050050,0x00000007,0x000028c0,0x000028ba, |
| 2885 | 0x00002346,0x00050080,0x00000006,0x00002357, | 3271 | 0x000028bf,0x0004007c,0x00000014,0x000028b0, |
| 2886 | 0x000023fb,0x00002356,0x00050041,0x00000153, | 3272 | 0x000028c0,0x00060041,0x000000db,0x000028a7, |
| 2887 | 0x00002358,0x000000f9,0x00000151,0x0004003d, | 3273 | 0x000028b0,0x000000da,0x000000da,0x0006003d, |
| 2888 | 0x00000007,0x00002359,0x00002358,0x00050051, | 3274 | 0x00000006,0x000028a8,0x000028a7,0x00000002, |
| 2889 | 0x00000006,0x00002412,0x00002359,0x00000000, | 3275 | 0x00000004,0x0004007c,0x00000027,0x0000286c, |
| 2890 | 0x00050095,0x000000a8,0x00002414,0x00002412, | 3276 | 0x000028a8,0x00050080,0x00000006,0x0000286e, |
| 2891 | 0x00002357,0x00050051,0x00000006,0x00002415, | 3277 | 0x00002867,0x0000010a,0x00050095,0x000000ab, |
| 2892 | 0x00002414,0x00000001,0x00050051,0x00000006, | 3278 | 0x000028d9,0x000028b6,0x0000286e,0x00050051, |
| 2893 | 0x00002416,0x00002414,0x00000000,0x00050051, | 3279 | 0x00000006,0x000028da,0x000028d9,0x00000001, |
| 2894 | 0x00000006,0x00002419,0x00002359,0x00000001, | 3280 | 0x00050051,0x00000006,0x000028db,0x000028d9, |
| 2895 | 0x00050080,0x00000006,0x0000241b,0x00002419, | 3281 | 0x00000000,0x00050080,0x00000006,0x000028e0, |
| 2896 | 0x00002415,0x00050050,0x00000007,0x0000241c, | 3282 | 0x000028bd,0x000028da,0x00050050,0x00000007, |
| 2897 | 0x00002416,0x0000241b,0x0004007c,0x00000014, | 3283 | 0x000028e1,0x000028db,0x000028e0,0x0004007c, |
| 2898 | 0x0000240c,0x0000241c,0x00060041,0x000000d8, | 3284 | 0x00000014,0x000028d1,0x000028e1,0x00060041, |
| 2899 | 0x00002403,0x0000240c,0x000000d7,0x000000d7, | 3285 | 0x000000db,0x000028c8,0x000028d1,0x000000da, |
| 2900 | 0x0006003d,0x00000006,0x00002404,0x00002403, | 3286 | 0x000000da,0x0006003d,0x00000006,0x000028c9, |
| 2901 | 0x00000002,0x00000004,0x00050041,0x000000fb, | 3287 | 0x000028c8,0x00000002,0x00000004,0x0004007c, |
| 2902 | 0x0000241f,0x000000f9,0x00000229,0x0004003d, | 3288 | 0x00000027,0x00002872,0x000028c9,0x00050080, |
| 2903 | 0x00000006,0x00002420,0x0000241f,0x00050041, | 3289 | 0x00000006,0x00002874,0x00002867,0x00000111, |
| 2904 | 0x000000fb,0x0000242e,0x000000f9,0x00000221, | 3290 | 0x00050095,0x000000ab,0x000028fa,0x000028b6, |
| 2905 | 0x0004003d,0x00000006,0x0000242f,0x0000242e, | 3291 | 0x00002874,0x00050051,0x00000006,0x000028fb, |
| 2906 | 0x000500ab,0x0000002f,0x00002430,0x0000242f, | 3292 | 0x000028fa,0x00000001,0x00050051,0x00000006, |
| 2907 | 0x000000a3,0x000600a9,0x00000006,0x00002431, | 3293 | 0x000028fc,0x000028fa,0x00000000,0x00050080, |
| 2908 | 0x00002430,0x00000225,0x00000104,0x00050084, | 3294 | 0x00000006,0x00002901,0x000028bd,0x000028fb, |
| 2909 | 0x00000006,0x00002423,0x00002404,0x00002431, | 3295 | 0x00050050,0x00000007,0x00002902,0x000028fc, |
| 2910 | 0x00050080,0x00000006,0x00002424,0x00002420, | 3296 | 0x00002901,0x0004007c,0x00000014,0x000028f2, |
| 2911 | 0x00002423,0x000500c2,0x00000006,0x00002425, | 3297 | 0x00002902,0x00060041,0x000000db,0x000028e9, |
| 2912 | 0x00002424,0x00000230,0x000500c4,0x00000006, | 3298 | 0x000028f2,0x000000da,0x000000da,0x0006003d, |
| 2913 | 0x00002426,0x00002425,0x0000020a,0x000600a9, | 3299 | 0x00000006,0x000028ea,0x000028e9,0x00000002, |
| 2914 | 0x00000006,0x0000242a,0x00002430,0x00000236, | 3300 | 0x00000004,0x0004007c,0x00000027,0x00002878, |
| 2915 | 0x000000a3,0x000500c5,0x00000006,0x0000242b, | 3301 | 0x000028ea,0x00060050,0x0000004b,0x00002879, |
| 2916 | 0x00002426,0x0000242a,0x00050084,0x00000006, | 3302 | 0x0000286c,0x00002872,0x00002878,0x00050080, |
| 2917 | 0x00002473,0x0000011c,0x000023f9,0x00050080, | 3303 | 0x00000006,0x0000287b,0x00002867,0x00000118, |
| 2918 | 0x00000006,0x00002474,0x00000104,0x00002473, | 3304 | 0x00050095,0x000000ab,0x0000291b,0x000028b6, |
| 2919 | 0x00050080,0x00000006,0x0000247a,0x000023f9, | 3305 | 0x0000287b,0x00050051,0x00000006,0x0000291c, |
| 2920 | 0x00002b67,0x00050086,0x00000006,0x0000247b, | 3306 | 0x0000291b,0x00000001,0x00050051,0x00000006, |
| 2921 | 0x0000247a,0x000000fe,0x00050084,0x00000006, | 3307 | 0x0000291d,0x0000291b,0x00000000,0x00050080, |
| 2922 | 0x0000246d,0x00000104,0x0000247b,0x00050080, | 3308 | 0x00000006,0x00002922,0x000028bd,0x0000291c, |
| 2923 | 0x00000006,0x0000246e,0x00002474,0x0000246d, | 3309 | 0x00050050,0x00000007,0x00002923,0x0000291d, |
| 2924 | 0x00050084,0x00000006,0x00002442,0x0000014d, | 3310 | 0x00002922,0x0004007c,0x00000014,0x00002913, |
| 2925 | 0x00002404,0x00050080,0x00000006,0x00002443, | 3311 | 0x00002923,0x00060041,0x000000db,0x0000290a, |
| 2926 | 0x0000246e,0x00002442,0x00050095,0x000000a8, | 3312 | 0x00002913,0x000000da,0x000000da,0x0006003d, |
| 2927 | 0x00002494,0x00002412,0x00002443,0x00050051, | 3313 | 0x00000006,0x0000290b,0x0000290a,0x00000002, |
| 2928 | 0x00000006,0x00002495,0x00002494,0x00000001, | 3314 | 0x00000004,0x0004007c,0x00000027,0x0000287f, |
| 2929 | 0x00050051,0x00000006,0x00002496,0x00002494, | 3315 | 0x0000290b,0x00050080,0x00000006,0x00002881, |
| 2930 | 0x00000000,0x00050080,0x00000006,0x0000249b, | 3316 | 0x00002867,0x0000011f,0x00050095,0x000000ab, |
| 2931 | 0x00002419,0x00002495,0x00050050,0x00000007, | 3317 | 0x0000293c,0x000028b6,0x00002881,0x00050051, |
| 2932 | 0x0000249c,0x00002496,0x0000249b,0x0004007c, | 3318 | 0x00000006,0x0000293d,0x0000293c,0x00000001, |
| 2933 | 0x00000014,0x0000248c,0x0000249c,0x00060041, | 3319 | 0x00050051,0x00000006,0x0000293e,0x0000293c, |
| 2934 | 0x000000d8,0x00002483,0x0000248c,0x000000d7, | 3320 | 0x00000000,0x00050080,0x00000006,0x00002943, |
| 2935 | 0x000000d7,0x0006003d,0x00000006,0x00002484, | 3321 | 0x000028bd,0x0000293d,0x00050050,0x00000007, |
| 2936 | 0x00002483,0x00000002,0x00000004,0x0004007c, | 3322 | 0x00002944,0x0000293e,0x00002943,0x0004007c, |
| 2937 | 0x00000027,0x00002448,0x00002484,0x00050080, | 3323 | 0x00000014,0x00002934,0x00002944,0x00060041, |
| 2938 | 0x00000006,0x0000244a,0x00002443,0x00000107, | 3324 | 0x000000db,0x0000292b,0x00002934,0x000000da, |
| 2939 | 0x00050095,0x000000a8,0x000024b5,0x00002412, | 3325 | 0x000000da,0x0006003d,0x00000006,0x0000292c, |
| 2940 | 0x0000244a,0x00050051,0x00000006,0x000024b6, | 3326 | 0x0000292b,0x00000002,0x00000004,0x0004007c, |
| 2941 | 0x000024b5,0x00000001,0x00050051,0x00000006, | 3327 | 0x00000027,0x00002885,0x0000292c,0x00050080, |
| 2942 | 0x000024b7,0x000024b5,0x00000000,0x00050080, | 3328 | 0x00000006,0x00002887,0x00002867,0x00000189, |
| 2943 | 0x00000006,0x000024bc,0x00002419,0x000024b6, | 3329 | 0x00050095,0x000000ab,0x0000295d,0x000028b6, |
| 2944 | 0x00050050,0x00000007,0x000024bd,0x000024b7, | 3330 | 0x00002887,0x00050051,0x00000006,0x0000295e, |
| 2945 | 0x000024bc,0x0004007c,0x00000014,0x000024ad, | 3331 | 0x0000295d,0x00000001,0x00050051,0x00000006, |
| 2946 | 0x000024bd,0x00060041,0x000000d8,0x000024a4, | 3332 | 0x0000295f,0x0000295d,0x00000000,0x00050080, |
| 2947 | 0x000024ad,0x000000d7,0x000000d7,0x0006003d, | 3333 | 0x00000006,0x00002964,0x000028bd,0x0000295e, |
| 2948 | 0x00000006,0x000024a5,0x000024a4,0x00000002, | 3334 | 0x00050050,0x00000007,0x00002965,0x0000295f, |
| 2949 | 0x00000004,0x0004007c,0x00000027,0x0000244e, | 3335 | 0x00002964,0x0004007c,0x00000014,0x00002955, |
| 2950 | 0x000024a5,0x00050080,0x00000006,0x00002450, | 3336 | 0x00002965,0x00060041,0x000000db,0x0000294c, |
| 2951 | 0x00002443,0x0000010e,0x00050095,0x000000a8, | 3337 | 0x00002955,0x000000da,0x000000da,0x0006003d, |
| 2952 | 0x000024d6,0x00002412,0x00002450,0x00050051, | 3338 | 0x00000006,0x0000294d,0x0000294c,0x00000002, |
| 2953 | 0x00000006,0x000024d7,0x000024d6,0x00000001, | 3339 | 0x00000004,0x0004007c,0x00000027,0x0000288b, |
| 2954 | 0x00050051,0x00000006,0x000024d8,0x000024d6, | 3340 | 0x0000294d,0x00060050,0x0000004b,0x0000288c, |
| 2955 | 0x00000000,0x00050080,0x00000006,0x000024dd, | 3341 | 0x0000287f,0x00002885,0x0000288b,0x000200f9, |
| 2956 | 0x00002419,0x000024d7,0x00050050,0x00000007, | 3342 | 0x00002776,0x000200f8,0x0000275c,0x00050041, |
| 2957 | 0x000024de,0x000024d8,0x000024dd,0x0004007c, | 3343 | 0x000000fe,0x0000275e,0x000000fc,0x0000022c, |
| 2958 | 0x00000014,0x000024ce,0x000024de,0x00060041, | 3344 | 0x0004003d,0x00000006,0x0000275f,0x0000275e, |
| 2959 | 0x000000d8,0x000024c5,0x000024ce,0x000000d7, | 3345 | 0x00050082,0x00000006,0x00002760,0x0000274c, |
| 2960 | 0x000000d7,0x0006003d,0x00000006,0x000024c6, | 3346 | 0x0000275f,0x00050041,0x000000fe,0x00002968, |
| 2961 | 0x000024c5,0x00000002,0x00000004,0x0004007c, | 3347 | 0x000000fc,0x00000224,0x0004003d,0x00000006, |
| 2962 | 0x00000027,0x00002454,0x000024c6,0x00060050, | 3348 | 0x00002969,0x00002968,0x000500ab,0x0000002f, |
| 2963 | 0x0000004b,0x00002455,0x00002448,0x0000244e, | 3349 | 0x0000296a,0x00002969,0x000000a6,0x000600a9, |
| 2964 | 0x00002454,0x00050080,0x00000006,0x00002457, | 3350 | 0x00000006,0x0000296b,0x0000296a,0x00000228, |
| 2965 | 0x00002443,0x00000115,0x00050095,0x000000a8, | 3351 | 0x00000107,0x00050086,0x00000006,0x00002762, |
| 2966 | 0x000024f7,0x00002412,0x00002457,0x00050051, | 3352 | 0x00002760,0x0000296b,0x00050041,0x000000fe, |
| 2967 | 0x00000006,0x000024f8,0x000024f7,0x00000001, | 3353 | 0x000029ab,0x000000fc,0x000000fd,0x0004003d, |
| 2968 | 0x00050051,0x00000006,0x000024f9,0x000024f7, | 3354 | 0x00000006,0x000029ac,0x000029ab,0x00050084, |
| 2969 | 0x00000000,0x00050080,0x00000006,0x000024fe, | 3355 | 0x00000006,0x000029ad,0x0000011f,0x000029ac, |
| 2970 | 0x00002419,0x000024f8,0x00050050,0x00000007, | 3356 | 0x00050080,0x00000006,0x000029ae,0x00000107, |
| 2971 | 0x000024ff,0x000024f9,0x000024fe,0x0004007c, | 3357 | 0x000029ad,0x00050080,0x00000006,0x000029b4, |
| 2972 | 0x00000014,0x000024ef,0x000024ff,0x00060041, | 3358 | 0x000029ac,0x000032a8,0x00050086,0x00000006, |
| 2973 | 0x000000d8,0x000024e6,0x000024ef,0x000000d7, | 3359 | 0x000029b5,0x000029b4,0x00000101,0x00050084, |
| 2974 | 0x000000d7,0x0006003d,0x00000006,0x000024e7, | 3360 | 0x00000006,0x000029a7,0x00000107,0x000029b5, |
| 2975 | 0x000024e6,0x00000002,0x00000004,0x0004007c, | 3361 | 0x00050080,0x00000006,0x000029a8,0x000029ae, |
| 2976 | 0x00000027,0x0000245b,0x000024e7,0x00050080, | 3362 | 0x000029a7,0x00050084,0x00000006,0x0000297c, |
| 2977 | 0x00000006,0x0000245d,0x00002443,0x0000011c, | 3363 | 0x00000150,0x00002762,0x00050080,0x00000006, |
| 2978 | 0x00050095,0x000000a8,0x00002518,0x00002412, | 3364 | 0x0000297d,0x000029a8,0x0000297c,0x00050041, |
| 2979 | 0x0000245d,0x00050051,0x00000006,0x00002519, | 3365 | 0x00000156,0x0000297e,0x000000fc,0x00000154, |
| 2980 | 0x00002518,0x00000001,0x00050051,0x00000006, | 3366 | 0x0004003d,0x00000007,0x0000297f,0x0000297e, |
| 2981 | 0x0000251a,0x00002518,0x00000000,0x00050080, | 3367 | 0x00050051,0x00000006,0x000029cc,0x0000297f, |
| 2982 | 0x00000006,0x0000251f,0x00002419,0x00002519, | 3368 | 0x00000000,0x00050095,0x000000ab,0x000029ce, |
| 2983 | 0x00050050,0x00000007,0x00002520,0x0000251a, | 3369 | 0x000029cc,0x0000297d,0x00050051,0x00000006, |
| 2984 | 0x0000251f,0x0004007c,0x00000014,0x00002510, | 3370 | 0x000029cf,0x000029ce,0x00000001,0x00050051, |
| 2985 | 0x00002520,0x00060041,0x000000d8,0x00002507, | 3371 | 0x00000006,0x000029d0,0x000029ce,0x00000000, |
| 2986 | 0x00002510,0x000000d7,0x000000d7,0x0006003d, | 3372 | 0x00050051,0x00000006,0x000029d3,0x0000297f, |
| 2987 | 0x00000006,0x00002508,0x00002507,0x00000002, | 3373 | 0x00000001,0x00050080,0x00000006,0x000029d5, |
| 2988 | 0x00000004,0x0004007c,0x00000027,0x00002461, | 3374 | 0x000029d3,0x000029cf,0x00050050,0x00000007, |
| 2989 | 0x00002508,0x00050080,0x00000006,0x00002463, | 3375 | 0x000029d6,0x000029d0,0x000029d5,0x0004007c, |
| 2990 | 0x00002443,0x00000186,0x00050095,0x000000a8, | 3376 | 0x00000014,0x000029c6,0x000029d6,0x00060041, |
| 2991 | 0x00002539,0x00002412,0x00002463,0x00050051, | 3377 | 0x000000db,0x000029bd,0x000029c6,0x000000da, |
| 2992 | 0x00000006,0x0000253a,0x00002539,0x00000001, | 3378 | 0x000000da,0x0006003d,0x00000006,0x000029be, |
| 2993 | 0x00050051,0x00000006,0x0000253b,0x00002539, | 3379 | 0x000029bd,0x00000002,0x00000004,0x0004007c, |
| 2994 | 0x00000000,0x00050080,0x00000006,0x00002540, | 3380 | 0x00000027,0x00002982,0x000029be,0x00050080, |
| 2995 | 0x00002419,0x0000253a,0x00050050,0x00000007, | 3381 | 0x00000006,0x00002984,0x0000297d,0x0000010a, |
| 2996 | 0x00002541,0x0000253b,0x00002540,0x0004007c, | 3382 | 0x00050095,0x000000ab,0x000029ef,0x000029cc, |
| 2997 | 0x00000014,0x00002531,0x00002541,0x00060041, | 3383 | 0x00002984,0x00050051,0x00000006,0x000029f0, |
| 2998 | 0x000000d8,0x00002528,0x00002531,0x000000d7, | 3384 | 0x000029ef,0x00000001,0x00050051,0x00000006, |
| 2999 | 0x000000d7,0x0006003d,0x00000006,0x00002529, | 3385 | 0x000029f1,0x000029ef,0x00000000,0x00050080, |
| 3000 | 0x00002528,0x00000002,0x00000004,0x0004007c, | 3386 | 0x00000006,0x000029f6,0x000029d3,0x000029f0, |
| 3001 | 0x00000027,0x00002467,0x00002529,0x00060050, | 3387 | 0x00050050,0x00000007,0x000029f7,0x000029f1, |
| 3002 | 0x0000004b,0x00002468,0x0000245b,0x00002461, | 3388 | 0x000029f6,0x0004007c,0x00000014,0x000029e7, |
| 3003 | 0x00002467,0x000300f7,0x0000236f,0x00000000, | 3389 | 0x000029f7,0x00060041,0x000000db,0x000029de, |
| 3004 | 0x000400fa,0x00002430,0x00002364,0x0000236f, | 3390 | 0x000029e7,0x000000da,0x000000da,0x0006003d, |
| 3005 | 0x000200f8,0x00002364,0x00050084,0x00000006, | 3391 | 0x00000006,0x000029df,0x000029de,0x00000002, |
| 3006 | 0x00002368,0x00000225,0x00002404,0x00050080, | 3392 | 0x00000004,0x0004007c,0x00000027,0x00002988, |
| 3007 | 0x00000006,0x00002369,0x00002420,0x00002368, | 3393 | 0x000029df,0x00050080,0x00000006,0x0000298a, |
| 3008 | 0x00050080,0x00000006,0x0000236a,0x00002369, | 3394 | 0x0000297d,0x00000111,0x00050095,0x000000ab, |
| 3009 | 0x000005cd,0x00050041,0x00000153,0x0000236b, | 3395 | 0x00002a10,0x000029cc,0x0000298a,0x00050051, |
| 3010 | 0x000000f9,0x000000d7,0x0004003d,0x00000007, | 3396 | 0x00000006,0x00002a11,0x00002a10,0x00000001, |
| 3011 | 0x0000236c,0x0000236b,0x00050051,0x00000006, | 3397 | 0x00050051,0x00000006,0x00002a12,0x00002a10, |
| 3012 | 0x00002557,0x0000236c,0x00000000,0x00050095, | 3398 | 0x00000000,0x00050080,0x00000006,0x00002a17, |
| 3013 | 0x000000a8,0x00002559,0x00002557,0x0000236a, | 3399 | 0x000029d3,0x00002a11,0x00050050,0x00000007, |
| 3014 | 0x00050051,0x00000006,0x0000255a,0x00002559, | 3400 | 0x00002a18,0x00002a12,0x00002a17,0x0004007c, |
| 3015 | 0x00000001,0x00050051,0x00000006,0x0000255b, | 3401 | 0x00000014,0x00002a08,0x00002a18,0x00060041, |
| 3016 | 0x00002559,0x00000000,0x00050051,0x00000006, | 3402 | 0x000000db,0x000029ff,0x00002a08,0x000000da, |
| 3017 | 0x0000255e,0x0000236c,0x00000001,0x00050080, | 3403 | 0x000000da,0x0006003d,0x00000006,0x00002a00, |
| 3018 | 0x00000006,0x00002560,0x0000255e,0x0000255a, | 3404 | 0x000029ff,0x00000002,0x00000004,0x0004007c, |
| 3019 | 0x00050050,0x00000007,0x00002561,0x0000255b, | 3405 | 0x00000027,0x0000298e,0x00002a00,0x00060050, |
| 3020 | 0x00002560,0x0004007c,0x00000014,0x00002551, | 3406 | 0x0000004b,0x0000298f,0x00002982,0x00002988, |
| 3021 | 0x00002561,0x00060041,0x000000d8,0x00002549, | 3407 | 0x0000298e,0x00050080,0x00000006,0x00002991, |
| 3022 | 0x00002551,0x000000d7,0x000000d7,0x0005003e, | 3408 | 0x0000297d,0x00000118,0x00050095,0x000000ab, |
| 3023 | 0x00002549,0x000023f5,0x00000002,0x00000004, | 3409 | 0x00002a31,0x000029cc,0x00002991,0x00050051, |
| 3024 | 0x000200f9,0x0000236f,0x000200f8,0x0000236f, | 3410 | 0x00000006,0x00002a32,0x00002a31,0x00000001, |
| 3025 | 0x000200f9,0x0000237e,0x000200f8,0x00002370, | 3411 | 0x00050051,0x00000006,0x00002a33,0x00002a31, |
| 3026 | 0x00050080,0x00000006,0x00002374,0x00002351, | 3412 | 0x00000000,0x00050080,0x00000006,0x00002a38, |
| 3027 | 0x00002346,0x00050084,0x00000006,0x00002567, | 3413 | 0x000029d3,0x00002a32,0x00050050,0x00000007, |
| 3028 | 0x00002374,0x00000225,0x00050080,0x00000006, | 3414 | 0x00002a39,0x00002a33,0x00002a38,0x0004007c, |
| 3029 | 0x00002568,0x000023ef,0x00002567,0x000500c2, | 3415 | 0x00000014,0x00002a29,0x00002a39,0x00060041, |
| 3030 | 0x00000006,0x00002569,0x00002568,0x00000230, | 3416 | 0x000000db,0x00002a20,0x00002a29,0x000000da, |
| 3031 | 0x000500c4,0x00000006,0x0000256a,0x00002569, | 3417 | 0x000000da,0x0006003d,0x00000006,0x00002a21, |
| 3032 | 0x0000020a,0x000500c5,0x00000006,0x0000256b, | 3418 | 0x00002a20,0x00000002,0x00000004,0x0004007c, |
| 3033 | 0x0000256a,0x00000243,0x00050041,0x000000fb, | 3419 | 0x00000027,0x00002995,0x00002a21,0x00050080, |
| 3034 | 0x00002377,0x000000f9,0x000008bc,0x0004003d, | 3420 | 0x00000006,0x00002997,0x0000297d,0x0000011f, |
| 3035 | 0x00000006,0x00002378,0x00002377,0x00050080, | 3421 | 0x00050095,0x000000ab,0x00002a52,0x000029cc, |
| 3036 | 0x00000006,0x0000237a,0x00002378,0x00002374, | 3422 | 0x00002997,0x00050051,0x00000006,0x00002a53, |
| 3037 | 0x00050041,0x000000fb,0x000025ab,0x000000f9, | 3423 | 0x00002a52,0x00000001,0x00050051,0x00000006, |
| 3038 | 0x000000fa,0x0004003d,0x00000006,0x000025ac, | 3424 | 0x00002a54,0x00002a52,0x00000000,0x00050080, |
| 3039 | 0x000025ab,0x00050084,0x00000006,0x000025ad, | 3425 | 0x00000006,0x00002a59,0x000029d3,0x00002a53, |
| 3040 | 0x0000011c,0x000025ac,0x00050080,0x00000006, | 3426 | 0x00050050,0x00000007,0x00002a5a,0x00002a54, |
| 3041 | 0x000025ae,0x00000104,0x000025ad,0x00050080, | 3427 | 0x00002a59,0x0004007c,0x00000014,0x00002a4a, |
| 3042 | 0x00000006,0x000025b4,0x000025ac,0x00002b67, | 3428 | 0x00002a5a,0x00060041,0x000000db,0x00002a41, |
| 3043 | 0x00050086,0x00000006,0x000025b5,0x000025b4, | 3429 | 0x00002a4a,0x000000da,0x000000da,0x0006003d, |
| 3044 | 0x000000fe,0x00050084,0x00000006,0x000025a7, | 3430 | 0x00000006,0x00002a42,0x00002a41,0x00000002, |
| 3045 | 0x00000104,0x000025b5,0x00050080,0x00000006, | 3431 | 0x00000004,0x0004007c,0x00000027,0x0000299b, |
| 3046 | 0x000025a8,0x000025ae,0x000025a7,0x00050084, | 3432 | 0x00002a42,0x00050080,0x00000006,0x0000299d, |
| 3047 | 0x00000006,0x0000257c,0x0000014d,0x0000237a, | 3433 | 0x0000297d,0x00000189,0x00050095,0x000000ab, |
| 3048 | 0x00050080,0x00000006,0x0000257d,0x000025a8, | 3434 | 0x00002a73,0x000029cc,0x0000299d,0x00050051, |
| 3049 | 0x0000257c,0x00050041,0x00000153,0x0000257e, | 3435 | 0x00000006,0x00002a74,0x00002a73,0x00000001, |
| 3050 | 0x000000f9,0x00000151,0x0004003d,0x00000007, | 3436 | 0x00050051,0x00000006,0x00002a75,0x00002a73, |
| 3051 | 0x0000257f,0x0000257e,0x00050051,0x00000006, | 3437 | 0x00000000,0x00050080,0x00000006,0x00002a7a, |
| 3052 | 0x000025cc,0x0000257f,0x00000000,0x00050095, | 3438 | 0x000029d3,0x00002a74,0x00050050,0x00000007, |
| 3053 | 0x000000a8,0x000025ce,0x000025cc,0x0000257d, | 3439 | 0x00002a7b,0x00002a75,0x00002a7a,0x0004007c, |
| 3054 | 0x00050051,0x00000006,0x000025cf,0x000025ce, | 3440 | 0x00000014,0x00002a6b,0x00002a7b,0x00060041, |
| 3055 | 0x00000001,0x00050051,0x00000006,0x000025d0, | 3441 | 0x000000db,0x00002a62,0x00002a6b,0x000000da, |
| 3056 | 0x000025ce,0x00000000,0x00050051,0x00000006, | 3442 | 0x000000da,0x0006003d,0x00000006,0x00002a63, |
| 3057 | 0x000025d3,0x0000257f,0x00000001,0x00050080, | 3443 | 0x00002a62,0x00000002,0x00000004,0x0004007c, |
| 3058 | 0x00000006,0x000025d5,0x000025d3,0x000025cf, | 3444 | 0x00000027,0x000029a1,0x00002a63,0x00060050, |
| 3059 | 0x00050050,0x00000007,0x000025d6,0x000025d0, | 3445 | 0x0000004b,0x000029a2,0x00002995,0x0000299b, |
| 3060 | 0x000025d5,0x0004007c,0x00000014,0x000025c6, | 3446 | 0x000029a1,0x000300f7,0x00002775,0x00000000, |
| 3061 | 0x000025d6,0x00060041,0x000000d8,0x000025bd, | 3447 | 0x000400fa,0x0000296a,0x0000276a,0x00002775, |
| 3062 | 0x000025c6,0x000000d7,0x000000d7,0x0006003d, | 3448 | 0x000200f8,0x0000276a,0x00050084,0x00000006, |
| 3063 | 0x00000006,0x000025be,0x000025bd,0x00000002, | 3449 | 0x0000276e,0x00000228,0x00002762,0x00050080, |
| 3064 | 0x00000004,0x0004007c,0x00000027,0x00002582, | 3450 | 0x00000006,0x0000276f,0x0000275f,0x0000276e, |
| 3065 | 0x000025be,0x00050080,0x00000006,0x00002584, | 3451 | 0x00050080,0x00000006,0x00002770,0x0000276f, |
| 3066 | 0x0000257d,0x00000107,0x00050095,0x000000a8, | 3452 | 0x000005d0,0x00050095,0x000000ab,0x00002a93, |
| 3067 | 0x000025ef,0x000025cc,0x00002584,0x00050051, | 3453 | 0x00002847,0x00002770,0x00050051,0x00000006, |
| 3068 | 0x00000006,0x000025f0,0x000025ef,0x00000001, | 3454 | 0x00002a94,0x00002a93,0x00000001,0x00050051, |
| 3069 | 0x00050051,0x00000006,0x000025f1,0x000025ef, | 3455 | 0x00000006,0x00002a95,0x00002a93,0x00000000, |
| 3070 | 0x00000000,0x00050080,0x00000006,0x000025f6, | 3456 | 0x00050080,0x00000006,0x00002a9a,0x0000284e, |
| 3071 | 0x000025d3,0x000025f0,0x00050050,0x00000007, | 3457 | 0x00002a94,0x00050050,0x00000007,0x00002a9b, |
| 3072 | 0x000025f7,0x000025f1,0x000025f6,0x0004007c, | 3458 | 0x00002a95,0x00002a9a,0x0004007c,0x00000014, |
| 3073 | 0x00000014,0x000025e7,0x000025f7,0x00060041, | 3459 | 0x00002a8b,0x00002a9b,0x00060041,0x000000db, |
| 3074 | 0x000000d8,0x000025de,0x000025e7,0x000000d7, | 3460 | 0x00002a83,0x00002a8b,0x000000da,0x000000da, |
| 3075 | 0x000000d7,0x0006003d,0x00000006,0x000025df, | 3461 | 0x0005003e,0x00002a83,0x00002830,0x00000002, |
| 3076 | 0x000025de,0x00000002,0x00000004,0x0004007c, | 3462 | 0x00000004,0x000200f9,0x00002775,0x000200f8, |
| 3077 | 0x00000027,0x00002588,0x000025df,0x00050080, | 3463 | 0x00002775,0x000200f9,0x00002776,0x000200f8, |
| 3078 | 0x00000006,0x0000258a,0x0000257d,0x0000010e, | 3464 | 0x00002776,0x000700f5,0x0000004b,0x000031b7, |
| 3079 | 0x00050095,0x000000a8,0x00002610,0x000025cc, | 3465 | 0x0000288c,0x00002750,0x000029a2,0x00002775, |
| 3080 | 0x0000258a,0x00050051,0x00000006,0x00002611, | 3466 | 0x000700f5,0x0000004b,0x000031b5,0x00002879, |
| 3081 | 0x00002610,0x00000001,0x00050051,0x00000006, | 3467 | 0x00002750,0x0000298f,0x00002775,0x00050051, |
| 3082 | 0x00002612,0x00002610,0x00000000,0x00050080, | 3468 | 0x00000027,0x00002a9f,0x000031b5,0x00000000, |
| 3083 | 0x00000006,0x00002617,0x000025d3,0x00002611, | 3469 | 0x00050051,0x00000027,0x00002aa1,0x000031b7, |
| 3084 | 0x00050050,0x00000007,0x00002618,0x00002612, | 3470 | 0x00000000,0x000500bc,0x0000002f,0x00002aa2, |
| 3085 | 0x00002617,0x0004007c,0x00000014,0x00002608, | 3471 | 0x00002a9f,0x00002aa1,0x000300f7,0x00002aa9, |
| 3086 | 0x00002618,0x00060041,0x000000d8,0x000025ff, | 3472 | 0x00000000,0x000400fa,0x00002aa2,0x00002aa3, |
| 3087 | 0x00002608,0x000000d7,0x000000d7,0x0006003d, | 3473 | 0x00002aa9,0x000200f8,0x00002aa3,0x00050051, |
| 3088 | 0x00000006,0x00002600,0x000025ff,0x00000002, | 3474 | 0x00000027,0x00002aa5,0x000031b5,0x00000001, |
| 3089 | 0x00000004,0x0004007c,0x00000027,0x0000258e, | 3475 | 0x00050051,0x00000027,0x00002aa7,0x000031b7, |
| 3090 | 0x00002600,0x00060050,0x0000004b,0x0000258f, | 3476 | 0x00000001,0x000500bc,0x0000002f,0x00002aa8, |
| 3091 | 0x00002582,0x00002588,0x0000258e,0x00050080, | 3477 | 0x00002aa5,0x00002aa7,0x000200f9,0x00002aa9, |
| 3092 | 0x00000006,0x00002591,0x0000257d,0x00000115, | 3478 | 0x000200f8,0x00002aa9,0x000700f5,0x0000002f, |
| 3093 | 0x00050095,0x000000a8,0x00002631,0x000025cc, | 3479 | 0x00002aaa,0x00002aa2,0x00002776,0x00002aa8, |
| 3094 | 0x00002591,0x00050051,0x00000006,0x00002632, | 3480 | 0x00002aa3,0x000300f7,0x00002ab1,0x00000000, |
| 3095 | 0x00002631,0x00000001,0x00050051,0x00000006, | 3481 | 0x000400fa,0x00002aaa,0x00002aab,0x00002ab1, |
| 3096 | 0x00002633,0x00002631,0x00000000,0x00050080, | 3482 | 0x000200f8,0x00002aab,0x00050051,0x00000027, |
| 3097 | 0x00000006,0x00002638,0x000025d3,0x00002632, | 3483 | 0x00002aad,0x000031b5,0x00000002,0x00050051, |
| 3098 | 0x00050050,0x00000007,0x00002639,0x00002633, | 3484 | 0x00000027,0x00002aaf,0x000031b7,0x00000002, |
| 3099 | 0x00002638,0x0004007c,0x00000014,0x00002629, | 3485 | 0x000500bc,0x0000002f,0x00002ab0,0x00002aad, |
| 3100 | 0x00002639,0x00060041,0x000000d8,0x00002620, | 3486 | 0x00002aaf,0x000200f9,0x00002ab1,0x000200f8, |
| 3101 | 0x00002629,0x000000d7,0x000000d7,0x0006003d, | 3487 | 0x00002ab1,0x000700f5,0x0000002f,0x00002ab2, |
| 3102 | 0x00000006,0x00002621,0x00002620,0x00000002, | 3488 | 0x00002aaa,0x00002aa9,0x00002ab0,0x00002aab, |
| 3103 | 0x00000004,0x0004007c,0x00000027,0x00002595, | 3489 | 0x000300f7,0x00002782,0x00000000,0x000400fa, |
| 3104 | 0x00002621,0x00050080,0x00000006,0x00002597, | 3490 | 0x00002ab2,0x0000277b,0x00002782,0x000200f8, |
| 3105 | 0x0000257d,0x0000011c,0x00050095,0x000000a8, | 3491 | 0x0000277b,0x0007000c,0x0000004b,0x0000277e, |
| 3106 | 0x00002652,0x000025cc,0x00002597,0x00050051, | 3492 | 0x00000001,0x00000025,0x000031a0,0x000031b5, |
| 3107 | 0x00000006,0x00002653,0x00002652,0x00000001, | 3493 | 0x0007000c,0x0000004b,0x00002781,0x00000001, |
| 3108 | 0x00050051,0x00000006,0x00002654,0x00002652, | 3494 | 0x00000028,0x000031a2,0x000031b7,0x000200f9, |
| 3109 | 0x00000000,0x00050080,0x00000006,0x00002659, | 3495 | 0x00002782,0x000200f8,0x00002782,0x000700f5, |
| 3110 | 0x000025d3,0x00002653,0x00050050,0x00000007, | 3496 | 0x0000004b,0x0000328d,0x000031a2,0x00002ab1, |
| 3111 | 0x0000265a,0x00002654,0x00002659,0x0004007c, | 3497 | 0x00002781,0x0000277b,0x000700f5,0x0000004b, |
| 3112 | 0x00000014,0x0000264a,0x0000265a,0x00060041, | 3498 | 0x00003288,0x000031a0,0x00002ab1,0x0000277e, |
| 3113 | 0x000000d8,0x00002641,0x0000264a,0x000000d7, | 3499 | 0x0000277b,0x000200f9,0x00002783,0x000200f8, |
| 3114 | 0x000000d7,0x0006003d,0x00000006,0x00002642, | 3500 | 0x00002783,0x000700f5,0x0000004b,0x0000328c, |
| 3115 | 0x00002641,0x00000002,0x00000004,0x0004007c, | 3501 | 0x000031a2,0x0000273f,0x0000328d,0x00002782, |
| 3116 | 0x00000027,0x0000259b,0x00002642,0x00050080, | 3502 | 0x000700f5,0x0000004b,0x00003287,0x000031a0, |
| 3117 | 0x00000006,0x0000259d,0x0000257d,0x00000186, | 3503 | 0x0000273f,0x00003288,0x00002782,0x000700f5, |
| 3118 | 0x00050095,0x000000a8,0x00002673,0x000025cc, | 3504 | 0x0000004b,0x000031e3,0x000032a7,0x0000273f, |
| 3119 | 0x0000259d,0x00050051,0x00000006,0x00002674, | 3505 | 0x000031b7,0x00002782,0x000700f5,0x0000004b, |
| 3120 | 0x00002673,0x00000001,0x00050051,0x00000006, | 3506 | 0x000031de,0x000032a5,0x0000273f,0x000031b5, |
| 3121 | 0x00002675,0x00002673,0x00000000,0x00050080, | 3507 | 0x00002782,0x000200f9,0x000027d4,0x000200f8, |
| 3122 | 0x00000006,0x0000267a,0x000025d3,0x00002674, | 3508 | 0x00002784,0x00050041,0x000000fe,0x00002786, |
| 3123 | 0x00050050,0x00000007,0x0000267b,0x00002675, | 3509 | 0x000000fc,0x00000250,0x0004003d,0x00000006, |
| 3124 | 0x0000267a,0x0004007c,0x00000014,0x0000266b, | 3510 | 0x00002787,0x00002786,0x000500b0,0x0000002f, |
| 3125 | 0x0000267b,0x00060041,0x000000d8,0x00002662, | 3511 | 0x00002788,0x00002737,0x00002787,0x000300f7, |
| 3126 | 0x0000266b,0x000000d7,0x000000d7,0x0006003d, | 3512 | 0x000027d3,0x00000000,0x000400fa,0x00002788, |
| 3127 | 0x00000006,0x00002663,0x00002662,0x00000002, | 3513 | 0x00002789,0x000027d3,0x000200f8,0x00002789, |
| 3128 | 0x00000004,0x0004007c,0x00000027,0x000025a1, | 3514 | 0x00050041,0x000000fe,0x0000278a,0x000000fc, |
| 3129 | 0x00002663,0x00060050,0x0000004b,0x000025a2, | 3515 | 0x00000266,0x0004003d,0x00000006,0x0000278b, |
| 3130 | 0x00002595,0x0000259b,0x000025a1,0x000200f9, | 3516 | 0x0000278a,0x000500aa,0x0000002f,0x0000278c, |
| 3131 | 0x0000237e,0x000200f8,0x0000237e,0x000700f5, | 3517 | 0x0000278b,0x00000380,0x000300f7,0x000027b8, |
| 3132 | 0x0000004b,0x00002aaf,0x00002468,0x0000236f, | 3518 | 0x00000000,0x000400fa,0x0000278c,0x0000278d, |
| 3133 | 0x000025a2,0x00002370,0x000700f5,0x0000004b, | 3519 | 0x000027aa,0x000200f8,0x0000278d,0x00050041, |
| 3134 | 0x00002aad,0x00002455,0x0000236f,0x0000258f, | 3520 | 0x000000fe,0x00002ab6,0x000000fc,0x000000fd, |
| 3135 | 0x00002370,0x000700f5,0x00000006,0x00002aab, | 3521 | 0x0004003d,0x00000006,0x00002ab7,0x00002ab6, |
| 3136 | 0x0000242b,0x0000236f,0x0000256b,0x00002370, | 3522 | 0x00050084,0x00000006,0x00002ab8,0x0000010a, |
| 3137 | 0x00050041,0x000000fb,0x0000237f,0x000000f9, | 3523 | 0x00002ab7,0x00050080,0x00000006,0x00002ab9, |
| 3138 | 0x000008c7,0x0004003d,0x00000006,0x00002380, | 3524 | 0x00000107,0x00002ab8,0x00050084,0x00000006, |
| 3139 | 0x0000237f,0x000500c2,0x00000006,0x0000267f, | 3525 | 0x00002790,0x0000010a,0x00002737,0x00050080, |
| 3140 | 0x00002aab,0x0000020a,0x00050041,0x000000fb, | 3526 | 0x00000006,0x00002791,0x00002ab9,0x00002790, |
| 3141 | 0x00002383,0x000000f9,0x00000229,0x0004003d, | 3527 | 0x00050041,0x00000156,0x00002792,0x000000fc, |
| 3142 | 0x00000006,0x00002384,0x00002383,0x00050086, | 3528 | 0x00000154,0x0004003d,0x00000007,0x00002793, |
| 3143 | 0x00000006,0x00002385,0x00002384,0x00000104, | 3529 | 0x00002792,0x00050051,0x00000006,0x00002ad0, |
| 3144 | 0x00050082,0x00000006,0x00002386,0x0000267f, | 3530 | 0x00002793,0x00000000,0x00050095,0x000000ab, |
| 3145 | 0x00002385,0x00050084,0x00000006,0x00002387, | 3531 | 0x00002ad2,0x00002ad0,0x00002791,0x00050051, |
| 3146 | 0x00000107,0x00002386,0x00050080,0x00000006, | 3532 | 0x00000006,0x00002ad3,0x00002ad2,0x00000001, |
| 3147 | 0x00002388,0x00002380,0x00002387,0x00050041, | 3533 | 0x00050051,0x00000006,0x00002ad4,0x00002ad2, |
| 3148 | 0x00000153,0x00002389,0x000000f9,0x000000d7, | 3534 | 0x00000000,0x00050051,0x00000006,0x00002ad7, |
| 3149 | 0x0004003d,0x00000007,0x0000238a,0x00002389, | 3535 | 0x00002793,0x00000001,0x00050080,0x00000006, |
| 3150 | 0x00050051,0x00000006,0x00002695,0x0000238a, | 3536 | 0x00002ad9,0x00002ad7,0x00002ad3,0x00050050, |
| 3151 | 0x00000000,0x00050095,0x000000a8,0x00002697, | 3537 | 0x00000007,0x00002ada,0x00002ad4,0x00002ad9, |
| 3152 | 0x00002695,0x00002388,0x00050051,0x00000006, | 3538 | 0x0004007c,0x00000014,0x00002aca,0x00002ada, |
| 3153 | 0x00002698,0x00002697,0x00000001,0x00050051, | 3539 | 0x00060041,0x000000db,0x00002ac1,0x00002aca, |
| 3154 | 0x00000006,0x00002699,0x00002697,0x00000000, | 3540 | 0x000000da,0x000000da,0x0006003d,0x00000006, |
| 3155 | 0x00050051,0x00000006,0x0000269c,0x0000238a, | 3541 | 0x00002ac2,0x00002ac1,0x00000002,0x00000004, |
| 3156 | 0x00000001,0x00050080,0x00000006,0x0000269e, | 3542 | 0x00050041,0x000000fe,0x00002add,0x000000fc, |
| 3157 | 0x0000269c,0x00002698,0x00050050,0x00000007, | 3543 | 0x0000022c,0x0004003d,0x00000006,0x00002ade, |
| 3158 | 0x0000269f,0x00002699,0x0000269e,0x0004007c, | 3544 | 0x00002add,0x00050041,0x000000fe,0x00002aec, |
| 3159 | 0x00000014,0x0000268f,0x0000269f,0x00060041, | 3545 | 0x000000fc,0x00000224,0x0004003d,0x00000006, |
| 3160 | 0x000000d8,0x00002687,0x0000268f,0x000000d7, | 3546 | 0x00002aed,0x00002aec,0x000500ab,0x0000002f, |
| 3161 | 0x000000d7,0x0005003e,0x00002687,0x000023f5, | 3547 | 0x00002aee,0x00002aed,0x000000a6,0x000600a9, |
| 3162 | 0x00000002,0x00000004,0x00050051,0x00000027, | 3548 | 0x00000006,0x00002aef,0x00002aee,0x00000228, |
| 3163 | 0x000026a3,0x00002aad,0x00000000,0x00050051, | 3549 | 0x00000107,0x00050084,0x00000006,0x00002ae1, |
| 3164 | 0x00000027,0x000026a5,0x00002aaf,0x00000000, | 3550 | 0x00002ac2,0x00002aef,0x00050080,0x00000006, |
| 3165 | 0x000500bc,0x0000002f,0x000026a6,0x000026a3, | 3551 | 0x00002ae2,0x00002ade,0x00002ae1,0x000500c2, |
| 3166 | 0x000026a5,0x000300f7,0x000026ad,0x00000000, | 3552 | 0x00000006,0x00002ae3,0x00002ae2,0x00000233, |
| 3167 | 0x000400fa,0x000026a6,0x000026a7,0x000026ad, | 3553 | 0x000500c4,0x00000006,0x00002ae4,0x00002ae3, |
| 3168 | 0x000200f8,0x000026a7,0x00050051,0x00000027, | 3554 | 0x0000020d,0x000600a9,0x00000006,0x00002ae8, |
| 3169 | 0x000026a9,0x00002aad,0x00000001,0x00050051, | 3555 | 0x00002aee,0x00000239,0x000000a6,0x000500c5, |
| 3170 | 0x00000027,0x000026ab,0x00002aaf,0x00000001, | 3556 | 0x00000006,0x00002ae9,0x00002ae4,0x00002ae8, |
| 3171 | 0x000500bc,0x0000002f,0x000026ac,0x000026a9, | 3557 | 0x00050084,0x00000006,0x00002b31,0x0000011f, |
| 3172 | 0x000026ab,0x000200f9,0x000026ad,0x000200f8, | 3558 | 0x00002ab7,0x00050080,0x00000006,0x00002b32, |
| 3173 | 0x000026ad,0x000700f5,0x0000002f,0x000026ae, | 3559 | 0x00000107,0x00002b31,0x00050080,0x00000006, |
| 3174 | 0x000026a6,0x0000237e,0x000026ac,0x000026a7, | 3560 | 0x00002b38,0x00002ab7,0x000032a8,0x00050086, |
| 3175 | 0x000300f7,0x000026b5,0x00000000,0x000400fa, | 3561 | 0x00000006,0x00002b39,0x00002b38,0x00000101, |
| 3176 | 0x000026ae,0x000026af,0x000026b5,0x000200f8, | 3562 | 0x00050084,0x00000006,0x00002b2b,0x00000107, |
| 3177 | 0x000026af,0x00050051,0x00000027,0x000026b1, | 3563 | 0x00002b39,0x00050080,0x00000006,0x00002b2c, |
| 3178 | 0x00002aad,0x00000002,0x00050051,0x00000027, | 3564 | 0x00002b32,0x00002b2b,0x00050084,0x00000006, |
| 3179 | 0x000026b3,0x00002aaf,0x00000002,0x000500bc, | 3565 | 0x00002b00,0x00000150,0x00002ac2,0x00050080, |
| 3180 | 0x0000002f,0x000026b4,0x000026b1,0x000026b3, | 3566 | 0x00000006,0x00002b01,0x00002b2c,0x00002b00, |
| 3181 | 0x000200f9,0x000026b5,0x000200f8,0x000026b5, | 3567 | 0x00050095,0x000000ab,0x00002b52,0x00002ad0, |
| 3182 | 0x000700f5,0x0000002f,0x000026b6,0x000026ae, | 3568 | 0x00002b01,0x00050051,0x00000006,0x00002b53, |
| 3183 | 0x000026ad,0x000026b4,0x000026af,0x000300f7, | 3569 | 0x00002b52,0x00000001,0x00050051,0x00000006, |
| 3184 | 0x00002398,0x00000000,0x000400fa,0x000026b6, | 3570 | 0x00002b54,0x00002b52,0x00000000,0x00050080, |
| 3185 | 0x00002391,0x00002398,0x000200f8,0x00002391, | 3571 | 0x00000006,0x00002b59,0x00002ad7,0x00002b53, |
| 3186 | 0x0007000c,0x0000004b,0x00002394,0x00000001, | 3572 | 0x00050050,0x00000007,0x00002b5a,0x00002b54, |
| 3187 | 0x00000025,0x00002aa8,0x00002aad,0x0007000c, | 3573 | 0x00002b59,0x0004007c,0x00000014,0x00002b4a, |
| 3188 | 0x0000004b,0x00002397,0x00000001,0x00000028, | 3574 | 0x00002b5a,0x00060041,0x000000db,0x00002b41, |
| 3189 | 0x00002aaa,0x00002aaf,0x000200f9,0x00002398, | 3575 | 0x00002b4a,0x000000da,0x000000da,0x0006003d, |
| 3190 | 0x000200f8,0x00002398,0x000700f5,0x0000004b, | 3576 | 0x00000006,0x00002b42,0x00002b41,0x00000002, |
| 3191 | 0x00002b58,0x00002aaa,0x000026b5,0x00002397, | 3577 | 0x00000004,0x0004007c,0x00000027,0x00002b06, |
| 3192 | 0x00002391,0x000700f5,0x0000004b,0x00002b56, | 3578 | 0x00002b42,0x00050080,0x00000006,0x00002b08, |
| 3193 | 0x00002aa8,0x000026b5,0x00002394,0x00002391, | 3579 | 0x00002b01,0x0000010a,0x00050095,0x000000ab, |
| 3194 | 0x000200f9,0x00002399,0x000200f8,0x00002399, | 3580 | 0x00002b73,0x00002ad0,0x00002b08,0x00050051, |
| 3195 | 0x000700f5,0x0000004b,0x00002b57,0x00002aaa, | 3581 | 0x00000006,0x00002b74,0x00002b73,0x00000001, |
| 3196 | 0x00002342,0x00002b58,0x00002398,0x000700f5, | 3582 | 0x00050051,0x00000006,0x00002b75,0x00002b73, |
| 3197 | 0x0000004b,0x00002b55,0x00002aa8,0x00002342, | 3583 | 0x00000000,0x00050080,0x00000006,0x00002b7a, |
| 3198 | 0x00002b56,0x00002398,0x000700f5,0x0000004b, | 3584 | 0x00002ad7,0x00002b74,0x00050050,0x00000007, |
| 3199 | 0x00002ac9,0x00002b66,0x00002342,0x00002aaf, | 3585 | 0x00002b7b,0x00002b75,0x00002b7a,0x0004007c, |
| 3200 | 0x00002398,0x000700f5,0x0000004b,0x00002ac7, | 3586 | 0x00000014,0x00002b6b,0x00002b7b,0x00060041, |
| 3201 | 0x00002b64,0x00002342,0x00002aad,0x00002398, | 3587 | 0x000000db,0x00002b62,0x00002b6b,0x000000da, |
| 3202 | 0x000700f5,0x00000006,0x00002ac3,0x0000037d, | 3588 | 0x000000da,0x0006003d,0x00000006,0x00002b63, |
| 3203 | 0x00002342,0x00002aab,0x00002398,0x00050084, | 3589 | 0x00002b62,0x00000002,0x00000004,0x0004007c, |
| 3204 | 0x00000006,0x0000239c,0x00000107,0x00002aa5, | 3590 | 0x00000027,0x00002b0c,0x00002b63,0x00050080, |
| 3205 | 0x00050080,0x00000006,0x0000239d,0x000023f2, | 3591 | 0x00000006,0x00002b0e,0x00002b01,0x00000111, |
| 3206 | 0x0000239c,0x00050041,0x00000153,0x0000239e, | 3592 | 0x00050095,0x000000ab,0x00002b94,0x00002ad0, |
| 3207 | 0x000000f9,0x000000d7,0x0004003d,0x00000007, | 3593 | 0x00002b0e,0x00050051,0x00000006,0x00002b95, |
| 3208 | 0x0000239f,0x0000239e,0x00050051,0x00000006, | 3594 | 0x00002b94,0x00000001,0x00050051,0x00000006, |
| 3209 | 0x000026cd,0x0000239f,0x00000000,0x00050095, | 3595 | 0x00002b96,0x00002b94,0x00000000,0x00050080, |
| 3210 | 0x000000a8,0x000026cf,0x000026cd,0x0000239d, | 3596 | 0x00000006,0x00002b9b,0x00002ad7,0x00002b95, |
| 3211 | 0x00050051,0x00000006,0x000026d0,0x000026cf, | 3597 | 0x00050050,0x00000007,0x00002b9c,0x00002b96, |
| 3212 | 0x00000001,0x00050051,0x00000006,0x000026d1, | 3598 | 0x00002b9b,0x0004007c,0x00000014,0x00002b8c, |
| 3213 | 0x000026cf,0x00000000,0x00050051,0x00000006, | 3599 | 0x00002b9c,0x00060041,0x000000db,0x00002b83, |
| 3214 | 0x000026d4,0x0000239f,0x00000001,0x00050080, | 3600 | 0x00002b8c,0x000000da,0x000000da,0x0006003d, |
| 3215 | 0x00000006,0x000026d6,0x000026d4,0x000026d0, | 3601 | 0x00000006,0x00002b84,0x00002b83,0x00000002, |
| 3216 | 0x00050050,0x00000007,0x000026d7,0x000026d1, | 3602 | 0x00000004,0x0004007c,0x00000027,0x00002b12, |
| 3217 | 0x000026d6,0x0004007c,0x00000014,0x000026c7, | 3603 | 0x00002b84,0x00060050,0x0000004b,0x00002b13, |
| 3218 | 0x000026d7,0x00060041,0x000000d8,0x000026bf, | 3604 | 0x00002b06,0x00002b0c,0x00002b12,0x00050080, |
| 3219 | 0x000026c7,0x000000d7,0x000000d7,0x0005003e, | 3605 | 0x00000006,0x00002b15,0x00002b01,0x00000118, |
| 3220 | 0x000026bf,0x00002ac3,0x00000002,0x00000004, | 3606 | 0x00050095,0x000000ab,0x00002bb5,0x00002ad0, |
| 3221 | 0x00050080,0x00000006,0x000023a3,0x000023f2, | 3607 | 0x00002b15,0x00050051,0x00000006,0x00002bb6, |
| 3222 | 0x0000011c,0x00050084,0x00000006,0x000023a5, | 3608 | 0x00002bb5,0x00000001,0x00050051,0x00000006, |
| 3223 | 0x0000014d,0x00002aa5,0x00050080,0x00000006, | 3609 | 0x00002bb7,0x00002bb5,0x00000000,0x00050080, |
| 3224 | 0x000023a6,0x000023a3,0x000023a5,0x00050051, | 3610 | 0x00000006,0x00002bbc,0x00002ad7,0x00002bb6, |
| 3225 | 0x00000027,0x000023ab,0x00002ac7,0x00000000, | 3611 | 0x00050050,0x00000007,0x00002bbd,0x00002bb7, |
| 3226 | 0x0004007c,0x00000006,0x000026dd,0x000023ab, | 3612 | 0x00002bbc,0x0004007c,0x00000014,0x00002bad, |
| 3227 | 0x00050095,0x000000a8,0x000026f8,0x000026cd, | 3613 | 0x00002bbd,0x00060041,0x000000db,0x00002ba4, |
| 3228 | 0x000023a6,0x00050051,0x00000006,0x000026f9, | 3614 | 0x00002bad,0x000000da,0x000000da,0x0006003d, |
| 3229 | 0x000026f8,0x00000001,0x00050051,0x00000006, | 3615 | 0x00000006,0x00002ba5,0x00002ba4,0x00000002, |
| 3230 | 0x000026fa,0x000026f8,0x00000000,0x00050080, | 3616 | 0x00000004,0x0004007c,0x00000027,0x00002b19, |
| 3231 | 0x00000006,0x000026ff,0x000026d4,0x000026f9, | 3617 | 0x00002ba5,0x00050080,0x00000006,0x00002b1b, |
| 3232 | 0x00050050,0x00000007,0x00002700,0x000026fa, | 3618 | 0x00002b01,0x0000011f,0x00050095,0x000000ab, |
| 3233 | 0x000026ff,0x0004007c,0x00000014,0x000026f0, | 3619 | 0x00002bd6,0x00002ad0,0x00002b1b,0x00050051, |
| 3234 | 0x00002700,0x00060041,0x000000d8,0x000026e8, | 3620 | 0x00000006,0x00002bd7,0x00002bd6,0x00000001, |
| 3235 | 0x000026f0,0x000000d7,0x000000d7,0x0005003e, | 3621 | 0x00050051,0x00000006,0x00002bd8,0x00002bd6, |
| 3236 | 0x000026e8,0x000026dd,0x00000002,0x00000004, | 3622 | 0x00000000,0x00050080,0x00000006,0x00002bdd, |
| 3237 | 0x00050080,0x00000006,0x000023ae,0x000023a6, | 3623 | 0x00002ad7,0x00002bd7,0x00050050,0x00000007, |
| 3238 | 0x00000107,0x00050051,0x00000027,0x000023b2, | 3624 | 0x00002bde,0x00002bd8,0x00002bdd,0x0004007c, |
| 3239 | 0x00002ac7,0x00000001,0x0004007c,0x00000006, | 3625 | 0x00000014,0x00002bce,0x00002bde,0x00060041, |
| 3240 | 0x00002706,0x000023b2,0x00050095,0x000000a8, | 3626 | 0x000000db,0x00002bc5,0x00002bce,0x000000da, |
| 3241 | 0x00002721,0x000026cd,0x000023ae,0x00050051, | 3627 | 0x000000da,0x0006003d,0x00000006,0x00002bc6, |
| 3242 | 0x00000006,0x00002722,0x00002721,0x00000001, | 3628 | 0x00002bc5,0x00000002,0x00000004,0x0004007c, |
| 3243 | 0x00050051,0x00000006,0x00002723,0x00002721, | 3629 | 0x00000027,0x00002b1f,0x00002bc6,0x00050080, |
| 3244 | 0x00000000,0x00050080,0x00000006,0x00002728, | 3630 | 0x00000006,0x00002b21,0x00002b01,0x00000189, |
| 3245 | 0x000026d4,0x00002722,0x00050050,0x00000007, | 3631 | 0x00050095,0x000000ab,0x00002bf7,0x00002ad0, |
| 3246 | 0x00002729,0x00002723,0x00002728,0x0004007c, | 3632 | 0x00002b21,0x00050051,0x00000006,0x00002bf8, |
| 3247 | 0x00000014,0x00002719,0x00002729,0x00060041, | 3633 | 0x00002bf7,0x00000001,0x00050051,0x00000006, |
| 3248 | 0x000000d8,0x00002711,0x00002719,0x000000d7, | 3634 | 0x00002bf9,0x00002bf7,0x00000000,0x00050080, |
| 3249 | 0x000000d7,0x0005003e,0x00002711,0x00002706, | 3635 | 0x00000006,0x00002bfe,0x00002ad7,0x00002bf8, |
| 3636 | 0x00050050,0x00000007,0x00002bff,0x00002bf9, | ||
| 3637 | 0x00002bfe,0x0004007c,0x00000014,0x00002bef, | ||
| 3638 | 0x00002bff,0x00060041,0x000000db,0x00002be6, | ||
| 3639 | 0x00002bef,0x000000da,0x000000da,0x0006003d, | ||
| 3640 | 0x00000006,0x00002be7,0x00002be6,0x00000002, | ||
| 3641 | 0x00000004,0x0004007c,0x00000027,0x00002b25, | ||
| 3642 | 0x00002be7,0x00060050,0x0000004b,0x00002b26, | ||
| 3643 | 0x00002b19,0x00002b1f,0x00002b25,0x000300f7, | ||
| 3644 | 0x000027a9,0x00000000,0x000400fa,0x00002aee, | ||
| 3645 | 0x0000279e,0x000027a9,0x000200f8,0x0000279e, | ||
| 3646 | 0x00050084,0x00000006,0x000027a2,0x00000228, | ||
| 3647 | 0x00002ac2,0x00050080,0x00000006,0x000027a3, | ||
| 3648 | 0x00002ade,0x000027a2,0x00050080,0x00000006, | ||
| 3649 | 0x000027a4,0x000027a3,0x000005d0,0x00050041, | ||
| 3650 | 0x00000156,0x000027a5,0x000000fc,0x000000da, | ||
| 3651 | 0x0004003d,0x00000007,0x000027a6,0x000027a5, | ||
| 3652 | 0x00050051,0x00000006,0x00002c15,0x000027a6, | ||
| 3653 | 0x00000000,0x00050095,0x000000ab,0x00002c17, | ||
| 3654 | 0x00002c15,0x000027a4,0x00050051,0x00000006, | ||
| 3655 | 0x00002c18,0x00002c17,0x00000001,0x00050051, | ||
| 3656 | 0x00000006,0x00002c19,0x00002c17,0x00000000, | ||
| 3657 | 0x00050051,0x00000006,0x00002c1c,0x000027a6, | ||
| 3658 | 0x00000001,0x00050080,0x00000006,0x00002c1e, | ||
| 3659 | 0x00002c1c,0x00002c18,0x00050050,0x00000007, | ||
| 3660 | 0x00002c1f,0x00002c19,0x00002c1e,0x0004007c, | ||
| 3661 | 0x00000014,0x00002c0f,0x00002c1f,0x00060041, | ||
| 3662 | 0x000000db,0x00002c07,0x00002c0f,0x000000da, | ||
| 3663 | 0x000000da,0x0005003e,0x00002c07,0x00002830, | ||
| 3664 | 0x00000002,0x00000004,0x000200f9,0x000027a9, | ||
| 3665 | 0x000200f8,0x000027a9,0x000200f9,0x000027b8, | ||
| 3666 | 0x000200f8,0x000027aa,0x00050080,0x00000006, | ||
| 3667 | 0x000027ae,0x0000278b,0x00002737,0x00050084, | ||
| 3668 | 0x00000006,0x00002c25,0x000027ae,0x00000228, | ||
| 3669 | 0x00050080,0x00000006,0x00002c26,0x0000282a, | ||
| 3670 | 0x00002c25,0x000500c2,0x00000006,0x00002c27, | ||
| 3671 | 0x00002c26,0x00000233,0x000500c4,0x00000006, | ||
| 3672 | 0x00002c28,0x00002c27,0x0000020d,0x000500c5, | ||
| 3673 | 0x00000006,0x00002c29,0x00002c28,0x00000246, | ||
| 3674 | 0x00050041,0x000000fe,0x000027b1,0x000000fc, | ||
| 3675 | 0x0000096c,0x0004003d,0x00000006,0x000027b2, | ||
| 3676 | 0x000027b1,0x00050080,0x00000006,0x000027b4, | ||
| 3677 | 0x000027b2,0x000027ae,0x00050041,0x000000fe, | ||
| 3678 | 0x00002c69,0x000000fc,0x000000fd,0x0004003d, | ||
| 3679 | 0x00000006,0x00002c6a,0x00002c69,0x00050084, | ||
| 3680 | 0x00000006,0x00002c6b,0x0000011f,0x00002c6a, | ||
| 3681 | 0x00050080,0x00000006,0x00002c6c,0x00000107, | ||
| 3682 | 0x00002c6b,0x00050080,0x00000006,0x00002c72, | ||
| 3683 | 0x00002c6a,0x000032a8,0x00050086,0x00000006, | ||
| 3684 | 0x00002c73,0x00002c72,0x00000101,0x00050084, | ||
| 3685 | 0x00000006,0x00002c65,0x00000107,0x00002c73, | ||
| 3686 | 0x00050080,0x00000006,0x00002c66,0x00002c6c, | ||
| 3687 | 0x00002c65,0x00050084,0x00000006,0x00002c3a, | ||
| 3688 | 0x00000150,0x000027b4,0x00050080,0x00000006, | ||
| 3689 | 0x00002c3b,0x00002c66,0x00002c3a,0x00050041, | ||
| 3690 | 0x00000156,0x00002c3c,0x000000fc,0x00000154, | ||
| 3691 | 0x0004003d,0x00000007,0x00002c3d,0x00002c3c, | ||
| 3692 | 0x00050051,0x00000006,0x00002c8a,0x00002c3d, | ||
| 3693 | 0x00000000,0x00050095,0x000000ab,0x00002c8c, | ||
| 3694 | 0x00002c8a,0x00002c3b,0x00050051,0x00000006, | ||
| 3695 | 0x00002c8d,0x00002c8c,0x00000001,0x00050051, | ||
| 3696 | 0x00000006,0x00002c8e,0x00002c8c,0x00000000, | ||
| 3697 | 0x00050051,0x00000006,0x00002c91,0x00002c3d, | ||
| 3698 | 0x00000001,0x00050080,0x00000006,0x00002c93, | ||
| 3699 | 0x00002c91,0x00002c8d,0x00050050,0x00000007, | ||
| 3700 | 0x00002c94,0x00002c8e,0x00002c93,0x0004007c, | ||
| 3701 | 0x00000014,0x00002c84,0x00002c94,0x00060041, | ||
| 3702 | 0x000000db,0x00002c7b,0x00002c84,0x000000da, | ||
| 3703 | 0x000000da,0x0006003d,0x00000006,0x00002c7c, | ||
| 3704 | 0x00002c7b,0x00000002,0x00000004,0x0004007c, | ||
| 3705 | 0x00000027,0x00002c40,0x00002c7c,0x00050080, | ||
| 3706 | 0x00000006,0x00002c42,0x00002c3b,0x0000010a, | ||
| 3707 | 0x00050095,0x000000ab,0x00002cad,0x00002c8a, | ||
| 3708 | 0x00002c42,0x00050051,0x00000006,0x00002cae, | ||
| 3709 | 0x00002cad,0x00000001,0x00050051,0x00000006, | ||
| 3710 | 0x00002caf,0x00002cad,0x00000000,0x00050080, | ||
| 3711 | 0x00000006,0x00002cb4,0x00002c91,0x00002cae, | ||
| 3712 | 0x00050050,0x00000007,0x00002cb5,0x00002caf, | ||
| 3713 | 0x00002cb4,0x0004007c,0x00000014,0x00002ca5, | ||
| 3714 | 0x00002cb5,0x00060041,0x000000db,0x00002c9c, | ||
| 3715 | 0x00002ca5,0x000000da,0x000000da,0x0006003d, | ||
| 3716 | 0x00000006,0x00002c9d,0x00002c9c,0x00000002, | ||
| 3717 | 0x00000004,0x0004007c,0x00000027,0x00002c46, | ||
| 3718 | 0x00002c9d,0x00050080,0x00000006,0x00002c48, | ||
| 3719 | 0x00002c3b,0x00000111,0x00050095,0x000000ab, | ||
| 3720 | 0x00002cce,0x00002c8a,0x00002c48,0x00050051, | ||
| 3721 | 0x00000006,0x00002ccf,0x00002cce,0x00000001, | ||
| 3722 | 0x00050051,0x00000006,0x00002cd0,0x00002cce, | ||
| 3723 | 0x00000000,0x00050080,0x00000006,0x00002cd5, | ||
| 3724 | 0x00002c91,0x00002ccf,0x00050050,0x00000007, | ||
| 3725 | 0x00002cd6,0x00002cd0,0x00002cd5,0x0004007c, | ||
| 3726 | 0x00000014,0x00002cc6,0x00002cd6,0x00060041, | ||
| 3727 | 0x000000db,0x00002cbd,0x00002cc6,0x000000da, | ||
| 3728 | 0x000000da,0x0006003d,0x00000006,0x00002cbe, | ||
| 3729 | 0x00002cbd,0x00000002,0x00000004,0x0004007c, | ||
| 3730 | 0x00000027,0x00002c4c,0x00002cbe,0x00060050, | ||
| 3731 | 0x0000004b,0x00002c4d,0x00002c40,0x00002c46, | ||
| 3732 | 0x00002c4c,0x00050080,0x00000006,0x00002c4f, | ||
| 3733 | 0x00002c3b,0x00000118,0x00050095,0x000000ab, | ||
| 3734 | 0x00002cef,0x00002c8a,0x00002c4f,0x00050051, | ||
| 3735 | 0x00000006,0x00002cf0,0x00002cef,0x00000001, | ||
| 3736 | 0x00050051,0x00000006,0x00002cf1,0x00002cef, | ||
| 3737 | 0x00000000,0x00050080,0x00000006,0x00002cf6, | ||
| 3738 | 0x00002c91,0x00002cf0,0x00050050,0x00000007, | ||
| 3739 | 0x00002cf7,0x00002cf1,0x00002cf6,0x0004007c, | ||
| 3740 | 0x00000014,0x00002ce7,0x00002cf7,0x00060041, | ||
| 3741 | 0x000000db,0x00002cde,0x00002ce7,0x000000da, | ||
| 3742 | 0x000000da,0x0006003d,0x00000006,0x00002cdf, | ||
| 3743 | 0x00002cde,0x00000002,0x00000004,0x0004007c, | ||
| 3744 | 0x00000027,0x00002c53,0x00002cdf,0x00050080, | ||
| 3745 | 0x00000006,0x00002c55,0x00002c3b,0x0000011f, | ||
| 3746 | 0x00050095,0x000000ab,0x00002d10,0x00002c8a, | ||
| 3747 | 0x00002c55,0x00050051,0x00000006,0x00002d11, | ||
| 3748 | 0x00002d10,0x00000001,0x00050051,0x00000006, | ||
| 3749 | 0x00002d12,0x00002d10,0x00000000,0x00050080, | ||
| 3750 | 0x00000006,0x00002d17,0x00002c91,0x00002d11, | ||
| 3751 | 0x00050050,0x00000007,0x00002d18,0x00002d12, | ||
| 3752 | 0x00002d17,0x0004007c,0x00000014,0x00002d08, | ||
| 3753 | 0x00002d18,0x00060041,0x000000db,0x00002cff, | ||
| 3754 | 0x00002d08,0x000000da,0x000000da,0x0006003d, | ||
| 3755 | 0x00000006,0x00002d00,0x00002cff,0x00000002, | ||
| 3756 | 0x00000004,0x0004007c,0x00000027,0x00002c59, | ||
| 3757 | 0x00002d00,0x00050080,0x00000006,0x00002c5b, | ||
| 3758 | 0x00002c3b,0x00000189,0x00050095,0x000000ab, | ||
| 3759 | 0x00002d31,0x00002c8a,0x00002c5b,0x00050051, | ||
| 3760 | 0x00000006,0x00002d32,0x00002d31,0x00000001, | ||
| 3761 | 0x00050051,0x00000006,0x00002d33,0x00002d31, | ||
| 3762 | 0x00000000,0x00050080,0x00000006,0x00002d38, | ||
| 3763 | 0x00002c91,0x00002d32,0x00050050,0x00000007, | ||
| 3764 | 0x00002d39,0x00002d33,0x00002d38,0x0004007c, | ||
| 3765 | 0x00000014,0x00002d29,0x00002d39,0x00060041, | ||
| 3766 | 0x000000db,0x00002d20,0x00002d29,0x000000da, | ||
| 3767 | 0x000000da,0x0006003d,0x00000006,0x00002d21, | ||
| 3768 | 0x00002d20,0x00000002,0x00000004,0x0004007c, | ||
| 3769 | 0x00000027,0x00002c5f,0x00002d21,0x00060050, | ||
| 3770 | 0x0000004b,0x00002c60,0x00002c53,0x00002c59, | ||
| 3771 | 0x00002c5f,0x000200f9,0x000027b8,0x000200f8, | ||
| 3772 | 0x000027b8,0x000700f5,0x0000004b,0x000031a7, | ||
| 3773 | 0x00002b26,0x000027a9,0x00002c60,0x000027aa, | ||
| 3774 | 0x000700f5,0x0000004b,0x000031a5,0x00002b13, | ||
| 3775 | 0x000027a9,0x00002c4d,0x000027aa,0x000700f5, | ||
| 3776 | 0x00000006,0x000031a3,0x00002ae9,0x000027a9, | ||
| 3777 | 0x00002c29,0x000027aa,0x00050041,0x000000fe, | ||
| 3778 | 0x000027b9,0x000000fc,0x000009ef,0x0004003d, | ||
| 3779 | 0x00000006,0x000027ba,0x000027b9,0x000500c2, | ||
| 3780 | 0x00000006,0x00002d3d,0x000031a3,0x0000020d, | ||
| 3781 | 0x00050041,0x000000fe,0x000027bd,0x000000fc, | ||
| 3782 | 0x0000022c,0x0004003d,0x00000006,0x000027be, | ||
| 3783 | 0x000027bd,0x00050086,0x00000006,0x000027bf, | ||
| 3784 | 0x000027be,0x00000107,0x00050082,0x00000006, | ||
| 3785 | 0x000027c0,0x00002d3d,0x000027bf,0x00050084, | ||
| 3786 | 0x00000006,0x000027c1,0x0000010a,0x000027c0, | ||
| 3787 | 0x00050080,0x00000006,0x000027c2,0x000027ba, | ||
| 3788 | 0x000027c1,0x00050041,0x00000156,0x000027c3, | ||
| 3789 | 0x000000fc,0x000000da,0x0004003d,0x00000007, | ||
| 3790 | 0x000027c4,0x000027c3,0x00050051,0x00000006, | ||
| 3791 | 0x00002d53,0x000027c4,0x00000000,0x00050095, | ||
| 3792 | 0x000000ab,0x00002d55,0x00002d53,0x000027c2, | ||
| 3793 | 0x00050051,0x00000006,0x00002d56,0x00002d55, | ||
| 3794 | 0x00000001,0x00050051,0x00000006,0x00002d57, | ||
| 3795 | 0x00002d55,0x00000000,0x00050051,0x00000006, | ||
| 3796 | 0x00002d5a,0x000027c4,0x00000001,0x00050080, | ||
| 3797 | 0x00000006,0x00002d5c,0x00002d5a,0x00002d56, | ||
| 3798 | 0x00050050,0x00000007,0x00002d5d,0x00002d57, | ||
| 3799 | 0x00002d5c,0x0004007c,0x00000014,0x00002d4d, | ||
| 3800 | 0x00002d5d,0x00060041,0x000000db,0x00002d45, | ||
| 3801 | 0x00002d4d,0x000000da,0x000000da,0x0005003e, | ||
| 3802 | 0x00002d45,0x00002830,0x00000002,0x00000004, | ||
| 3803 | 0x00050051,0x00000027,0x00002d61,0x000031a5, | ||
| 3804 | 0x00000000,0x00050051,0x00000027,0x00002d63, | ||
| 3805 | 0x000031a7,0x00000000,0x000500bc,0x0000002f, | ||
| 3806 | 0x00002d64,0x00002d61,0x00002d63,0x000300f7, | ||
| 3807 | 0x00002d6b,0x00000000,0x000400fa,0x00002d64, | ||
| 3808 | 0x00002d65,0x00002d6b,0x000200f8,0x00002d65, | ||
| 3809 | 0x00050051,0x00000027,0x00002d67,0x000031a5, | ||
| 3810 | 0x00000001,0x00050051,0x00000027,0x00002d69, | ||
| 3811 | 0x000031a7,0x00000001,0x000500bc,0x0000002f, | ||
| 3812 | 0x00002d6a,0x00002d67,0x00002d69,0x000200f9, | ||
| 3813 | 0x00002d6b,0x000200f8,0x00002d6b,0x000700f5, | ||
| 3814 | 0x0000002f,0x00002d6c,0x00002d64,0x000027b8, | ||
| 3815 | 0x00002d6a,0x00002d65,0x000300f7,0x00002d73, | ||
| 3816 | 0x00000000,0x000400fa,0x00002d6c,0x00002d6d, | ||
| 3817 | 0x00002d73,0x000200f8,0x00002d6d,0x00050051, | ||
| 3818 | 0x00000027,0x00002d6f,0x000031a5,0x00000002, | ||
| 3819 | 0x00050051,0x00000027,0x00002d71,0x000031a7, | ||
| 3820 | 0x00000002,0x000500bc,0x0000002f,0x00002d72, | ||
| 3821 | 0x00002d6f,0x00002d71,0x000200f9,0x00002d73, | ||
| 3822 | 0x000200f8,0x00002d73,0x000700f5,0x0000002f, | ||
| 3823 | 0x00002d74,0x00002d6c,0x00002d6b,0x00002d72, | ||
| 3824 | 0x00002d6d,0x000300f7,0x000027d2,0x00000000, | ||
| 3825 | 0x000400fa,0x00002d74,0x000027cb,0x000027d2, | ||
| 3826 | 0x000200f8,0x000027cb,0x0007000c,0x0000004b, | ||
| 3827 | 0x000027ce,0x00000001,0x00000025,0x000031a0, | ||
| 3828 | 0x000031a5,0x0007000c,0x0000004b,0x000027d1, | ||
| 3829 | 0x00000001,0x00000028,0x000031a2,0x000031a7, | ||
| 3830 | 0x000200f9,0x000027d2,0x000200f8,0x000027d2, | ||
| 3831 | 0x000700f5,0x0000004b,0x0000328f,0x000031a2, | ||
| 3832 | 0x00002d73,0x000027d1,0x000027cb,0x000700f5, | ||
| 3833 | 0x0000004b,0x0000328a,0x000031a0,0x00002d73, | ||
| 3834 | 0x000027ce,0x000027cb,0x000200f9,0x000027d3, | ||
| 3835 | 0x000200f8,0x000027d3,0x000700f5,0x0000004b, | ||
| 3836 | 0x0000328e,0x000031a2,0x00002784,0x0000328f, | ||
| 3837 | 0x000027d2,0x000700f5,0x0000004b,0x00003289, | ||
| 3838 | 0x000031a0,0x00002784,0x0000328a,0x000027d2, | ||
| 3839 | 0x000700f5,0x0000004b,0x000031e5,0x000032a7, | ||
| 3840 | 0x00002784,0x000031a7,0x000027d2,0x000700f5, | ||
| 3841 | 0x0000004b,0x000031e0,0x000032a5,0x00002784, | ||
| 3842 | 0x000031a5,0x000027d2,0x000700f5,0x00000006, | ||
| 3843 | 0x000031d9,0x00000380,0x00002784,0x000031a3, | ||
| 3844 | 0x000027d2,0x000200f9,0x000027d4,0x000200f8, | ||
| 3845 | 0x000027d4,0x000700f5,0x0000004b,0x0000328b, | ||
| 3846 | 0x0000328c,0x00002783,0x0000328e,0x000027d3, | ||
| 3847 | 0x000700f5,0x0000004b,0x00003286,0x00003287, | ||
| 3848 | 0x00002783,0x00003289,0x000027d3,0x000700f5, | ||
| 3849 | 0x0000004b,0x000031e2,0x000031e3,0x00002783, | ||
| 3850 | 0x000031e5,0x000027d3,0x000700f5,0x0000004b, | ||
| 3851 | 0x000031dd,0x000031de,0x00002783,0x000031e0, | ||
| 3852 | 0x000027d3,0x000700f5,0x00000006,0x000031d2, | ||
| 3853 | 0x00002839,0x00002783,0x000031d9,0x000027d3, | ||
| 3854 | 0x00050084,0x00000006,0x000027d7,0x0000010a, | ||
| 3855 | 0x0000319d,0x00050080,0x00000006,0x000027d8, | ||
| 3856 | 0x0000282d,0x000027d7,0x00050041,0x00000156, | ||
| 3857 | 0x000027d9,0x000000fc,0x000000da,0x0004003d, | ||
| 3858 | 0x00000007,0x000027da,0x000027d9,0x00050051, | ||
| 3859 | 0x00000006,0x00002d8b,0x000027da,0x00000000, | ||
| 3860 | 0x00050095,0x000000ab,0x00002d8d,0x00002d8b, | ||
| 3861 | 0x000027d8,0x00050051,0x00000006,0x00002d8e, | ||
| 3862 | 0x00002d8d,0x00000001,0x00050051,0x00000006, | ||
| 3863 | 0x00002d8f,0x00002d8d,0x00000000,0x00050051, | ||
| 3864 | 0x00000006,0x00002d92,0x000027da,0x00000001, | ||
| 3865 | 0x00050080,0x00000006,0x00002d94,0x00002d92, | ||
| 3866 | 0x00002d8e,0x00050050,0x00000007,0x00002d95, | ||
| 3867 | 0x00002d8f,0x00002d94,0x0004007c,0x00000014, | ||
| 3868 | 0x00002d85,0x00002d95,0x00060041,0x000000db, | ||
| 3869 | 0x00002d7d,0x00002d85,0x000000da,0x000000da, | ||
| 3870 | 0x0005003e,0x00002d7d,0x000031d2,0x00000002, | ||
| 3871 | 0x00000004,0x00050080,0x00000006,0x000027de, | ||
| 3872 | 0x0000282d,0x0000011f,0x00050084,0x00000006, | ||
| 3873 | 0x000027e0,0x00000150,0x0000319d,0x00050080, | ||
| 3874 | 0x00000006,0x000027e1,0x000027de,0x000027e0, | ||
| 3875 | 0x00050051,0x00000027,0x000027e6,0x000031dd, | ||
| 3876 | 0x00000000,0x0004007c,0x00000006,0x00002d9b, | ||
| 3877 | 0x000027e6,0x00050095,0x000000ab,0x00002db6, | ||
| 3878 | 0x00002d8b,0x000027e1,0x00050051,0x00000006, | ||
| 3879 | 0x00002db7,0x00002db6,0x00000001,0x00050051, | ||
| 3880 | 0x00000006,0x00002db8,0x00002db6,0x00000000, | ||
| 3881 | 0x00050080,0x00000006,0x00002dbd,0x00002d92, | ||
| 3882 | 0x00002db7,0x00050050,0x00000007,0x00002dbe, | ||
| 3883 | 0x00002db8,0x00002dbd,0x0004007c,0x00000014, | ||
| 3884 | 0x00002dae,0x00002dbe,0x00060041,0x000000db, | ||
| 3885 | 0x00002da6,0x00002dae,0x000000da,0x000000da, | ||
| 3886 | 0x0005003e,0x00002da6,0x00002d9b,0x00000002, | ||
| 3887 | 0x00000004,0x00050080,0x00000006,0x000027e9, | ||
| 3888 | 0x000027e1,0x0000010a,0x00050051,0x00000027, | ||
| 3889 | 0x000027ed,0x000031dd,0x00000001,0x0004007c, | ||
| 3890 | 0x00000006,0x00002dc4,0x000027ed,0x00050095, | ||
| 3891 | 0x000000ab,0x00002ddf,0x00002d8b,0x000027e9, | ||
| 3892 | 0x00050051,0x00000006,0x00002de0,0x00002ddf, | ||
| 3893 | 0x00000001,0x00050051,0x00000006,0x00002de1, | ||
| 3894 | 0x00002ddf,0x00000000,0x00050080,0x00000006, | ||
| 3895 | 0x00002de6,0x00002d92,0x00002de0,0x00050050, | ||
| 3896 | 0x00000007,0x00002de7,0x00002de1,0x00002de6, | ||
| 3897 | 0x0004007c,0x00000014,0x00002dd7,0x00002de7, | ||
| 3898 | 0x00060041,0x000000db,0x00002dcf,0x00002dd7, | ||
| 3899 | 0x000000da,0x000000da,0x0005003e,0x00002dcf, | ||
| 3900 | 0x00002dc4,0x00000002,0x00000004,0x00050080, | ||
| 3901 | 0x00000006,0x000027f0,0x000027e1,0x00000111, | ||
| 3902 | 0x00050051,0x00000027,0x000027f4,0x000031dd, | ||
| 3903 | 0x00000002,0x0004007c,0x00000006,0x00002ded, | ||
| 3904 | 0x000027f4,0x00050095,0x000000ab,0x00002e08, | ||
| 3905 | 0x00002d8b,0x000027f0,0x00050051,0x00000006, | ||
| 3906 | 0x00002e09,0x00002e08,0x00000001,0x00050051, | ||
| 3907 | 0x00000006,0x00002e0a,0x00002e08,0x00000000, | ||
| 3908 | 0x00050080,0x00000006,0x00002e0f,0x00002d92, | ||
| 3909 | 0x00002e09,0x00050050,0x00000007,0x00002e10, | ||
| 3910 | 0x00002e0a,0x00002e0f,0x0004007c,0x00000014, | ||
| 3911 | 0x00002e00,0x00002e10,0x00060041,0x000000db, | ||
| 3912 | 0x00002df8,0x00002e00,0x000000da,0x000000da, | ||
| 3913 | 0x0005003e,0x00002df8,0x00002ded,0x00000002, | ||
| 3914 | 0x00000004,0x00050080,0x00000006,0x000027f7, | ||
| 3915 | 0x000027e1,0x00000118,0x00050051,0x00000027, | ||
| 3916 | 0x000027fb,0x000031e2,0x00000000,0x0004007c, | ||
| 3917 | 0x00000006,0x00002e16,0x000027fb,0x00050095, | ||
| 3918 | 0x000000ab,0x00002e31,0x00002d8b,0x000027f7, | ||
| 3919 | 0x00050051,0x00000006,0x00002e32,0x00002e31, | ||
| 3920 | 0x00000001,0x00050051,0x00000006,0x00002e33, | ||
| 3921 | 0x00002e31,0x00000000,0x00050080,0x00000006, | ||
| 3922 | 0x00002e38,0x00002d92,0x00002e32,0x00050050, | ||
| 3923 | 0x00000007,0x00002e39,0x00002e33,0x00002e38, | ||
| 3924 | 0x0004007c,0x00000014,0x00002e29,0x00002e39, | ||
| 3925 | 0x00060041,0x000000db,0x00002e21,0x00002e29, | ||
| 3926 | 0x000000da,0x000000da,0x0005003e,0x00002e21, | ||
| 3927 | 0x00002e16,0x00000002,0x00000004,0x00050080, | ||
| 3928 | 0x00000006,0x000027fe,0x000027e1,0x0000011f, | ||
| 3929 | 0x00050051,0x00000027,0x00002802,0x000031e2, | ||
| 3930 | 0x00000001,0x0004007c,0x00000006,0x00002e3f, | ||
| 3931 | 0x00002802,0x00050095,0x000000ab,0x00002e5a, | ||
| 3932 | 0x00002d8b,0x000027fe,0x00050051,0x00000006, | ||
| 3933 | 0x00002e5b,0x00002e5a,0x00000001,0x00050051, | ||
| 3934 | 0x00000006,0x00002e5c,0x00002e5a,0x00000000, | ||
| 3935 | 0x00050080,0x00000006,0x00002e61,0x00002d92, | ||
| 3936 | 0x00002e5b,0x00050050,0x00000007,0x00002e62, | ||
| 3937 | 0x00002e5c,0x00002e61,0x0004007c,0x00000014, | ||
| 3938 | 0x00002e52,0x00002e62,0x00060041,0x000000db, | ||
| 3939 | 0x00002e4a,0x00002e52,0x000000da,0x000000da, | ||
| 3940 | 0x0005003e,0x00002e4a,0x00002e3f,0x00000002, | ||
| 3941 | 0x00000004,0x00050080,0x00000006,0x00002805, | ||
| 3942 | 0x000027e1,0x00000189,0x00050051,0x00000027, | ||
| 3943 | 0x00002809,0x000031e2,0x00000002,0x0004007c, | ||
| 3944 | 0x00000006,0x00002e68,0x00002809,0x00050095, | ||
| 3945 | 0x000000ab,0x00002e83,0x00002d8b,0x00002805, | ||
| 3946 | 0x00050051,0x00000006,0x00002e84,0x00002e83, | ||
| 3947 | 0x00000001,0x00050051,0x00000006,0x00002e85, | ||
| 3948 | 0x00002e83,0x00000000,0x00050080,0x00000006, | ||
| 3949 | 0x00002e8a,0x00002d92,0x00002e84,0x00050050, | ||
| 3950 | 0x00000007,0x00002e8b,0x00002e85,0x00002e8a, | ||
| 3951 | 0x0004007c,0x00000014,0x00002e7b,0x00002e8b, | ||
| 3952 | 0x00060041,0x000000db,0x00002e73,0x00002e7b, | ||
| 3953 | 0x000000da,0x000000da,0x0005003e,0x00002e73, | ||
| 3954 | 0x00002e68,0x00000002,0x00000004,0x000200f9, | ||
| 3955 | 0x0000280b,0x000200f8,0x0000280b,0x00050080, | ||
| 3956 | 0x00000006,0x0000280d,0x0000319d,0x00000154, | ||
| 3957 | 0x000200f9,0x0000272f,0x000200f8,0x0000280e, | ||
| 3958 | 0x000200f9,0x0000280f,0x000200f8,0x0000280f, | ||
| 3959 | 0x000700f5,0x00000006,0x0000319e,0x000000a6, | ||
| 3960 | 0x0000280e,0x0000281e,0x00002813,0x000500b0, | ||
| 3961 | 0x0000002f,0x00002812,0x0000319e,0x0000010a, | ||
| 3962 | 0x000400f6,0x0000281f,0x00002813,0x00000000, | ||
| 3963 | 0x000400fa,0x00002812,0x00002813,0x0000281f, | ||
| 3964 | 0x000200f8,0x00002813,0x00050080,0x00000006, | ||
| 3965 | 0x00002815,0x0000282d,0x000005c6,0x00050084, | ||
| 3966 | 0x00000006,0x00002817,0x0000010a,0x0000319e, | ||
| 3967 | 0x00050080,0x00000006,0x00002818,0x00002815, | ||
| 3968 | 0x00002817,0x00050041,0x00000156,0x00002819, | ||
| 3969 | 0x000000fc,0x000000da,0x0004003d,0x00000007, | ||
| 3970 | 0x0000281a,0x00002819,0x00050051,0x00000006, | ||
| 3971 | 0x00002ea1,0x0000281a,0x00000000,0x00050095, | ||
| 3972 | 0x000000ab,0x00002ea3,0x00002ea1,0x00002818, | ||
| 3973 | 0x00050051,0x00000006,0x00002ea4,0x00002ea3, | ||
| 3974 | 0x00000001,0x00050051,0x00000006,0x00002ea5, | ||
| 3975 | 0x00002ea3,0x00000000,0x00050051,0x00000006, | ||
| 3976 | 0x00002ea8,0x0000281a,0x00000001,0x00050080, | ||
| 3977 | 0x00000006,0x00002eaa,0x00002ea8,0x00002ea4, | ||
| 3978 | 0x00050050,0x00000007,0x00002eab,0x00002ea5, | ||
| 3979 | 0x00002eaa,0x0004007c,0x00000014,0x00002e9b, | ||
| 3980 | 0x00002eab,0x00060041,0x000000db,0x00002e93, | ||
| 3981 | 0x00002e9b,0x000000da,0x000000da,0x0005003e, | ||
| 3982 | 0x00002e93,0x000000a6,0x00000002,0x00000004, | ||
| 3983 | 0x00050080,0x00000006,0x0000281e,0x0000319e, | ||
| 3984 | 0x00000154,0x000200f9,0x0000280f,0x000200f8, | ||
| 3985 | 0x0000281f,0x00050041,0x000000fe,0x00002820, | ||
| 3986 | 0x000000fc,0x0000096c,0x0004003d,0x00000006, | ||
| 3987 | 0x00002821,0x00002820,0x00050080,0x00000006, | ||
| 3988 | 0x00002823,0x00002821,0x00002723,0x00050041, | ||
| 3989 | 0x000000fe,0x00002ef5,0x000000fc,0x000000fd, | ||
| 3990 | 0x0004003d,0x00000006,0x00002ef6,0x00002ef5, | ||
| 3991 | 0x00050084,0x00000006,0x00002ef7,0x0000011f, | ||
| 3992 | 0x00002ef6,0x00050080,0x00000006,0x00002ef8, | ||
| 3993 | 0x00000107,0x00002ef7,0x00050080,0x00000006, | ||
| 3994 | 0x00002efe,0x00002ef6,0x000032a8,0x00050086, | ||
| 3995 | 0x00000006,0x00002eff,0x00002efe,0x00000101, | ||
| 3996 | 0x00050084,0x00000006,0x00002ef1,0x00000107, | ||
| 3997 | 0x00002eff,0x00050080,0x00000006,0x00002ef2, | ||
| 3998 | 0x00002ef8,0x00002ef1,0x00050084,0x00000006, | ||
| 3999 | 0x00002ec2,0x00000150,0x00002823,0x00050080, | ||
| 4000 | 0x00000006,0x00002ec3,0x00002ef2,0x00002ec2, | ||
| 4001 | 0x00050041,0x00000156,0x00002ec4,0x000000fc, | ||
| 4002 | 0x00000154,0x0004003d,0x00000007,0x00002ec5, | ||
| 4003 | 0x00002ec4,0x00050051,0x00000027,0x00002ec8, | ||
| 4004 | 0x000031a0,0x00000000,0x0004007c,0x00000006, | ||
| 4005 | 0x00002f05,0x00002ec8,0x00050051,0x00000006, | ||
| 4006 | 0x00002f1e,0x00002ec5,0x00000000,0x00050095, | ||
| 4007 | 0x000000ab,0x00002f20,0x00002f1e,0x00002ec3, | ||
| 4008 | 0x00050051,0x00000006,0x00002f21,0x00002f20, | ||
| 4009 | 0x00000001,0x00050051,0x00000006,0x00002f22, | ||
| 4010 | 0x00002f20,0x00000000,0x00050051,0x00000006, | ||
| 4011 | 0x00002f25,0x00002ec5,0x00000001,0x00050080, | ||
| 4012 | 0x00000006,0x00002f27,0x00002f25,0x00002f21, | ||
| 4013 | 0x00050050,0x00000007,0x00002f28,0x00002f22, | ||
| 4014 | 0x00002f27,0x0004007c,0x00000014,0x00002f18, | ||
| 4015 | 0x00002f28,0x00060041,0x000000db,0x00002f10, | ||
| 4016 | 0x00002f18,0x000000da,0x000000da,0x0005003e, | ||
| 4017 | 0x00002f10,0x00002f05,0x00000002,0x00000004, | ||
| 4018 | 0x00050080,0x00000006,0x00002ecb,0x00002ec3, | ||
| 4019 | 0x0000010a,0x00050051,0x00000027,0x00002ecf, | ||
| 4020 | 0x000031a0,0x00000001,0x0004007c,0x00000006, | ||
| 4021 | 0x00002f2e,0x00002ecf,0x00050095,0x000000ab, | ||
| 4022 | 0x00002f49,0x00002f1e,0x00002ecb,0x00050051, | ||
| 4023 | 0x00000006,0x00002f4a,0x00002f49,0x00000001, | ||
| 4024 | 0x00050051,0x00000006,0x00002f4b,0x00002f49, | ||
| 4025 | 0x00000000,0x00050080,0x00000006,0x00002f50, | ||
| 4026 | 0x00002f25,0x00002f4a,0x00050050,0x00000007, | ||
| 4027 | 0x00002f51,0x00002f4b,0x00002f50,0x0004007c, | ||
| 4028 | 0x00000014,0x00002f41,0x00002f51,0x00060041, | ||
| 4029 | 0x000000db,0x00002f39,0x00002f41,0x000000da, | ||
| 4030 | 0x000000da,0x0005003e,0x00002f39,0x00002f2e, | ||
| 3250 | 0x00000002,0x00000004,0x00050080,0x00000006, | 4031 | 0x00000002,0x00000004,0x00050080,0x00000006, |
| 3251 | 0x000023b5,0x000023a6,0x0000010e,0x00050051, | 4032 | 0x00002ed2,0x00002ec3,0x00000111,0x00050051, |
| 3252 | 0x00000027,0x000023b9,0x00002ac7,0x00000002, | 4033 | 0x00000027,0x00002ed6,0x000031a0,0x00000002, |
| 3253 | 0x0004007c,0x00000006,0x0000272f,0x000023b9, | 4034 | 0x0004007c,0x00000006,0x00002f57,0x00002ed6, |
| 3254 | 0x00050095,0x000000a8,0x0000274a,0x000026cd, | 4035 | 0x00050095,0x000000ab,0x00002f72,0x00002f1e, |
| 3255 | 0x000023b5,0x00050051,0x00000006,0x0000274b, | 4036 | 0x00002ed2,0x00050051,0x00000006,0x00002f73, |
| 3256 | 0x0000274a,0x00000001,0x00050051,0x00000006, | 4037 | 0x00002f72,0x00000001,0x00050051,0x00000006, |
| 3257 | 0x0000274c,0x0000274a,0x00000000,0x00050080, | 4038 | 0x00002f74,0x00002f72,0x00000000,0x00050080, |
| 3258 | 0x00000006,0x00002751,0x000026d4,0x0000274b, | 4039 | 0x00000006,0x00002f79,0x00002f25,0x00002f73, |
| 3259 | 0x00050050,0x00000007,0x00002752,0x0000274c, | 4040 | 0x00050050,0x00000007,0x00002f7a,0x00002f74, |
| 3260 | 0x00002751,0x0004007c,0x00000014,0x00002742, | 4041 | 0x00002f79,0x0004007c,0x00000014,0x00002f6a, |
| 3261 | 0x00002752,0x00060041,0x000000d8,0x0000273a, | 4042 | 0x00002f7a,0x00060041,0x000000db,0x00002f62, |
| 3262 | 0x00002742,0x000000d7,0x000000d7,0x0005003e, | 4043 | 0x00002f6a,0x000000da,0x000000da,0x0005003e, |
| 3263 | 0x0000273a,0x0000272f,0x00000002,0x00000004, | 4044 | 0x00002f62,0x00002f57,0x00000002,0x00000004, |
| 3264 | 0x00050080,0x00000006,0x000023bc,0x000023a6, | 4045 | 0x00050080,0x00000006,0x00002ed9,0x00002ec3, |
| 3265 | 0x00000115,0x00050051,0x00000027,0x000023c0, | 4046 | 0x00000118,0x00050051,0x00000027,0x00002edd, |
| 3266 | 0x00002ac9,0x00000000,0x0004007c,0x00000006, | 4047 | 0x000031a2,0x00000000,0x0004007c,0x00000006, |
| 3267 | 0x00002758,0x000023c0,0x00050095,0x000000a8, | 4048 | 0x00002f80,0x00002edd,0x00050095,0x000000ab, |
| 3268 | 0x00002773,0x000026cd,0x000023bc,0x00050051, | 4049 | 0x00002f9b,0x00002f1e,0x00002ed9,0x00050051, |
| 3269 | 0x00000006,0x00002774,0x00002773,0x00000001, | 4050 | 0x00000006,0x00002f9c,0x00002f9b,0x00000001, |
| 3270 | 0x00050051,0x00000006,0x00002775,0x00002773, | 4051 | 0x00050051,0x00000006,0x00002f9d,0x00002f9b, |
| 3271 | 0x00000000,0x00050080,0x00000006,0x0000277a, | 4052 | 0x00000000,0x00050080,0x00000006,0x00002fa2, |
| 3272 | 0x000026d4,0x00002774,0x00050050,0x00000007, | 4053 | 0x00002f25,0x00002f9c,0x00050050,0x00000007, |
| 3273 | 0x0000277b,0x00002775,0x0000277a,0x0004007c, | 4054 | 0x00002fa3,0x00002f9d,0x00002fa2,0x0004007c, |
| 3274 | 0x00000014,0x0000276b,0x0000277b,0x00060041, | 4055 | 0x00000014,0x00002f93,0x00002fa3,0x00060041, |
| 3275 | 0x000000d8,0x00002763,0x0000276b,0x000000d7, | 4056 | 0x000000db,0x00002f8b,0x00002f93,0x000000da, |
| 3276 | 0x000000d7,0x0005003e,0x00002763,0x00002758, | 4057 | 0x000000da,0x0005003e,0x00002f8b,0x00002f80, |
| 3277 | 0x00000002,0x00000004,0x00050080,0x00000006, | 4058 | 0x00000002,0x00000004,0x00050080,0x00000006, |
| 3278 | 0x000023c3,0x000023a6,0x0000011c,0x00050051, | 4059 | 0x00002ee0,0x00002ec3,0x0000011f,0x00050051, |
| 3279 | 0x00000027,0x000023c7,0x00002ac9,0x00000001, | 4060 | 0x00000027,0x00002ee4,0x000031a2,0x00000001, |
| 3280 | 0x0004007c,0x00000006,0x00002781,0x000023c7, | 4061 | 0x0004007c,0x00000006,0x00002fa9,0x00002ee4, |
| 3281 | 0x00050095,0x000000a8,0x0000279c,0x000026cd, | 4062 | 0x00050095,0x000000ab,0x00002fc4,0x00002f1e, |
| 3282 | 0x000023c3,0x00050051,0x00000006,0x0000279d, | 4063 | 0x00002ee0,0x00050051,0x00000006,0x00002fc5, |
| 3283 | 0x0000279c,0x00000001,0x00050051,0x00000006, | 4064 | 0x00002fc4,0x00000001,0x00050051,0x00000006, |
| 3284 | 0x0000279e,0x0000279c,0x00000000,0x00050080, | 4065 | 0x00002fc6,0x00002fc4,0x00000000,0x00050080, |
| 3285 | 0x00000006,0x000027a3,0x000026d4,0x0000279d, | 4066 | 0x00000006,0x00002fcb,0x00002f25,0x00002fc5, |
| 3286 | 0x00050050,0x00000007,0x000027a4,0x0000279e, | 4067 | 0x00050050,0x00000007,0x00002fcc,0x00002fc6, |
| 3287 | 0x000027a3,0x0004007c,0x00000014,0x00002794, | 4068 | 0x00002fcb,0x0004007c,0x00000014,0x00002fbc, |
| 3288 | 0x000027a4,0x00060041,0x000000d8,0x0000278c, | 4069 | 0x00002fcc,0x00060041,0x000000db,0x00002fb4, |
| 3289 | 0x00002794,0x000000d7,0x000000d7,0x0005003e, | 4070 | 0x00002fbc,0x000000da,0x000000da,0x0005003e, |
| 3290 | 0x0000278c,0x00002781,0x00000002,0x00000004, | 4071 | 0x00002fb4,0x00002fa9,0x00000002,0x00000004, |
| 3291 | 0x00050080,0x00000006,0x000023ca,0x000023a6, | 4072 | 0x00050080,0x00000006,0x00002ee7,0x00002ec3, |
| 3292 | 0x00000186,0x00050051,0x00000027,0x000023ce, | 4073 | 0x00000189,0x00050051,0x00000027,0x00002eeb, |
| 3293 | 0x00002ac9,0x00000002,0x0004007c,0x00000006, | 4074 | 0x000031a2,0x00000002,0x0004007c,0x00000006, |
| 3294 | 0x000027aa,0x000023ce,0x00050095,0x000000a8, | 4075 | 0x00002fd2,0x00002eeb,0x00050095,0x000000ab, |
| 3295 | 0x000027c5,0x000026cd,0x000023ca,0x00050051, | 4076 | 0x00002fed,0x00002f1e,0x00002ee7,0x00050051, |
| 3296 | 0x00000006,0x000027c6,0x000027c5,0x00000001, | 4077 | 0x00000006,0x00002fee,0x00002fed,0x00000001, |
| 3297 | 0x00050051,0x00000006,0x000027c7,0x000027c5, | 4078 | 0x00050051,0x00000006,0x00002fef,0x00002fed, |
| 3298 | 0x00000000,0x00050080,0x00000006,0x000027cc, | 4079 | 0x00000000,0x00050080,0x00000006,0x00002ff4, |
| 3299 | 0x000026d4,0x000027c6,0x00050050,0x00000007, | 4080 | 0x00002f25,0x00002fee,0x00050050,0x00000007, |
| 3300 | 0x000027cd,0x000027c7,0x000027cc,0x0004007c, | 4081 | 0x00002ff5,0x00002fef,0x00002ff4,0x0004007c, |
| 3301 | 0x00000014,0x000027bd,0x000027cd,0x00060041, | 4082 | 0x00000014,0x00002fe5,0x00002ff5,0x00060041, |
| 3302 | 0x000000d8,0x000027b5,0x000027bd,0x000000d7, | 4083 | 0x000000db,0x00002fdd,0x00002fe5,0x000000da, |
| 3303 | 0x000000d7,0x0005003e,0x000027b5,0x000027aa, | 4084 | 0x000000da,0x0005003e,0x00002fdd,0x00002fd2, |
| 3304 | 0x00000002,0x00000004,0x000200f9,0x000023d0, | 4085 | 0x00000002,0x00000004,0x000200f9,0x00000bed, |
| 3305 | 0x000200f8,0x000023d0,0x00050080,0x00000006, | 4086 | 0x000200f8,0x00000bed,0x000200f9,0x00000be4, |
| 3306 | 0x000023d2,0x00002aa5,0x00000151,0x000200f9, | 4087 | 0x000200f8,0x00000be4,0x000200f9,0x00000bdb, |
| 3307 | 0x0000233e,0x000200f8,0x000023d3,0x000200f9, | 4088 | 0x000200f8,0x00000bdb,0x000200f9,0x00000bd2, |
| 3308 | 0x000023d4,0x000200f8,0x000023d4,0x000700f5, | 4089 | 0x000200f8,0x00000bd2,0x000200f9,0x00000bac, |
| 3309 | 0x00000006,0x00002aa6,0x000000a3,0x000023d3, | 4090 | 0x000200f8,0x00000bac,0x000200f9,0x00000b97, |
| 3310 | 0x000023e3,0x000023d8,0x000500b0,0x0000002f, | 4091 | 0x000200f8,0x00000b97,0x000200f9,0x00000bf3, |
| 3311 | 0x000023d7,0x00002aa6,0x00000107,0x000400f6, | 4092 | 0x000200f8,0x00000bf3,0x000100fd,0x00010038} |
| 3312 | 0x000023e4,0x000023d8,0x00000000,0x000400fa, | ||
| 3313 | 0x000023d7,0x000023d8,0x000023e4,0x000200f8, | ||
| 3314 | 0x000023d8,0x00050080,0x00000006,0x000023da, | ||
| 3315 | 0x000023f2,0x000005c3,0x00050084,0x00000006, | ||
| 3316 | 0x000023dc,0x00000107,0x00002aa6,0x00050080, | ||
| 3317 | 0x00000006,0x000023dd,0x000023da,0x000023dc, | ||
| 3318 | 0x00050041,0x00000153,0x000023de,0x000000f9, | ||
| 3319 | 0x000000d7,0x0004003d,0x00000007,0x000023df, | ||
| 3320 | 0x000023de,0x00050051,0x00000006,0x000027e3, | ||
| 3321 | 0x000023df,0x00000000,0x00050095,0x000000a8, | ||
| 3322 | 0x000027e5,0x000027e3,0x000023dd,0x00050051, | ||
| 3323 | 0x00000006,0x000027e6,0x000027e5,0x00000001, | ||
| 3324 | 0x00050051,0x00000006,0x000027e7,0x000027e5, | ||
| 3325 | 0x00000000,0x00050051,0x00000006,0x000027ea, | ||
| 3326 | 0x000023df,0x00000001,0x00050080,0x00000006, | ||
| 3327 | 0x000027ec,0x000027ea,0x000027e6,0x00050050, | ||
| 3328 | 0x00000007,0x000027ed,0x000027e7,0x000027ec, | ||
| 3329 | 0x0004007c,0x00000014,0x000027dd,0x000027ed, | ||
| 3330 | 0x00060041,0x000000d8,0x000027d5,0x000027dd, | ||
| 3331 | 0x000000d7,0x000000d7,0x0005003e,0x000027d5, | ||
| 3332 | 0x000000a3,0x00000002,0x00000004,0x00050080, | ||
| 3333 | 0x00000006,0x000023e3,0x00002aa6,0x00000151, | ||
| 3334 | 0x000200f9,0x000023d4,0x000200f8,0x000023e4, | ||
| 3335 | 0x00050041,0x000000fb,0x000023e5,0x000000f9, | ||
| 3336 | 0x000008bc,0x0004003d,0x00000006,0x000023e6, | ||
| 3337 | 0x000023e5,0x00050080,0x00000006,0x000023e8, | ||
| 3338 | 0x000023e6,0x00002332,0x00050041,0x000000fb, | ||
| 3339 | 0x00002837,0x000000f9,0x000000fa,0x0004003d, | ||
| 3340 | 0x00000006,0x00002838,0x00002837,0x00050084, | ||
| 3341 | 0x00000006,0x00002839,0x0000011c,0x00002838, | ||
| 3342 | 0x00050080,0x00000006,0x0000283a,0x00000104, | ||
| 3343 | 0x00002839,0x00050080,0x00000006,0x00002840, | ||
| 3344 | 0x00002838,0x00002b67,0x00050086,0x00000006, | ||
| 3345 | 0x00002841,0x00002840,0x000000fe,0x00050084, | ||
| 3346 | 0x00000006,0x00002833,0x00000104,0x00002841, | ||
| 3347 | 0x00050080,0x00000006,0x00002834,0x0000283a, | ||
| 3348 | 0x00002833,0x00050084,0x00000006,0x00002804, | ||
| 3349 | 0x0000014d,0x000023e8,0x00050080,0x00000006, | ||
| 3350 | 0x00002805,0x00002834,0x00002804,0x00050041, | ||
| 3351 | 0x00000153,0x00002806,0x000000f9,0x00000151, | ||
| 3352 | 0x0004003d,0x00000007,0x00002807,0x00002806, | ||
| 3353 | 0x00050051,0x00000027,0x0000280a,0x00002aa8, | ||
| 3354 | 0x00000000,0x0004007c,0x00000006,0x00002847, | ||
| 3355 | 0x0000280a,0x00050051,0x00000006,0x00002860, | ||
| 3356 | 0x00002807,0x00000000,0x00050095,0x000000a8, | ||
| 3357 | 0x00002862,0x00002860,0x00002805,0x00050051, | ||
| 3358 | 0x00000006,0x00002863,0x00002862,0x00000001, | ||
| 3359 | 0x00050051,0x00000006,0x00002864,0x00002862, | ||
| 3360 | 0x00000000,0x00050051,0x00000006,0x00002867, | ||
| 3361 | 0x00002807,0x00000001,0x00050080,0x00000006, | ||
| 3362 | 0x00002869,0x00002867,0x00002863,0x00050050, | ||
| 3363 | 0x00000007,0x0000286a,0x00002864,0x00002869, | ||
| 3364 | 0x0004007c,0x00000014,0x0000285a,0x0000286a, | ||
| 3365 | 0x00060041,0x000000d8,0x00002852,0x0000285a, | ||
| 3366 | 0x000000d7,0x000000d7,0x0005003e,0x00002852, | ||
| 3367 | 0x00002847,0x00000002,0x00000004,0x00050080, | ||
| 3368 | 0x00000006,0x0000280d,0x00002805,0x00000107, | ||
| 3369 | 0x00050051,0x00000027,0x00002811,0x00002aa8, | ||
| 3370 | 0x00000001,0x0004007c,0x00000006,0x00002870, | ||
| 3371 | 0x00002811,0x00050095,0x000000a8,0x0000288b, | ||
| 3372 | 0x00002860,0x0000280d,0x00050051,0x00000006, | ||
| 3373 | 0x0000288c,0x0000288b,0x00000001,0x00050051, | ||
| 3374 | 0x00000006,0x0000288d,0x0000288b,0x00000000, | ||
| 3375 | 0x00050080,0x00000006,0x00002892,0x00002867, | ||
| 3376 | 0x0000288c,0x00050050,0x00000007,0x00002893, | ||
| 3377 | 0x0000288d,0x00002892,0x0004007c,0x00000014, | ||
| 3378 | 0x00002883,0x00002893,0x00060041,0x000000d8, | ||
| 3379 | 0x0000287b,0x00002883,0x000000d7,0x000000d7, | ||
| 3380 | 0x0005003e,0x0000287b,0x00002870,0x00000002, | ||
| 3381 | 0x00000004,0x00050080,0x00000006,0x00002814, | ||
| 3382 | 0x00002805,0x0000010e,0x00050051,0x00000027, | ||
| 3383 | 0x00002818,0x00002aa8,0x00000002,0x0004007c, | ||
| 3384 | 0x00000006,0x00002899,0x00002818,0x00050095, | ||
| 3385 | 0x000000a8,0x000028b4,0x00002860,0x00002814, | ||
| 3386 | 0x00050051,0x00000006,0x000028b5,0x000028b4, | ||
| 3387 | 0x00000001,0x00050051,0x00000006,0x000028b6, | ||
| 3388 | 0x000028b4,0x00000000,0x00050080,0x00000006, | ||
| 3389 | 0x000028bb,0x00002867,0x000028b5,0x00050050, | ||
| 3390 | 0x00000007,0x000028bc,0x000028b6,0x000028bb, | ||
| 3391 | 0x0004007c,0x00000014,0x000028ac,0x000028bc, | ||
| 3392 | 0x00060041,0x000000d8,0x000028a4,0x000028ac, | ||
| 3393 | 0x000000d7,0x000000d7,0x0005003e,0x000028a4, | ||
| 3394 | 0x00002899,0x00000002,0x00000004,0x00050080, | ||
| 3395 | 0x00000006,0x0000281b,0x00002805,0x00000115, | ||
| 3396 | 0x00050051,0x00000027,0x0000281f,0x00002aaa, | ||
| 3397 | 0x00000000,0x0004007c,0x00000006,0x000028c2, | ||
| 3398 | 0x0000281f,0x00050095,0x000000a8,0x000028dd, | ||
| 3399 | 0x00002860,0x0000281b,0x00050051,0x00000006, | ||
| 3400 | 0x000028de,0x000028dd,0x00000001,0x00050051, | ||
| 3401 | 0x00000006,0x000028df,0x000028dd,0x00000000, | ||
| 3402 | 0x00050080,0x00000006,0x000028e4,0x00002867, | ||
| 3403 | 0x000028de,0x00050050,0x00000007,0x000028e5, | ||
| 3404 | 0x000028df,0x000028e4,0x0004007c,0x00000014, | ||
| 3405 | 0x000028d5,0x000028e5,0x00060041,0x000000d8, | ||
| 3406 | 0x000028cd,0x000028d5,0x000000d7,0x000000d7, | ||
| 3407 | 0x0005003e,0x000028cd,0x000028c2,0x00000002, | ||
| 3408 | 0x00000004,0x00050080,0x00000006,0x00002822, | ||
| 3409 | 0x00002805,0x0000011c,0x00050051,0x00000027, | ||
| 3410 | 0x00002826,0x00002aaa,0x00000001,0x0004007c, | ||
| 3411 | 0x00000006,0x000028eb,0x00002826,0x00050095, | ||
| 3412 | 0x000000a8,0x00002906,0x00002860,0x00002822, | ||
| 3413 | 0x00050051,0x00000006,0x00002907,0x00002906, | ||
| 3414 | 0x00000001,0x00050051,0x00000006,0x00002908, | ||
| 3415 | 0x00002906,0x00000000,0x00050080,0x00000006, | ||
| 3416 | 0x0000290d,0x00002867,0x00002907,0x00050050, | ||
| 3417 | 0x00000007,0x0000290e,0x00002908,0x0000290d, | ||
| 3418 | 0x0004007c,0x00000014,0x000028fe,0x0000290e, | ||
| 3419 | 0x00060041,0x000000d8,0x000028f6,0x000028fe, | ||
| 3420 | 0x000000d7,0x000000d7,0x0005003e,0x000028f6, | ||
| 3421 | 0x000028eb,0x00000002,0x00000004,0x00050080, | ||
| 3422 | 0x00000006,0x00002829,0x00002805,0x00000186, | ||
| 3423 | 0x00050051,0x00000027,0x0000282d,0x00002aaa, | ||
| 3424 | 0x00000002,0x0004007c,0x00000006,0x00002914, | ||
| 3425 | 0x0000282d,0x00050095,0x000000a8,0x0000292f, | ||
| 3426 | 0x00002860,0x00002829,0x00050051,0x00000006, | ||
| 3427 | 0x00002930,0x0000292f,0x00000001,0x00050051, | ||
| 3428 | 0x00000006,0x00002931,0x0000292f,0x00000000, | ||
| 3429 | 0x00050080,0x00000006,0x00002936,0x00002867, | ||
| 3430 | 0x00002930,0x00050050,0x00000007,0x00002937, | ||
| 3431 | 0x00002931,0x00002936,0x0004007c,0x00000014, | ||
| 3432 | 0x00002927,0x00002937,0x00060041,0x000000d8, | ||
| 3433 | 0x0000291f,0x00002927,0x000000d7,0x000000d7, | ||
| 3434 | 0x0005003e,0x0000291f,0x00002914,0x00000002, | ||
| 3435 | 0x00000004,0x000200f9,0x00000a68,0x000200f8, | ||
| 3436 | 0x00000a68,0x000200f9,0x00000a5f,0x000200f8, | ||
| 3437 | 0x00000a5f,0x000200f9,0x00000a56,0x000200f8, | ||
| 3438 | 0x00000a56,0x000200f9,0x00000a4d,0x000200f8, | ||
| 3439 | 0x00000a4d,0x000200f9,0x00000a27,0x000200f8, | ||
| 3440 | 0x00000a27,0x000200f9,0x00000a6e,0x000200f8, | ||
| 3441 | 0x00000a6e,0x000100fd,0x00010038} | ||
diff --git a/runtime/test/allocator_proxy_test.cpp b/runtime/test/allocator_proxy_test.cpp new file mode 100644 index 000000000..733e37cac --- /dev/null +++ b/runtime/test/allocator_proxy_test.cpp | |||
| @@ -0,0 +1,382 @@ | |||
| 1 | // Xbox-ABI command allocator proxies (d3d12_xs_device.h, device slot 9) behind the device proxy, on the Vulkan-backed | ||
| 2 | // device and on the host PC runtime (WARP, and the first hardware adapter when there is one): | ||
| 3 | // - Vulkan device: slot 9 wraps the allocator; the public chain (9 slots) is forwarded with the real allocator's | ||
| 4 | // answers, every slot past it up to the end of the table is refused (E_NOTIMPL), and a read past the table faults | ||
| 5 | // in the guard region and is counted; | ||
| 6 | // - QueryInterface identity, GetDevice -> the device proxy, references and release orders; | ||
| 7 | // - a command list created on the proxy and Reset on it (the Vulkan layer resolves the proxy), recording a buffer | ||
| 8 | // copy that runs through the queue and fence proxies and is read back, twice, with the allocator Reset between; | ||
| 9 | // and D3D12's allocator rules through the proxy (Reset while a list records: E_FAIL; a second list on a busy | ||
| 10 | // allocator: E_INVALIDARG); | ||
| 11 | // - MakeResident/Evict with an allocator proxy give the real allocator's HRESULT; | ||
| 12 | // - host runtime: slot 9 hands out the PC allocator unwrapped (its lists could not resolve a proxy), and the same | ||
| 13 | // copy works. | ||
| 14 | // LEONIDA_VK_VALIDATION=1 runs the Vulkan device under VK_LAYER_KHRONOS_validation with synchronization validation; | ||
| 15 | // any validation error fails the test. Exits 77 when neither a host D3D12 device nor a Vulkan device can be made. | ||
| 16 | // No shaders, game data or Xbox DLLs. | ||
| 17 | #include "vk_test_device.h" | ||
| 18 | #include "../shims/d3d12_com.h" | ||
| 19 | #include "../shims/d3d12_xs_device.h" | ||
| 20 | |||
| 21 | #include <d3d12.h> | ||
| 22 | #include <dxgi1_4.h> | ||
| 23 | |||
| 24 | #include <cstdint> | ||
| 25 | #include <cstdio> | ||
| 26 | #include <cstring> | ||
| 27 | |||
| 28 | #define EXPECT(condition) do { \ | ||
| 29 | if (!(condition)) { std::fprintf(stderr, "%s line %d: %s\n", label, __LINE__, #condition); return 1; } \ | ||
| 30 | } while (0) | ||
| 31 | |||
| 32 | namespace { | ||
| 33 | |||
| 34 | namespace xs = rt::d3d12_xs; | ||
| 35 | |||
| 36 | template <class T> | ||
| 37 | struct Ref { | ||
| 38 | T* p = nullptr; | ||
| 39 | Ref() = default; | ||
| 40 | Ref(const Ref&) = delete; | ||
| 41 | Ref& operator=(const Ref&) = delete; | ||
| 42 | ~Ref() { reset(); } | ||
| 43 | void reset() { | ||
| 44 | if (p) p->Release(); | ||
| 45 | p = nullptr; | ||
| 46 | } | ||
| 47 | T* operator->() const { return p; } | ||
| 48 | }; | ||
| 49 | |||
| 50 | struct Backend { | ||
| 51 | const char* label; | ||
| 52 | ID3D12Device* device; // the device proxy | ||
| 53 | ID3D12Device* real; // the device behind it (PC runtime or Vulkan layer) | ||
| 54 | bool vulkan; | ||
| 55 | }; | ||
| 56 | |||
| 57 | using SlotFn = std::uint64_t(WINAPI*)(void*, std::uint64_t, std::uint64_t, std::uint64_t, std::uint64_t, | ||
| 58 | std::uint64_t, std::uint64_t, std::uint64_t, std::uint64_t, std::uint64_t, | ||
| 59 | std::uint64_t, std::uint64_t, std::uint64_t, std::uint64_t, std::uint64_t); | ||
| 60 | |||
| 61 | // A call through slot `slot` with all words zero, the way a title calls a console method the PC interface lacks. | ||
| 62 | HRESULT call_slot(void* object, unsigned slot) { | ||
| 63 | void** vtable = *reinterpret_cast<void***>(object); | ||
| 64 | return static_cast<HRESULT>(static_cast<std::uint32_t>( | ||
| 65 | reinterpret_cast<SlotFn>(vtable[slot])(object, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))); | ||
| 66 | } | ||
| 67 | |||
| 68 | ULONG_PTR g_fault_address = 0; | ||
| 69 | |||
| 70 | int record_fault(EXCEPTION_POINTERS* info) { | ||
| 71 | g_fault_address = info->ExceptionRecord->NumberParameters >= 2 ? info->ExceptionRecord->ExceptionInformation[1] : 0; | ||
| 72 | return EXCEPTION_EXECUTE_HANDLER; | ||
| 73 | } | ||
| 74 | |||
| 75 | // The read in a function of its own: clang-cl's __try only catches a fault raised inside a call. | ||
| 76 | __declspec(noinline) void* read_entry(void* const* vtable, unsigned slot) { | ||
| 77 | return *static_cast<void* const volatile*>(&vtable[slot]); | ||
| 78 | } | ||
| 79 | |||
| 80 | // Reads vtable[slot] the way a call through it does. The exception code, or 0 when the read worked. | ||
| 81 | DWORD read_slot_guarded(void* const* vtable, unsigned slot) { | ||
| 82 | g_fault_address = 0; | ||
| 83 | __try { | ||
| 84 | void* volatile entry = read_entry(vtable, slot); | ||
| 85 | (void)entry; | ||
| 86 | return 0; | ||
| 87 | } __except (record_fault(GetExceptionInformation())) { | ||
| 88 | return GetExceptionCode(); | ||
| 89 | } | ||
| 90 | } | ||
| 91 | |||
| 92 | int wait_for(const char* label, ID3D12Fence* fence, UINT64 value) { | ||
| 93 | HANDLE event = CreateEventW(nullptr, FALSE, FALSE, nullptr); | ||
| 94 | EXPECT(event != nullptr); | ||
| 95 | const bool set = SUCCEEDED(fence->SetEventOnCompletion(value, event)) && WaitForSingleObject(event, 5000) == 0; | ||
| 96 | CloseHandle(event); | ||
| 97 | EXPECT(set && fence->GetCompletedValue() >= value); | ||
| 98 | return 0; | ||
| 99 | } | ||
| 100 | |||
| 101 | int make_buffer(const char* label, ID3D12Device* device, D3D12_HEAP_TYPE heap_type, D3D12_RESOURCE_STATES state, | ||
| 102 | Ref<ID3D12Resource>& out) { | ||
| 103 | D3D12_HEAP_PROPERTIES heap{}; | ||
| 104 | heap.Type = heap_type; | ||
| 105 | D3D12_RESOURCE_DESC desc{}; | ||
| 106 | desc.Dimension = D3D12_RESOURCE_DIMENSION_BUFFER; | ||
| 107 | desc.Width = 256; | ||
| 108 | desc.Height = desc.DepthOrArraySize = desc.MipLevels = 1; | ||
| 109 | desc.SampleDesc.Count = 1; | ||
| 110 | desc.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR; | ||
| 111 | EXPECT(SUCCEEDED(device->CreateCommittedResource(&heap, D3D12_HEAP_FLAG_NONE, &desc, state, nullptr, | ||
| 112 | IID_PPV_ARGS(&out.p)))); | ||
| 113 | return 0; | ||
| 114 | } | ||
| 115 | |||
| 116 | // One recording on `list` (open, recording into the allocator): 256 bytes of `byte` copied from an upload buffer to a | ||
| 117 | // readback buffer, executed through the queue proxy, finished through the fence proxy at `value`, then compared. | ||
| 118 | int copy_round(const char* label, ID3D12Device* device, ID3D12CommandQueue* queue, ID3D12Fence* fence, | ||
| 119 | ID3D12GraphicsCommandList* list, std::uint8_t byte, UINT64 value) { | ||
| 120 | Ref<ID3D12Resource> upload, readback; | ||
| 121 | if (make_buffer(label, device, D3D12_HEAP_TYPE_UPLOAD, D3D12_RESOURCE_STATE_GENERIC_READ, upload)) return 1; | ||
| 122 | if (make_buffer(label, device, D3D12_HEAP_TYPE_READBACK, D3D12_RESOURCE_STATE_COPY_DEST, readback)) return 1; | ||
| 123 | void* mapped = nullptr; | ||
| 124 | EXPECT(SUCCEEDED(upload->Map(0, nullptr, &mapped)) && mapped); | ||
| 125 | std::memset(mapped, byte, 256); | ||
| 126 | upload->Unmap(0, nullptr); | ||
| 127 | list->CopyBufferRegion(readback.p, 0, upload.p, 0, 256); | ||
| 128 | EXPECT(SUCCEEDED(list->Close())); | ||
| 129 | ID3D12CommandList* lists[] = {list}; | ||
| 130 | queue->ExecuteCommandLists(1, lists); | ||
| 131 | EXPECT(SUCCEEDED(queue->Signal(fence, value))); | ||
| 132 | if (wait_for(label, fence, value)) return 1; | ||
| 133 | const D3D12_RANGE read{0, 256}; | ||
| 134 | EXPECT(SUCCEEDED(readback->Map(0, &read, &mapped)) && mapped); | ||
| 135 | const auto* bytes = static_cast<const std::uint8_t*>(mapped); | ||
| 136 | int wrong = 0; | ||
| 137 | for (int i = 0; i < 256; ++i) wrong += bytes[i] != byte; | ||
| 138 | const D3D12_RANGE none{0, 0}; | ||
| 139 | readback->Unmap(0, &none); | ||
| 140 | EXPECT(wrong == 0); | ||
| 141 | return 0; | ||
| 142 | } | ||
| 143 | |||
| 144 | // ---- 1. The proxy itself: slots, identity, guard (Vulkan device) ---- | ||
| 145 | |||
| 146 | int check_proxy(const Backend& b, ID3D12CommandAllocator* allocator) { | ||
| 147 | const char* label = b.label; | ||
| 148 | ID3D12CommandAllocator* real = xs::allocator_proxy_real_allocator(allocator); | ||
| 149 | EXPECT(real && static_cast<void*>(real) != static_cast<void*>(allocator)); | ||
| 150 | EXPECT(xs::allocator_proxy_slot_count(allocator) == 9); | ||
| 151 | EXPECT(xs::command_object_proxy_ref_count(allocator) == 1); | ||
| 152 | |||
| 153 | // QueryInterface: the base chain and the allocator itself answer with the proxy; anything else is refused. | ||
| 154 | const IID modelled[] = {__uuidof(IUnknown), __uuidof(ID3D12Object), __uuidof(ID3D12DeviceChild), | ||
| 155 | __uuidof(ID3D12Pageable), __uuidof(ID3D12CommandAllocator)}; | ||
| 156 | for (const IID& iid : modelled) { | ||
| 157 | void* same = nullptr; | ||
| 158 | EXPECT(SUCCEEDED(allocator->QueryInterface(iid, &same)) && same == allocator); | ||
| 159 | static_cast<IUnknown*>(same)->Release(); | ||
| 160 | } | ||
| 161 | void* other = reinterpret_cast<void*>(1); | ||
| 162 | EXPECT(allocator->QueryInterface(__uuidof(ID3D12Fence), &other) == E_NOINTERFACE && !other); | ||
| 163 | other = reinterpret_cast<void*>(1); // the Vulkan layer's private tag: not modelled, the real object stays hidden | ||
| 164 | EXPECT(allocator->QueryInterface(xs::kLeonidaCommandAllocatorTag, &other) == E_NOINTERFACE && !other); | ||
| 165 | EXPECT(xs::command_object_proxy_ref_count(allocator) == 1); | ||
| 166 | |||
| 167 | ID3D12Device* owner = nullptr; | ||
| 168 | EXPECT(SUCCEEDED(allocator->GetDevice(IID_PPV_ARGS(&owner))) && owner == b.device); | ||
| 169 | owner->Release(); | ||
| 170 | // Private data and SetName go to the real allocator; the proxy pointer round-trips as an interface. | ||
| 171 | EXPECT(SUCCEEDED(allocator->SetName(L"leonida allocator proxy"))); | ||
| 172 | constexpr GUID key{0x2a6b8c41, 0x77d2, 0x4e19, {0x9c, 0x3a, 0x51, 0xe0, 0x8f, 0x24, 0x6d, 0x0b}}; | ||
| 173 | EXPECT(SUCCEEDED(allocator->SetPrivateDataInterface(key, allocator))); | ||
| 174 | IUnknown* back = nullptr; | ||
| 175 | UINT size = sizeof(back); | ||
| 176 | EXPECT(SUCCEEDED(allocator->GetPrivateData(key, &size, &back)) && back == allocator); | ||
| 177 | back->Release(); | ||
| 178 | EXPECT(SUCCEEDED(allocator->SetPrivateDataInterface(key, nullptr))); | ||
| 179 | |||
| 180 | // The refused tail: every slot past the public chain, up to the table end, is E_NOTIMPL and counted. | ||
| 181 | const unsigned table = xs::allocator_proxy_table_size(); | ||
| 182 | EXPECT(table == 64); | ||
| 183 | for (unsigned slot = 9; slot < table; ++slot) { | ||
| 184 | const std::uint64_t before = xs::allocator_slot_hits(slot); | ||
| 185 | EXPECT(call_slot(allocator, slot) == E_NOTIMPL); | ||
| 186 | EXPECT(xs::allocator_slot_hits(slot) == before + 1 && xs::allocator_slot_first_call_seen(slot)); | ||
| 187 | } | ||
| 188 | |||
| 189 | // Past the table: the vtable read itself faults in the guard region, at the slot's address, and is counted. | ||
| 190 | EXPECT(xs::command_object_tables_guarded()); | ||
| 191 | void* const* vtable = *reinterpret_cast<void* const* const*>(allocator); | ||
| 192 | EXPECT(read_slot_guarded(vtable, table - 1) == 0); | ||
| 193 | for (unsigned slot : {table, table + 512, table + 7000}) { | ||
| 194 | const std::uint64_t before = xs::allocator_table_overruns(); | ||
| 195 | EXPECT(read_slot_guarded(vtable, slot) == EXCEPTION_ACCESS_VIOLATION); | ||
| 196 | EXPECT(g_fault_address == reinterpret_cast<ULONG_PTR>(&vtable[slot])); | ||
| 197 | EXPECT(xs::allocator_table_overruns() == before + 1); | ||
| 198 | } | ||
| 199 | std::printf("%s: allocator proxy: 9 public slots forwarded, slots 9-%u refused, the guard region names a read " | ||
| 200 | "past the table; QueryInterface/GetDevice/private data keep the proxy identity\n", label, table - 1); | ||
| 201 | return 0; | ||
| 202 | } | ||
| 203 | |||
| 204 | // ---- 2. Lists on the allocator, GPU work, D3D12's allocator rules, residency ---- | ||
| 205 | |||
| 206 | int check_backend(const Backend& b) { | ||
| 207 | const char* label = b.label; | ||
| 208 | const unsigned long device_refs = xs::device_proxy_ref_count(b.device); | ||
| 209 | { | ||
| 210 | Ref<ID3D12CommandAllocator> allocator; | ||
| 211 | EXPECT(SUCCEEDED(b.device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, | ||
| 212 | IID_PPV_ARGS(&allocator.p)))); | ||
| 213 | // Vulkan layer: wrapped. Host runtime: its lists could not resolve a proxy, so the PC allocator comes back. | ||
| 214 | EXPECT(xs::is_allocator_proxy(allocator.p) == b.vulkan); | ||
| 215 | if (b.vulkan && check_proxy(b, allocator.p)) return 1; | ||
| 216 | // As IUnknown, and without an output (the device's own answer), as slot 8 does for queues. | ||
| 217 | Ref<IUnknown> as_unknown; | ||
| 218 | EXPECT(SUCCEEDED(b.device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, __uuidof(IUnknown), | ||
| 219 | reinterpret_cast<void**>(&as_unknown.p)))); | ||
| 220 | EXPECT(xs::is_allocator_proxy(as_unknown.p) == b.vulkan); | ||
| 221 | #pragma warning(suppress : 6387) // the null output on purpose | ||
| 222 | EXPECT(b.device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, __uuidof(ID3D12CommandAllocator), | ||
| 223 | nullptr) == | ||
| 224 | b.real->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, __uuidof(ID3D12CommandAllocator), | ||
| 225 | nullptr)); | ||
| 226 | Ref<ID3D12Fence> not_an_allocator; // asked for an interface the allocator does not have | ||
| 227 | not_an_allocator.p = reinterpret_cast<ID3D12Fence*>(1); | ||
| 228 | const HRESULT wrong_iid = b.device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, | ||
| 229 | IID_PPV_ARGS(¬_an_allocator.p)); | ||
| 230 | const bool cleared = !not_an_allocator.p; | ||
| 231 | not_an_allocator.p = nullptr; | ||
| 232 | EXPECT(FAILED(wrong_iid) && cleared); | ||
| 233 | |||
| 234 | D3D12_COMMAND_QUEUE_DESC queue_desc{}; | ||
| 235 | Ref<ID3D12CommandQueue> queue; | ||
| 236 | Ref<ID3D12Fence> fence; | ||
| 237 | EXPECT(SUCCEEDED(b.device->CreateCommandQueue(&queue_desc, IID_PPV_ARGS(&queue.p)))); | ||
| 238 | EXPECT(SUCCEEDED(b.device->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&fence.p)))); | ||
| 239 | EXPECT(xs::is_queue_proxy(queue.p) && xs::is_fence_proxy(fence.p)); | ||
| 240 | |||
| 241 | // A list on the allocator: the Vulkan layer resolves the proxy in CreateCommandList. | ||
| 242 | Ref<ID3D12GraphicsCommandList> list; | ||
| 243 | EXPECT(SUCCEEDED(b.device->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, allocator.p, nullptr, | ||
| 244 | IID_PPV_ARGS(&list.p)))); | ||
| 245 | // D3D12's rules, through the proxy: a recording list holds the allocator. | ||
| 246 | const std::uint64_t resets_before = xs::allocator_slot_hits(8); | ||
| 247 | EXPECT(allocator->Reset() == E_FAIL); | ||
| 248 | Ref<ID3D12GraphicsCommandList> second; | ||
| 249 | EXPECT(b.device->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, allocator.p, nullptr, | ||
| 250 | IID_PPV_ARGS(&second.p)) == E_INVALIDARG && !second.p); | ||
| 251 | if (copy_round(label, b.device, queue.p, fence.p, list.p, 0x5a, 1)) return 1; | ||
| 252 | |||
| 253 | // Done on the GPU: the allocator resets through the proxy, and the list resets onto it (Reset resolves it). | ||
| 254 | EXPECT(SUCCEEDED(allocator->Reset())); | ||
| 255 | EXPECT(SUCCEEDED(list->Reset(allocator.p, nullptr))); | ||
| 256 | if (copy_round(label, b.device, queue.p, fence.p, list.p, 0xa5, 2)) return 1; | ||
| 257 | // The two allocator Reset calls above went through slot 8 (list->Reset is the list's method, not this one). | ||
| 258 | if (b.vulkan) EXPECT(xs::allocator_slot_hits(8) == resets_before + 2); | ||
| 259 | |||
| 260 | // Residency: the real runtime gets the real allocator (an allocator is a pageable). | ||
| 261 | ID3D12Pageable* pageable = allocator.p; | ||
| 262 | ID3D12CommandAllocator* real_allocator = | ||
| 263 | b.vulkan ? xs::allocator_proxy_real_allocator(allocator.p) : allocator.p; | ||
| 264 | ID3D12Pageable* real_pageable = real_allocator; | ||
| 265 | EXPECT(b.device->MakeResident(1, &pageable) == b.real->MakeResident(1, &real_pageable)); | ||
| 266 | EXPECT(b.device->Evict(1, &pageable) == b.real->Evict(1, &real_pageable)); | ||
| 267 | |||
| 268 | // Release orders: the allocator first while its (closed) list still exists, then the list. | ||
| 269 | if (b.vulkan) EXPECT(xs::command_object_proxy_ref_count(allocator.p) == 1); | ||
| 270 | allocator.reset(); | ||
| 271 | list.reset(); | ||
| 272 | } | ||
| 273 | EXPECT(xs::device_proxy_ref_count(b.device) == device_refs); // nothing the proxies made kept the device | ||
| 274 | std::printf("%s: CreateCommandAllocator %s; a list created and Reset on it, two GPU copies through the queue and " | ||
| 275 | "fence proxies read back exactly; allocator rules and residency as on the real allocator\n", label, | ||
| 276 | b.vulkan ? "returns an allocator proxy" : "returns the PC allocator unwrapped"); | ||
| 277 | return 0; | ||
| 278 | } | ||
| 279 | |||
| 280 | int run_host(IDXGIAdapter1* adapter, const char* label) { | ||
| 281 | ID3D12Device* real = nullptr; | ||
| 282 | if (FAILED(D3D12CreateDevice(adapter, D3D_FEATURE_LEVEL_11_0, IID_PPV_ARGS(&real)))) { | ||
| 283 | std::printf("%s: no D3D12 device, skipped\n", label); | ||
| 284 | return 77; | ||
| 285 | } | ||
| 286 | real->AddRef(); // the backend's own reference; the proxy takes the other | ||
| 287 | Ref<ID3D12Device> device; | ||
| 288 | if (FAILED(xs::create_device_proxy(real, __uuidof(ID3D12Device), reinterpret_cast<void**>(&device.p)))) { | ||
| 289 | real->Release(); | ||
| 290 | real->Release(); | ||
| 291 | std::fprintf(stderr, "%s: device proxy creation failed\n", label); | ||
| 292 | return 1; | ||
| 293 | } | ||
| 294 | const int result = check_backend(Backend{label, device.p, real, false}); | ||
| 295 | device.reset(); | ||
| 296 | if (result) return 1; | ||
| 297 | if (real->Release() != 0) { | ||
| 298 | std::fprintf(stderr, "%s: the PC device outlives its proxies\n", label); | ||
| 299 | return 1; | ||
| 300 | } | ||
| 301 | return 0; | ||
| 302 | } | ||
| 303 | |||
| 304 | } // namespace | ||
| 305 | |||
| 306 | // A failure ends the process with a message on stderr, never in a dialog a test run would wait on. | ||
| 307 | static void no_dialogs() { | ||
| 308 | _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); | ||
| 309 | SetErrorMode(GetErrorMode() | SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX); | ||
| 310 | } | ||
| 311 | |||
| 312 | int main() { | ||
| 313 | no_dialogs(); | ||
| 314 | std::setvbuf(stdout, nullptr, _IONBF, 0); | ||
| 315 | const char* label = "allocator_proxy_test"; | ||
| 316 | int ran = 0; | ||
| 317 | |||
| 318 | // Host PC runtime: WARP, then the first hardware adapter. Under Wine the host d3d12.dll is Wine's own, not the | ||
| 319 | // PC runtime the proxy is written against, so only Vulkan runs there. | ||
| 320 | const bool wine = GetProcAddress(GetModuleHandleW(L"ntdll.dll"), "wine_get_version") != nullptr; | ||
| 321 | Ref<IDXGIFactory4> factory; | ||
| 322 | if (wine) std::printf("host D3D12: under Wine, skipped\n"); | ||
| 323 | if (!wine && SUCCEEDED(CreateDXGIFactory1(IID_PPV_ARGS(&factory.p)))) { | ||
| 324 | Ref<IDXGIAdapter1> warp; | ||
| 325 | if (SUCCEEDED(factory->EnumWarpAdapter(IID_PPV_ARGS(&warp.p)))) { | ||
| 326 | const int r = run_host(warp.p, "host WARP"); | ||
| 327 | if (r == 1) return 1; | ||
| 328 | ran += r == 0; | ||
| 329 | } | ||
| 330 | for (UINT i = 0;; ++i) { | ||
| 331 | Ref<IDXGIAdapter1> adapter; | ||
| 332 | if (factory->EnumAdapters1(i, &adapter.p) == DXGI_ERROR_NOT_FOUND) break; | ||
| 333 | DXGI_ADAPTER_DESC1 desc{}; | ||
| 334 | if (FAILED(adapter->GetDesc1(&desc)) || (desc.Flags & DXGI_ADAPTER_FLAG_SOFTWARE)) continue; | ||
| 335 | char name[128] = {}; | ||
| 336 | WideCharToMultiByte(CP_UTF8, 0, desc.Description, -1, name, sizeof(name) - 1, nullptr, nullptr); | ||
| 337 | char host_label[160]; | ||
| 338 | std::snprintf(host_label, sizeof(host_label), "host %s", name); | ||
| 339 | const int r = run_host(adapter.p, host_label); | ||
| 340 | if (r == 1) return 1; | ||
| 341 | ran += r == 0; | ||
| 342 | break; | ||
| 343 | } | ||
| 344 | } | ||
| 345 | |||
| 346 | // The Vulkan-backed device, the way D3D12XboxCreateDevice hands it out with LEONIDA_D3D12=vulkan. | ||
| 347 | vktest::Device d; | ||
| 348 | if (d.create()) { | ||
| 349 | label = "Vulkan"; | ||
| 350 | rt::d3d12::VulkanDeviceInfo info{}; | ||
| 351 | info.get_instance_proc = d.instance_proc; | ||
| 352 | info.instance = d.instance; | ||
| 353 | info.physical = d.physical; | ||
| 354 | info.device = d.device; | ||
| 355 | info.queue = d.queue; | ||
| 356 | info.queue_family = d.family; | ||
| 357 | ID3D12Device* inner = nullptr; | ||
| 358 | EXPECT(SUCCEEDED(rt::d3d12::create_vulkan_device(info, IID_PPV_ARGS(&inner)))); | ||
| 359 | inner->AddRef(); // the backend's own reference; the proxy takes the other | ||
| 360 | ID3D12Device* device = nullptr; | ||
| 361 | EXPECT(SUCCEEDED(xs::create_device_proxy(inner, __uuidof(ID3D12Device), reinterpret_cast<void**>(&device)))); | ||
| 362 | rt::d3d12::set_device_outer(inner, device); | ||
| 363 | const int result = check_backend(Backend{label, device, inner, true}); | ||
| 364 | device->Release(); | ||
| 365 | if (result) return 1; | ||
| 366 | EXPECT(inner->Release() == 0); // nothing the proxies made kept the layer's device alive | ||
| 367 | ++ran; | ||
| 368 | if (d.validation_errors()) { | ||
| 369 | std::fprintf(stderr, "%u validation errors\n", d.validation_errors()); | ||
| 370 | return 1; | ||
| 371 | } | ||
| 372 | } else { | ||
| 373 | std::printf("Vulkan: no device, skipped\n"); | ||
| 374 | } | ||
| 375 | |||
| 376 | if (!ran) { | ||
| 377 | std::printf("SKIP allocator_proxy_test: neither a host D3D12 device nor a Vulkan device\n"); | ||
| 378 | return 77; | ||
| 379 | } | ||
| 380 | std::printf("allocator_proxy_test: %d backend(s) passed\n", ran); | ||
| 381 | return 0; | ||
| 382 | } | ||
diff --git a/runtime/test/bindless_sizing_test.cpp b/runtime/test/bindless_sizing_test.cpp index 469274d56..07715f01e 100644 --- a/runtime/test/bindless_sizing_test.cpp +++ b/runtime/test/bindless_sizing_test.cpp | |||
| @@ -172,6 +172,37 @@ int main() { | |||
| 172 | EXPECT(totals(f).all <= 30000 && count(f, D::dim_2d) > 4096); | 172 | EXPECT(totals(f).all <= 30000 && count(f, D::dim_2d) > 4096); |
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | // D3D-219: past maxPerSetDescriptors, growth follows layout_supported (vkGetDescriptorSetLayoutSupport), which | ||
| 176 | // is asked only above that limit. Intel's Xe-LP reports 6159 and supports the full sizes. | ||
| 177 | { | ||
| 178 | Device d = uniform(1048576, 1048576); | ||
| 179 | d.v11.maxPerSetDescriptors = 6159; | ||
| 180 | d.limits.maxSamplerAllocationCount = 4000; | ||
| 181 | unsigned asked = 0, asked_within = 0; | ||
| 182 | const auto all_supported = [&](const BindlessFeatures& candidate) { | ||
| 183 | ++asked; | ||
| 184 | asked_within += totals(candidate).all <= 6159; | ||
| 185 | return true; | ||
| 186 | }; | ||
| 187 | BindlessFeatures f = with_ms(true); | ||
| 188 | EXPECT(bindless::size_bindings(f, d.limits, d.v11, d.v12, all_supported)); | ||
| 189 | EXPECT(asked > 0 && asked_within == 0); | ||
| 190 | EXPECT(count(f, D::dim_2d) == bindless::max_2d_images && | ||
| 191 | f.counts[bindless::sampler_binding] == 4000 - bindless::reserved_samplers); | ||
| 192 | EXPECT(storage(f, D::dim_2d) == bindless::max_storage_indices && storage_consistent(f)); | ||
| 193 | |||
| 194 | // A driver that supports less: growth stops where it says no. | ||
| 195 | const auto up_to_20000 = [&](const BindlessFeatures& candidate) { return totals(candidate).all <= 20000; }; | ||
| 196 | f = with_ms(true); | ||
| 197 | EXPECT(bindless::size_bindings(f, d.limits, d.v11, d.v12, up_to_20000)); | ||
| 198 | EXPECT(totals(f).all <= 20000 && totals(f).all > 6159 && count(f, D::dim_2d) > 4096); | ||
| 199 | |||
| 200 | // Without the callback, maxPerSetDescriptors still caps growth as before. | ||
| 201 | f = with_ms(true); | ||
| 202 | EXPECT(bindless::size_bindings(f, d.limits, d.v11, d.v12)); | ||
| 203 | EXPECT(totals(f).all <= 6159 || (count(f, D::dim_2d) == 4096 && f.counts[bindless::sampler_binding] == 1024)); | ||
| 204 | } | ||
| 205 | |||
| 175 | // The default features are today's counts, which the device-less users (vk_image_fuzz) still get. | 206 | // The default features are today's counts, which the device-less users (vk_image_fuzz) still get. |
| 176 | EXPECT(BindlessFeatures{}.counts == defaults); | 207 | EXPECT(BindlessFeatures{}.counts == defaults); |
| 177 | std::printf("bindless sizing: synthetic limits gave the expected counts\n"); | 208 | std::printf("bindless sizing: synthetic limits gave the expected counts\n"); |
diff --git a/runtime/test/bink_audio_test.cpp b/runtime/test/bink_audio_test.cpp index 2156e5eff..8616d9165 100644 --- a/runtime/test/bink_audio_test.cpp +++ b/runtime/test/bink_audio_test.cpp | |||
| @@ -237,7 +237,7 @@ int main() { | |||
| 237 | header.flags[i]); | 237 | header.flags[i]); |
| 238 | if (!header.audio_tracks) { | 238 | if (!header.audio_tracks) { |
| 239 | std::printf("SKIP (movie has no audio tracks)\n"); | 239 | std::printf("SKIP (movie has no audio tracks)\n"); |
| 240 | return 0; | 240 | return 77; // nothing was checked: a ctest SKIP (SKIP_RETURN_CODE 77), not a pass |
| 241 | } | 241 | } |
| 242 | 242 | ||
| 243 | try { | 243 | try { |
diff --git a/runtime/test/check_d3d12_trace.py b/runtime/test/check_d3d12_trace.py index c32536464..d24e02058 100644 --- a/runtime/test/check_d3d12_trace.py +++ b/runtime/test/check_d3d12_trace.py | |||
| @@ -50,6 +50,8 @@ def main(): | |||
| 50 | ] | 50 | ] |
| 51 | else: | 51 | else: |
| 52 | expected = [ | 52 | expected = [ |
| 53 | "ID3D12GraphicsCommandList::SetPipelineState called", | ||
| 54 | "ID3D12GraphicsCommandList::SetGraphicsRootSignature called", | ||
| 53 | "ID3D12GraphicsCommandList::SetMarker called", | 55 | "ID3D12GraphicsCommandList::SetMarker called", |
| 54 | "ID3D12GraphicsCommandList3::SetProtectedResourceSession unsupported", | 56 | "ID3D12GraphicsCommandList3::SetProtectedResourceSession unsupported", |
| 55 | "ID3D12GraphicsCommandList3::SetProtectedResourceSession unsupported", | 57 | "ID3D12GraphicsCommandList3::SetProtectedResourceSession unsupported", |
diff --git a/runtime/test/check_texture_readback_sync.cmake b/runtime/test/check_texture_readback_sync.cmake index f82156789..81ef3f24e 100644 --- a/runtime/test/check_texture_readback_sync.cmake +++ b/runtime/test/check_texture_readback_sync.cmake | |||
| @@ -1,10 +1,11 @@ | |||
| 1 | # Run with -DTOOL=<vk_texture_test> -DSPIRV=<directory built by the GPU suite> | 1 | # Run with -DTOOL=<vk_texture_test> -DSPIRV=<directory built by the GPU suite> |
| 2 | # -DOUTPUT=<readback file> -P runtime/test/check_texture_readback_sync.cmake. | 2 | # -DOUTPUT=<readback file> -P runtime/test/check_texture_readback_sync.cmake. |
| 3 | # For a cross build, pass the configured emulator as "-DRUNNER=<emulator;args>". | ||
| 3 | # Requires the Khronos validation layer and a device that supports the texture harness. | 4 | # Requires the Khronos validation layer and a device that supports the texture harness. |
| 4 | execute_process( | 5 | execute_process( |
| 5 | COMMAND "${CMAKE_COMMAND}" -E env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation | 6 | COMMAND "${CMAKE_COMMAND}" -E env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation |
| 6 | VK_LOADER_DEBUG=layer VK_LAYER_ENABLES=VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT | 7 | VK_LOADER_DEBUG=layer VK_LAYER_ENABLES=VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT |
| 7 | "${TOOL}" cube "${OUTPUT}" | 8 | ${RUNNER} "${TOOL}" cube "${OUTPUT}" |
| 8 | WORKING_DIRECTORY "${SPIRV}" TIMEOUT 90 | 9 | WORKING_DIRECTORY "${SPIRV}" TIMEOUT 90 |
| 9 | RESULT_VARIABLE code OUTPUT_VARIABLE log ERROR_VARIABLE log) | 10 | RESULT_VARIABLE code OUTPUT_VARIABLE log ERROR_VARIABLE log) |
| 10 | if(NOT code STREQUAL "0" OR NOT log MATCHES "vk_texture_test cube: PASSED" | 11 | if(NOT code STREQUAL "0" OR NOT log MATCHES "vk_texture_test cube: PASSED" |
diff --git a/runtime/test/check_vk_pipeline_cli.cmake b/runtime/test/check_vk_pipeline_cli.cmake new file mode 100644 index 000000000..8c98ba1eb --- /dev/null +++ b/runtime/test/check_vk_pipeline_cli.cmake | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | file(MAKE_DIRECTORY "${TEST_DIR}") | ||
| 2 | file(WRITE "${TEST_DIR}/index.json" "not JSON\n") | ||
| 3 | |||
| 4 | # ${RUNNER} is CMAKE_CROSSCOMPILING_EMULATOR: CTest does not apply it to a script | ||
| 5 | # test (the command is the host CMake), so the script runs the tool through it itself. | ||
| 6 | function(check_invalid option) | ||
| 7 | execute_process(COMMAND ${RUNNER} "${TOOL}" "${TEST_DIR}" "${option}" ${ARGN} | ||
| 8 | RESULT_VARIABLE code OUTPUT_VARIABLE log ERROR_VARIABLE log TIMEOUT 5) | ||
| 9 | if(NOT code STREQUAL "2" OR NOT log MATCHES "${option} requires a valid value") | ||
| 10 | message(FATAL_ERROR "${option} ${ARGN}: expected usage error, got ${code}\n${log}") | ||
| 11 | endif() | ||
| 12 | endfunction() | ||
| 13 | |||
| 14 | check_invalid(--count) | ||
| 15 | check_invalid(--count --compute-only) | ||
| 16 | check_invalid(--count 18446744073709551616) | ||
| 17 | check_invalid(--jobs 4294967296) | ||
| 18 | check_invalid(--start -1) | ||
| 19 | check_invalid(--max-bytes 1MiB) | ||
| 20 | check_invalid(--large-module-bytes -1) | ||
| 21 | check_invalid(--slow nonsense) | ||
| 22 | check_invalid(--slow nan) | ||
| 23 | check_invalid(--slow -0.5) | ||
| 24 | check_invalid(--stage --graphics-only) | ||
| 25 | check_invalid(--stats) | ||
| 26 | |||
| 27 | execute_process(COMMAND ${RUNNER} "${TOOL}" "${TEST_DIR}" | ||
| 28 | --jobs 2 --start 3 --count 0 --max-bytes 0 --large-module-bytes 0 | ||
| 29 | --slow 0.5 --stage cs --stats report.csv | ||
| 30 | RESULT_VARIABLE code OUTPUT_VARIABLE log ERROR_VARIABLE log TIMEOUT 5) | ||
| 31 | # The index parser names the file and where it stopped (#1847: "index.json: expected '{' at byte 0"). | ||
| 32 | if(NOT code STREQUAL "2" OR NOT log MATCHES "index.json: ") | ||
| 33 | message(FATAL_ERROR "Expected valid arguments to reach the malformed index, got ${code}\n${log}") | ||
| 34 | endif() | ||
diff --git a/runtime/test/d3d12_buffer_uav_test.cpp b/runtime/test/d3d12_buffer_uav_test.cpp new file mode 100644 index 000000000..cf936012a --- /dev/null +++ b/runtime/test/d3d12_buffer_uav_test.cpp | |||
| @@ -0,0 +1,699 @@ | |||
| 1 | // Typed buffer UAVs and UAV counters (docs/d3d12_vulkan.md section 3.4, "Buffer UAVs"), through the D3D12 API on the | ||
| 2 | // proxy, with compute shaders that are translator output (test/shaders/cs_buf_typed.asm and cs_buf_counter.asm, | ||
| 3 | // hand-written RDNA2), plus D3D12-only behaviour compared with the host runtime on the same adapter. | ||
| 4 | // | ||
| 5 | // Part 1, one DIRECT list: a compute root signature (four root constants and a table of six UAVs), two compute PSOs. | ||
| 6 | // cs_buf_typed writes typed buffer views (R32_UINT with an atomic add, R16G16B16A16_FLOAT, R8G8B8A8_UNORM from | ||
| 7 | // FirstElement 16, R32G32B32A32_UINT, R32_SINT) and reads an R32_FLOAT view. Two views are shorter | ||
| 8 | // than the dispatch (240 and 250 elements of 256): the V#'s NUM_RECORDS is the bound, so stores past | ||
| 9 | // it leave the buffer's sentinel and loads past it give 0. | ||
| 10 | // cs_buf_counter a structured UAV with a counter at CounterOffsetInBytes 4096 of another buffer: 256 lanes append | ||
| 11 | // (buffer_atomic_add on the counter V# in the slot's upper half, store at the returned index), then | ||
| 12 | // 128 lanes consume (buffer_atomic_sub, load the record just below). "CopyStructureCount" in D3D12 | ||
| 13 | // is CopyBufferRegion of the counter's 4 bytes into a buffer: read after the append (256) and after | ||
| 14 | // the consume (128). Lane order is up to the GPU, so records are compared as sets. | ||
| 15 | // Everything is compared with a CPU reference, word by word, error 0. | ||
| 16 | // Part 2, the layer's device (no proxy) and the host runtime on the SAME adapter (LUID): typed buffer UAVs created with | ||
| 17 | // CreateUnorderedAccessView and cleared with ClearUnorderedAccessViewUint / Float (thirteen formats, sub-ranges, an | ||
| 18 | // element range ending off a word boundary), and a structured UAV with a counter: a clear of the structured view and | ||
| 19 | // of the counter's own word through a raw view. The bytes read back are compared with the host's; with no host D3D12 | ||
| 20 | // the layer's are compared with the model of uav_clear.h. | ||
| 21 | // Set LEONIDA_VK_VALIDATION=1 to run under VK_LAYER_KHRONOS_validation (0 errors required). | ||
| 22 | #include "vk_test_device.h" | ||
| 23 | #include "d3d12_test_shaders.h" | ||
| 24 | #include "d3d12_copy_compare.h" | ||
| 25 | #include "../shims/d3d12_com.h" | ||
| 26 | #include "../shims/d3d12_xs_device.h" | ||
| 27 | #include "../src/gfx10_descriptors.h" | ||
| 28 | #include "../src/shader_library.h" | ||
| 29 | #include "../src/uav_clear.h" | ||
| 30 | |||
| 31 | #include <algorithm> | ||
| 32 | #include <array> | ||
| 33 | #include <bit> | ||
| 34 | #include <cmath> | ||
| 35 | #include <cstring> | ||
| 36 | |||
| 37 | #ifndef LEONIDA_TEST_BUFFER_UAV_DIR | ||
| 38 | #error "LEONIDA_TEST_BUFFER_UAV_DIR must name the folder build.py wrote (spirv/index.json, fssm/cs_*.fssm)" | ||
| 39 | #endif | ||
| 40 | |||
| 41 | #define EXPECT(condition) do { \ | ||
| 42 | if (!(condition)) { std::fprintf(stderr, "line %d: %s\n", __LINE__, #condition); return 1; } \ | ||
| 43 | } while (0) | ||
| 44 | |||
| 45 | using namespace d3d12test; | ||
| 46 | using XboxHeapHandleFn = std::uint64_t(WINAPI*)(void* heap); // heap slots 9/10: handle in RAX | ||
| 47 | namespace g = leonida::gfx10; | ||
| 48 | namespace uc = leonida::uav_clear; | ||
| 49 | |||
| 50 | namespace { | ||
| 51 | |||
| 52 | std::vector<std::uint8_t> read_file(const std::filesystem::path& path) { | ||
| 53 | std::ifstream in(path, std::ios::binary); | ||
| 54 | return {std::istreambuf_iterator<char>(in), std::istreambuf_iterator<char>()}; | ||
| 55 | } | ||
| 56 | |||
| 57 | constexpr UINT lanes = 256; | ||
| 58 | constexpr UINT seed = 0x00c0ffee, multiplier = 0x01000193; | ||
| 59 | constexpr std::uint32_t sentinel = 0xa5a5a5a5u; | ||
| 60 | constexpr UINT out0_elements = 240, in4_elements = 250, out2_first = 16; | ||
| 61 | constexpr UINT64 counter_offset = 4096, counter_buffer_bytes = 8192; | ||
| 62 | constexpr UINT consumed = 128; | ||
| 63 | |||
| 64 | // The buffers of part 1: sizes, in the order of their slices of the upload and of the readback buffer. | ||
| 65 | enum Buf { out0, out1, out2, out3, in4, out5, records, counter, consumed_out, buffer_count }; | ||
| 66 | constexpr UINT64 sizes[buffer_count] = {lanes * 4, lanes * 8, (out2_first + lanes) * 4, lanes * 16, lanes * 4, | ||
| 67 | lanes * 4, lanes * 8, counter_buffer_bytes, consumed * 8}; | ||
| 68 | constexpr UINT64 slice(Buf which) { | ||
| 69 | UINT64 at = 0; | ||
| 70 | for (int i = 0; i < which; ++i) at += (sizes[i] + 255) / 256 * 256; | ||
| 71 | return at; | ||
| 72 | } | ||
| 73 | constexpr UINT64 total_bytes = slice(consumed_out) + (sizes[consumed_out] + 255) / 256 * 256; | ||
| 74 | constexpr UINT64 count_after_append = total_bytes, count_after_consume = total_bytes + 4; | ||
| 75 | constexpr UINT64 readback_bytes = total_bytes + 8; | ||
| 76 | |||
| 77 | std::uint16_t half_bits(float value) { // exact for the values the reference uses (finite, in the normal range) | ||
| 78 | const std::uint32_t f = std::bit_cast<std::uint32_t>(value); | ||
| 79 | if (!(f & 0x7fffffffu)) return std::uint16_t(f >> 16); | ||
| 80 | const int exponent = int((f >> 23) & 0xff) - 127 + 15; | ||
| 81 | return std::uint16_t(((f >> 16) & 0x8000) | (exponent << 10) | ((f >> 13) & 0x3ff)); | ||
| 82 | } | ||
| 83 | |||
| 84 | float input_value(UINT g) { return float(g) - 100.5f; } | ||
| 85 | |||
| 86 | struct Reference { | ||
| 87 | std::vector<std::uint32_t> words[buffer_count]; | ||
| 88 | }; | ||
| 89 | |||
| 90 | Reference reference() { | ||
| 91 | Reference ref; | ||
| 92 | for (int i = 0; i < buffer_count; ++i) ref.words[i].assign(sizes[i] / 4, sentinel); | ||
| 93 | for (UINT g = 0; g < lanes; ++g) { | ||
| 94 | if (g < out0_elements) ref.words[out0][g] = (g * multiplier + seed) + g; | ||
| 95 | const float x = float(g); | ||
| 96 | ref.words[out1][g * 2] = half_bits(x) | std::uint32_t(half_bits(x + 0.5f)) << 16; | ||
| 97 | ref.words[out1][g * 2 + 1] = half_bits(-1.0f - x) | std::uint32_t(half_bits(0.25f)) << 16; | ||
| 98 | const std::uint32_t k = g & 255; | ||
| 99 | ref.words[out2][out2_first + g] = k | (255 - k) << 8 | 0xff000000u; | ||
| 100 | ref.words[out3][g * 4 + 0] = g; | ||
| 101 | ref.words[out3][g * 4 + 1] = g ^ 0xffff; | ||
| 102 | ref.words[out3][g * 4 + 2] = g * 7; | ||
| 103 | ref.words[out3][g * 4 + 3] = 0xa5; | ||
| 104 | ref.words[in4][g] = std::bit_cast<std::uint32_t>(input_value(g)); | ||
| 105 | ref.words[out5][g] = g < in4_elements ? std::uint32_t(int(2.0f * input_value(g))) : 0; | ||
| 106 | } | ||
| 107 | return ref; | ||
| 108 | } | ||
| 109 | |||
| 110 | D3D12_RESOURCE_BARRIER uav_barrier(ID3D12Resource* resource) { | ||
| 111 | D3D12_RESOURCE_BARRIER b{}; | ||
| 112 | b.Type = D3D12_RESOURCE_BARRIER_TYPE_UAV; | ||
| 113 | b.UAV.pResource = resource; | ||
| 114 | return b; | ||
| 115 | } | ||
| 116 | |||
| 117 | D3D12_UNORDERED_ACCESS_VIEW_DESC buffer_view(DXGI_FORMAT format, UINT64 first, UINT count, UINT stride, | ||
| 118 | UINT64 counter_at = 0, D3D12_BUFFER_UAV_FLAGS flags = D3D12_BUFFER_UAV_FLAG_NONE) { | ||
| 119 | D3D12_UNORDERED_ACCESS_VIEW_DESC view{}; | ||
| 120 | view.Format = format; | ||
| 121 | view.ViewDimension = D3D12_UAV_DIMENSION_BUFFER; | ||
| 122 | view.Buffer = {first, count, stride, counter_at, flags}; | ||
| 123 | return view; | ||
| 124 | } | ||
| 125 | |||
| 126 | // What a V# in a slot says, as the shader loads it. | ||
| 127 | struct Vsharp { | ||
| 128 | std::uint64_t address; | ||
| 129 | std::uint32_t stride, records, format, oob; | ||
| 130 | }; | ||
| 131 | Vsharp vsharp(const void* slot_pointer, unsigned dword = 0) { | ||
| 132 | std::uint32_t w[4]; | ||
| 133 | std::memcpy(w, static_cast<const std::uint32_t*>(slot_pointer) + dword, sizeof(w)); | ||
| 134 | return {(std::uint64_t(w[1] & 0xffff) << 32) | w[0], w[1] >> 16 & 0x3fff, w[2], w[3] >> 12 & 0x7f, w[3] >> 28 & 3}; | ||
| 135 | } | ||
| 136 | |||
| 137 | // ---- part 1 ----------------------------------------------------------------------------------------------------- | ||
| 138 | |||
| 139 | int run_shaders(vktest::Device& d, const std::filesystem::path& root_dir, unsigned& words_checked) { | ||
| 140 | leonida::ShaderLibrary library; | ||
| 141 | EXPECT(library.load((root_dir / "spirv").string())); | ||
| 142 | const auto program = [&](const char* name) { return read_file(root_dir / "fssm" / (std::string(name) + ".fssm")); }; | ||
| 143 | const auto typed_fssm = program("cs_buf_typed"), counter_fssm = program("cs_buf_counter"); | ||
| 144 | EXPECT(typed_fssm.size() >= 0x150 && counter_fssm.size() >= 0x150 && typed_fssm != counter_fssm); | ||
| 145 | EXPECT(library.find("cs", leonida::sha256_hex(typed_fssm)) && library.find("cs", leonida::sha256_hex(counter_fssm))); | ||
| 146 | const auto typed_container = shader_container(typed_fssm), counter_container = shader_container(counter_fssm); | ||
| 147 | |||
| 148 | rt::d3d12::VulkanDeviceInfo info{}; | ||
| 149 | info.get_instance_proc = d.instance_proc; | ||
| 150 | info.instance = d.instance; | ||
| 151 | info.physical = d.physical; | ||
| 152 | info.device = d.device; | ||
| 153 | info.queue = d.queue; | ||
| 154 | info.queue_family = d.family; | ||
| 155 | info.buffer_device_address = true; | ||
| 156 | info.bindless = d.bindless; | ||
| 157 | info.bindless_partially_bound = d.partially_bound; | ||
| 158 | info.image_view_min_lod = d.image_view_min_lod; | ||
| 159 | info.shader_dir = (root_dir / "spirv").string(); | ||
| 160 | ID3D12Device* inner = nullptr; | ||
| 161 | EXPECT(SUCCEEDED(rt::d3d12::create_vulkan_device(info, IID_PPV_ARGS(&inner)))); | ||
| 162 | Ref<ID3D12Device> device; | ||
| 163 | EXPECT(SUCCEEDED(rt::d3d12_xs::create_device_proxy(inner, __uuidof(ID3D12Device), | ||
| 164 | reinterpret_cast<void**>(&device.p)))); | ||
| 165 | rt::d3d12::set_device_outer(inner, device.p); | ||
| 166 | EXPECT(rt::d3d12::bindless_set(device.p) != VK_NULL_HANDLE); | ||
| 167 | |||
| 168 | D3D12_DESCRIPTOR_RANGE uav_range{D3D12_DESCRIPTOR_RANGE_TYPE_UAV, 6, 0, 0, 0}; | ||
| 169 | D3D12_ROOT_PARAMETER params[2] = {}; | ||
| 170 | params[0].ParameterType = D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS; | ||
| 171 | params[0].Constants = {0, 0, 4}; | ||
| 172 | params[0].ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL; | ||
| 173 | params[1].ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE; | ||
| 174 | params[1].DescriptorTable = {1, &uav_range}; | ||
| 175 | params[1].ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL; | ||
| 176 | D3D12_VERSIONED_ROOT_SIGNATURE_DESC root_desc{}; | ||
| 177 | root_desc.Version = D3D_ROOT_SIGNATURE_VERSION_1_0; | ||
| 178 | root_desc.Desc_1_0 = {2, params, 0, nullptr, D3D12_ROOT_SIGNATURE_FLAG_NONE}; | ||
| 179 | const auto root_blob = serialize_root_signature(root_desc); | ||
| 180 | EXPECT(!root_blob.empty()); | ||
| 181 | Ref<ID3D12RootSignature> root; | ||
| 182 | EXPECT(SUCCEEDED(device->CreateRootSignature(0, root_blob.data(), root_blob.size(), IID_PPV_ARGS(&root.p)))); | ||
| 183 | D3D12_COMPUTE_PIPELINE_STATE_DESC pso_desc{}; | ||
| 184 | pso_desc.pRootSignature = root.p; | ||
| 185 | pso_desc.CS = {typed_container.data(), typed_container.size()}; | ||
| 186 | Ref<ID3D12PipelineState> pso_typed, pso_counter; | ||
| 187 | EXPECT(SUCCEEDED(device->CreateComputePipelineState(&pso_desc, IID_PPV_ARGS(&pso_typed.p)))); | ||
| 188 | pso_desc.CS = {counter_container.data(), counter_container.size()}; | ||
| 189 | EXPECT(SUCCEEDED(device->CreateComputePipelineState(&pso_desc, IID_PPV_ARGS(&pso_counter.p)))); | ||
| 190 | |||
| 191 | const D3D12_HEAP_PROPERTIES default_heap{D3D12_HEAP_TYPE_DEFAULT}, upload_heap{D3D12_HEAP_TYPE_UPLOAD}, | ||
| 192 | readback_heap{D3D12_HEAP_TYPE_READBACK}; | ||
| 193 | Ref<ID3D12Resource> upload, readback, buf[buffer_count]; | ||
| 194 | const auto create = [&](Ref<ID3D12Resource>& out, const D3D12_HEAP_PROPERTIES& heap, UINT64 bytes, | ||
| 195 | D3D12_RESOURCE_FLAGS flags, D3D12_RESOURCE_STATES state) { | ||
| 196 | const auto desc = buffer_desc(bytes, flags); | ||
| 197 | return SUCCEEDED(device->CreateCommittedResource(&heap, D3D12_HEAP_FLAG_NONE, &desc, state, nullptr, | ||
| 198 | IID_PPV_ARGS(&out.p))); | ||
| 199 | }; | ||
| 200 | EXPECT(create(upload, upload_heap, total_bytes, D3D12_RESOURCE_FLAG_NONE, D3D12_RESOURCE_STATE_GENERIC_READ)); | ||
| 201 | EXPECT(create(readback, readback_heap, readback_bytes, D3D12_RESOURCE_FLAG_NONE, D3D12_RESOURCE_STATE_COPY_DEST)); | ||
| 202 | for (int i = 0; i < buffer_count; ++i) | ||
| 203 | EXPECT(create(buf[i], default_heap, sizes[i], D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS, | ||
| 204 | D3D12_RESOURCE_STATE_COPY_DEST)); | ||
| 205 | Reference want = reference(); | ||
| 206 | { | ||
| 207 | std::uint8_t* mapped = nullptr; | ||
| 208 | EXPECT(SUCCEEDED(upload->Map(0, nullptr, reinterpret_cast<void**>(&mapped)))); | ||
| 209 | for (UINT64 i = 0; i < total_bytes / 4; ++i) std::memcpy(mapped + i * 4, &sentinel, 4); | ||
| 210 | // The input buffer holds floats; the counter's own word starts at 0 (the rest of its buffer is sentinel). | ||
| 211 | std::memcpy(mapped + slice(in4), want.words[in4].data(), sizes[in4]); | ||
| 212 | std::memset(mapped + slice(counter) + counter_offset, 0, 4); | ||
| 213 | upload->Unmap(0, nullptr); | ||
| 214 | } | ||
| 215 | |||
| 216 | // The table: slots 0..5 typed views for cs_buf_typed; slot 6 a structured UAV with a counter, slot 7 a raw output | ||
| 217 | // for cs_buf_counter (its table starts at slot 6). | ||
| 218 | const D3D12_DESCRIPTOR_HEAP_DESC heap_desc{D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, 12, | ||
| 219 | D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE, 0}; | ||
| 220 | Ref<ID3D12DescriptorHeap> heap; | ||
| 221 | EXPECT(SUCCEEDED(device->CreateDescriptorHeap(&heap_desc, IID_PPV_ARGS(&heap.p)))); | ||
| 222 | const std::uint64_t cpu = reinterpret_cast<XboxHeapHandleFn>(slot(heap.p, 9))(heap.p); | ||
| 223 | const std::uint64_t gpu = reinterpret_cast<XboxHeapHandleFn>(slot(heap.p, 10))(heap.p); | ||
| 224 | const UINT step = device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV); | ||
| 225 | EXPECT(cpu && gpu >= 0x10000 && gpu < (1ull << 32) && step == 32); // the shaders step 32 bytes a slot | ||
| 226 | const auto handle = [&](UINT i) { return D3D12_CPU_DESCRIPTOR_HANDLE{SIZE_T(cpu + std::uint64_t(i) * step)}; }; | ||
| 227 | const auto make = [&](UINT i, Buf which, const D3D12_UNORDERED_ACCESS_VIEW_DESC& view, ID3D12Resource* counter_res = nullptr) { | ||
| 228 | device->CreateUnorderedAccessView(buf[which].p, counter_res, &view, handle(i)); | ||
| 229 | }; | ||
| 230 | make(0, out0, buffer_view(DXGI_FORMAT_R32_UINT, 0, out0_elements, 0)); | ||
| 231 | make(1, out1, buffer_view(DXGI_FORMAT_R16G16B16A16_FLOAT, 0, lanes, 0)); | ||
| 232 | make(2, out2, buffer_view(DXGI_FORMAT_R8G8B8A8_UNORM, out2_first, lanes, 0)); | ||
| 233 | make(3, out3, buffer_view(DXGI_FORMAT_R32G32B32A32_UINT, 0, lanes, 0)); | ||
| 234 | make(4, in4, buffer_view(DXGI_FORMAT_R32_FLOAT, 0, in4_elements, 0)); | ||
| 235 | make(5, out5, buffer_view(DXGI_FORMAT_R32_SINT, 0, lanes, 0)); | ||
| 236 | make(6, records, buffer_view(DXGI_FORMAT_UNKNOWN, 0, lanes, 8, counter_offset), buf[counter].p); | ||
| 237 | make(7, consumed_out, buffer_view(DXGI_FORMAT_R32_TYPELESS, 0, consumed * 2, 0, 0, D3D12_BUFFER_UAV_FLAG_RAW)); | ||
| 238 | |||
| 239 | // The V#s the shaders load: format code, element size as stride, element count, OOB_SELECT 1 (structured); the | ||
| 240 | // R8G8B8A8 view starts 16 elements in; the counter V# is raw (stride 0, 4 bytes, OOB_SELECT 3) in the slot's upper half. | ||
| 241 | const auto at = [&](UINT i) { return reinterpret_cast<const void*>(handle(i).ptr); }; | ||
| 242 | const auto expect_typed = [&](UINT i, Buf which, UINT code, UINT bytes, UINT elements, UINT first) { | ||
| 243 | const Vsharp v = vsharp(at(i)); | ||
| 244 | return v.address == buf[which]->GetGPUVirtualAddress() + UINT64(first) * bytes && v.stride == bytes && | ||
| 245 | v.records == elements && v.format == code && v.oob == 1; | ||
| 246 | }; | ||
| 247 | EXPECT(expect_typed(0, out0, 20, 4, out0_elements, 0)); // GFX10_FORMAT_32_UINT | ||
| 248 | EXPECT(expect_typed(1, out1, 71, 8, lanes, 0)); // 16_16_16_16_FLOAT | ||
| 249 | EXPECT(expect_typed(2, out2, 56, 4, lanes, out2_first)); // 8_8_8_8_UNORM | ||
| 250 | EXPECT(expect_typed(3, out3, 75, 16, lanes, 0)); // 32_32_32_32_UINT | ||
| 251 | EXPECT(expect_typed(4, in4, 22, 4, in4_elements, 0)); // 32_FLOAT | ||
| 252 | EXPECT(expect_typed(5, out5, 21, 4, lanes, 0)); // 32_SINT | ||
| 253 | { | ||
| 254 | const Vsharp v = vsharp(at(6)), c = vsharp(at(6), 4); | ||
| 255 | EXPECT(v.address == buf[records]->GetGPUVirtualAddress() && v.stride == 8 && v.records == lanes && v.format == 0 && | ||
| 256 | v.oob == 0); | ||
| 257 | EXPECT(c.address == buf[counter]->GetGPUVirtualAddress() + counter_offset && c.stride == 0 && c.records == 4 && | ||
| 258 | c.format == 0 && c.oob == 3); | ||
| 259 | const Vsharp r = vsharp(at(7)); | ||
| 260 | EXPECT(r.address == buf[consumed_out]->GetGPUVirtualAddress() && r.stride == 0 && r.records == consumed * 8 && | ||
| 261 | r.oob == 3); | ||
| 262 | // A view with no counter leaves the slot's upper half zero. | ||
| 263 | const Vsharp none = vsharp(at(7), 4); | ||
| 264 | EXPECT(!none.address && !none.records); | ||
| 265 | } | ||
| 266 | |||
| 267 | D3D12_COMMAND_QUEUE_DESC queue_desc{}; | ||
| 268 | queue_desc.Type = D3D12_COMMAND_LIST_TYPE_DIRECT; | ||
| 269 | Ref<ID3D12CommandQueue> queue; | ||
| 270 | EXPECT(SUCCEEDED(device->CreateCommandQueue(&queue_desc, IID_PPV_ARGS(&queue.p)))); | ||
| 271 | Ref<ID3D12CommandAllocator> allocator; | ||
| 272 | Ref<ID3D12GraphicsCommandList> list; | ||
| 273 | Ref<ID3D12Fence> fence; | ||
| 274 | EXPECT(SUCCEEDED(device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(&allocator.p)))); | ||
| 275 | EXPECT(SUCCEEDED(device->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, allocator.p, nullptr, | ||
| 276 | IID_PPV_ARGS(&list.p)))); | ||
| 277 | EXPECT(SUCCEEDED(device->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&fence.p)))); | ||
| 278 | |||
| 279 | constexpr auto uav_state = D3D12_RESOURCE_STATE_UNORDERED_ACCESS; | ||
| 280 | for (int i = 0; i < buffer_count; ++i) list->CopyBufferRegion(buf[i].p, 0, upload.p, slice(Buf(i)), sizes[i]); | ||
| 281 | D3D12_RESOURCE_BARRIER barriers[buffer_count]; | ||
| 282 | for (int i = 0; i < buffer_count; ++i) barriers[i] = transition(buf[i].p, D3D12_RESOURCE_STATE_COPY_DEST, uav_state); | ||
| 283 | list->ResourceBarrier(buffer_count, barriers); | ||
| 284 | ID3D12DescriptorHeap* heaps[] = {heap.p}; | ||
| 285 | list->SetDescriptorHeaps(1, heaps); | ||
| 286 | list->SetComputeRootSignature(root.p); | ||
| 287 | const auto constants = [&](std::uint32_t a, std::uint32_t b) { | ||
| 288 | const std::uint32_t values[4] = {a, b, 0, 0}; | ||
| 289 | list->SetComputeRoot32BitConstants(0, 4, values, 0); | ||
| 290 | }; | ||
| 291 | list->SetPipelineState(pso_typed.p); | ||
| 292 | constants(seed, multiplier); | ||
| 293 | list->SetComputeRootDescriptorTable(1, D3D12_GPU_DESCRIPTOR_HANDLE{gpu}); | ||
| 294 | list->Dispatch(lanes / 64, 1, 1); | ||
| 295 | list->SetPipelineState(pso_counter.p); | ||
| 296 | constants(0, 0); // append | ||
| 297 | list->SetComputeRootDescriptorTable(1, D3D12_GPU_DESCRIPTOR_HANDLE{gpu + 6ull * step}); | ||
| 298 | list->Dispatch(lanes / 64, 1, 1); | ||
| 299 | D3D12_RESOURCE_BARRIER sync[2] = {uav_barrier(buf[records].p), uav_barrier(buf[counter].p)}; | ||
| 300 | list->ResourceBarrier(2, sync); | ||
| 301 | // CopyStructureCount: the counter's 4 bytes into a buffer, after the append. | ||
| 302 | D3D12_RESOURCE_BARRIER to_copy = transition(buf[counter].p, uav_state, D3D12_RESOURCE_STATE_COPY_SOURCE); | ||
| 303 | list->ResourceBarrier(1, &to_copy); | ||
| 304 | list->CopyBufferRegion(readback.p, count_after_append, buf[counter].p, counter_offset, 4); | ||
| 305 | D3D12_RESOURCE_BARRIER back = transition(buf[counter].p, D3D12_RESOURCE_STATE_COPY_SOURCE, uav_state); | ||
| 306 | list->ResourceBarrier(1, &back); | ||
| 307 | constants(1, 0); // consume | ||
| 308 | list->Dispatch(consumed / 64, 1, 1); | ||
| 309 | for (int i = 0; i < buffer_count; ++i) barriers[i] = transition(buf[i].p, uav_state, D3D12_RESOURCE_STATE_COPY_SOURCE); | ||
| 310 | list->ResourceBarrier(buffer_count, barriers); | ||
| 311 | for (int i = 0; i < buffer_count; ++i) list->CopyBufferRegion(readback.p, slice(Buf(i)), buf[i].p, 0, sizes[i]); | ||
| 312 | list->CopyBufferRegion(readback.p, count_after_consume, buf[counter].p, counter_offset, 4); | ||
| 313 | EXPECT(list->Close() == S_OK); | ||
| 314 | ID3D12CommandList* lists[] = {list.p}; | ||
| 315 | queue->ExecuteCommandLists(1, lists); | ||
| 316 | EXPECT(rt::d3d12::last_execute_result(queue.p) == leonida::ReplayResult::success); | ||
| 317 | EXPECT(SUCCEEDED(queue->Signal(fence.p, 1))); | ||
| 318 | const HANDLE event = CreateEventW(nullptr, FALSE, FALSE, nullptr); | ||
| 319 | EXPECT(event != nullptr); | ||
| 320 | EXPECT(SUCCEEDED(fence->SetEventOnCompletion(1, event))); | ||
| 321 | if (WaitForSingleObject(event, 20000) != WAIT_OBJECT_0) { | ||
| 322 | std::fprintf(stderr, "the fence never reached 1\n"); | ||
| 323 | return 1; | ||
| 324 | } | ||
| 325 | CloseHandle(event); | ||
| 326 | |||
| 327 | std::vector<std::uint8_t> got; | ||
| 328 | { | ||
| 329 | void* mapped = nullptr; | ||
| 330 | EXPECT(SUCCEEDED(readback->Map(0, nullptr, &mapped))); | ||
| 331 | got.assign(static_cast<const std::uint8_t*>(mapped), static_cast<const std::uint8_t*>(mapped) + readback_bytes); | ||
| 332 | readback->Unmap(0, nullptr); | ||
| 333 | } | ||
| 334 | const auto word_at = [&](UINT64 offset) { | ||
| 335 | std::uint32_t value = 0; | ||
| 336 | std::memcpy(&value, got.data() + offset, 4); | ||
| 337 | return value; | ||
| 338 | }; | ||
| 339 | |||
| 340 | unsigned mismatches = 0; | ||
| 341 | const auto compare = [&](const char* what, Buf which, const std::vector<std::uint32_t>& expected) { | ||
| 342 | unsigned bad = 0; | ||
| 343 | for (std::size_t i = 0; i < expected.size(); ++i) { | ||
| 344 | ++words_checked; | ||
| 345 | const std::uint32_t value = word_at(slice(which) + i * 4); | ||
| 346 | if (value == expected[i]) continue; | ||
| 347 | ++mismatches; | ||
| 348 | if (bad++ < 4) std::fprintf(stderr, "%s word %zu: got %08x want %08x\n", what, i, value, expected[i]); | ||
| 349 | } | ||
| 350 | if (bad) std::fprintf(stderr, "%s: %u of %zu words differ\n", what, bad, expected.size()); | ||
| 351 | }; | ||
| 352 | compare("R32_UINT store + atomic add (240 of 256 elements)", out0, want.words[out0]); | ||
| 353 | compare("R16G16B16A16_FLOAT store", out1, want.words[out1]); | ||
| 354 | compare("R8G8B8A8_UNORM store (FirstElement 16)", out2, want.words[out2]); | ||
| 355 | compare("R32G32B32A32_UINT store", out3, want.words[out3]); | ||
| 356 | compare("R32_FLOAT input untouched", in4, want.words[in4]); | ||
| 357 | compare("R32_FLOAT load -> R32_SINT store (250 of 256 loads in range)", out5, want.words[out5]); | ||
| 358 | |||
| 359 | // The counter: 256 after the append, 128 after the consume, and nothing else of its buffer touched. | ||
| 360 | ++words_checked; | ||
| 361 | if (word_at(count_after_append) != lanes) { | ||
| 362 | std::fprintf(stderr, "counter after the append: %u, want %u\n", word_at(count_after_append), lanes); | ||
| 363 | ++mismatches; | ||
| 364 | } | ||
| 365 | ++words_checked; | ||
| 366 | if (word_at(count_after_consume) != lanes - consumed) { | ||
| 367 | std::fprintf(stderr, "counter after the consume: %u, want %u\n", word_at(count_after_consume), lanes - consumed); | ||
| 368 | ++mismatches; | ||
| 369 | } | ||
| 370 | for (UINT64 i = 0; i < counter_buffer_bytes / 4; ++i) { | ||
| 371 | ++words_checked; | ||
| 372 | const std::uint32_t expected = i == counter_offset / 4 ? lanes - consumed : sentinel; | ||
| 373 | if (word_at(slice(counter) + i * 4) != expected && mismatches++ < 12) | ||
| 374 | std::fprintf(stderr, "counter buffer word %llu: got %08x want %08x\n", static_cast<unsigned long long>(i), | ||
| 375 | word_at(slice(counter) + i * 4), expected); | ||
| 376 | } | ||
| 377 | // The appended records: every g exactly once with its second field, in whatever order the lanes took the counter. | ||
| 378 | std::vector<std::array<std::uint32_t, 2>> appended, taken; | ||
| 379 | for (UINT i = 0; i < lanes; ++i) | ||
| 380 | appended.push_back({word_at(slice(records) + i * 8), word_at(slice(records) + i * 8 + 4)}); | ||
| 381 | std::vector<std::array<std::uint32_t, 2>> sorted = appended; | ||
| 382 | std::sort(sorted.begin(), sorted.end()); | ||
| 383 | for (UINT i = 0; i < lanes; ++i) { | ||
| 384 | ++words_checked; | ||
| 385 | if (sorted[i][0] != i || sorted[i][1] != i * 3 + 1) { | ||
| 386 | if (mismatches++ < 12) | ||
| 387 | std::fprintf(stderr, "appended record %u (sorted): { %u, %u }, want { %u, %u }\n", i, sorted[i][0], | ||
| 388 | sorted[i][1], i, i * 3 + 1); | ||
| 389 | } | ||
| 390 | } | ||
| 391 | // The consumed ones: the records at indices 128..255 (the counter went from 256 down to 128), each once. | ||
| 392 | for (UINT i = 0; i < consumed; ++i) | ||
| 393 | taken.push_back({word_at(slice(consumed_out) + i * 8), word_at(slice(consumed_out) + i * 8 + 4)}); | ||
| 394 | std::vector<std::array<std::uint32_t, 2>> tail(appended.begin() + (lanes - consumed), appended.end()); | ||
| 395 | std::sort(taken.begin(), taken.end()); | ||
| 396 | std::sort(tail.begin(), tail.end()); | ||
| 397 | for (UINT i = 0; i < consumed; ++i) { | ||
| 398 | ++words_checked; | ||
| 399 | if (taken[i] != tail[i] && mismatches++ < 12) | ||
| 400 | std::fprintf(stderr, "consumed record %u (sorted): { %u, %u }, want { %u, %u }\n", i, taken[i][0], taken[i][1], | ||
| 401 | tail[i][0], tail[i][1]); | ||
| 402 | } | ||
| 403 | EXPECT(!mismatches); | ||
| 404 | |||
| 405 | for (auto& b : buf) b.reset(); | ||
| 406 | upload.reset(); readback.reset(); list.reset(); allocator.reset(); fence.reset(); queue.reset(); | ||
| 407 | pso_typed.reset(); pso_counter.reset(); root.reset(); heap.reset(); | ||
| 408 | EXPECT(rt::d3d12_xs::device_proxy_ref_count(device.p) == 1); | ||
| 409 | return 0; | ||
| 410 | } | ||
| 411 | |||
| 412 | // ---- part 2 ----------------------------------------------------------------------------------------------------- | ||
| 413 | |||
| 414 | struct ClearCase { | ||
| 415 | DXGI_FORMAT format; | ||
| 416 | VkFormat vulkan; // for the model | ||
| 417 | bool is_float; | ||
| 418 | std::array<std::uint32_t, 4> values; | ||
| 419 | UINT64 byte_offset; | ||
| 420 | UINT elements; | ||
| 421 | }; | ||
| 422 | std::uint32_t fb(float f) { return std::bit_cast<std::uint32_t>(f); } | ||
| 423 | |||
| 424 | // Values in the domain D3D12 defines the same on every driver: no exact .5 ties in a float -> UNORM rounding (the RTX 5070's | ||
| 425 | // D3D12 rounds 127.5 down, the layer and the spec's round-to-nearest up) and no integer wider than its channel (the low bits | ||
| 426 | // are kept here, one vendor clamps). | ||
| 427 | const ClearCase clear_cases[] = { | ||
| 428 | {DXGI_FORMAT_R32_UINT, VK_FORMAT_R32_UINT, false, {0x12345678, 0, 0, 0}, 0, 16}, | ||
| 429 | {DXGI_FORMAT_R32_SINT, VK_FORMAT_R32_SINT, false, {0xfffffff0, 0, 0, 0}, 256, 8}, | ||
| 430 | {DXGI_FORMAT_R32_FLOAT, VK_FORMAT_R32_SFLOAT, true, {fb(1.5f), 0, 0, 0}, 512, 8}, | ||
| 431 | {DXGI_FORMAT_R16G16B16A16_FLOAT, VK_FORMAT_R16G16B16A16_SFLOAT, true, {fb(1.0f), fb(0.5f), fb(-2.0f), fb(0.25f)}, 768, 8}, | ||
| 432 | {DXGI_FORMAT_R8G8B8A8_UNORM, VK_FORMAT_R8G8B8A8_UNORM, true, {fb(1.0f), fb(0.4f), fb(0.2f), fb(2.0f)}, 1024, 16}, | ||
| 433 | {DXGI_FORMAT_R8G8B8A8_UINT, VK_FORMAT_R8G8B8A8_UINT, false, {0xf1, 2, 3, 0x80}, 1280, 16}, | ||
| 434 | {DXGI_FORMAT_R32G32B32A32_UINT, VK_FORMAT_R32G32B32A32_UINT, false, {1, 2, 3, 4}, 1536, 4}, | ||
| 435 | {DXGI_FORMAT_R16_UNORM, VK_FORMAT_R16_UNORM, true, {fb(0.25f), 0, 0, 0}, 1792, 16}, | ||
| 436 | {DXGI_FORMAT_R8_UNORM, VK_FORMAT_R8_UNORM, true, {fb(0.2f), 0, 0, 0}, 2048, 21}, // ends off a word boundary | ||
| 437 | {DXGI_FORMAT_R10G10B10A2_UNORM, VK_FORMAT_A2B10G10R10_UNORM_PACK32, true, {fb(0.25f), fb(0.4f), fb(0.75f), fb(1.0f)}, 2304, 8}, | ||
| 438 | {DXGI_FORMAT_R11G11B10_FLOAT, VK_FORMAT_B10G11R11_UFLOAT_PACK32, true, {fb(1.0f), fb(2.0f), fb(0.5f), 0}, 2560, 8}, | ||
| 439 | {DXGI_FORMAT_R16G16_FLOAT, VK_FORMAT_R16G16_SFLOAT, true, {fb(1.5f), fb(-0.5f), 0, 0}, 2816, 8}, | ||
| 440 | {DXGI_FORMAT_R8G8_UINT, VK_FORMAT_R8G8_UINT, false, {0xaa, 0xbb, 0, 0}, 3072, 10}, | ||
| 441 | }; | ||
| 442 | constexpr UINT64 api_data_bytes = 4096, api_records_bytes = 4096; | ||
| 443 | constexpr UINT api_readback = api_data_bytes + api_records_bytes + counter_buffer_bytes; | ||
| 444 | |||
| 445 | // The same scenario on `device`: bytes read back, or empty on failure. host: a real heap pair (a non-shader-visible one the | ||
| 446 | // views are made in, a shader-visible one the clear's GPU handle comes from), as the PC runtime wants; the layer takes the | ||
| 447 | // CPU handle and ignores the GPU one. | ||
| 448 | bool run_api(ID3D12Device* device, bool host, std::vector<std::uint8_t>& out, std::vector<bool>& supported_by_host) { | ||
| 449 | const D3D12_HEAP_PROPERTIES default_heap{D3D12_HEAP_TYPE_DEFAULT}, upload_heap{D3D12_HEAP_TYPE_UPLOAD}, | ||
| 450 | readback_heap{D3D12_HEAP_TYPE_READBACK}; | ||
| 451 | const auto create = [&](Ref<ID3D12Resource>& r, const D3D12_HEAP_PROPERTIES& heap, UINT64 bytes, | ||
| 452 | D3D12_RESOURCE_FLAGS flags, D3D12_RESOURCE_STATES state) { | ||
| 453 | const auto desc = buffer_desc(bytes, flags); | ||
| 454 | return SUCCEEDED(device->CreateCommittedResource(&heap, D3D12_HEAP_FLAG_NONE, &desc, state, nullptr, | ||
| 455 | IID_PPV_ARGS(&r.p))); | ||
| 456 | }; | ||
| 457 | constexpr auto uav_flag = D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS; | ||
| 458 | Ref<ID3D12Resource> data, structured, counter_buffer, upload, readback; | ||
| 459 | if (!create(data, default_heap, api_data_bytes, uav_flag, D3D12_RESOURCE_STATE_UNORDERED_ACCESS) || | ||
| 460 | !create(structured, default_heap, api_records_bytes, uav_flag, D3D12_RESOURCE_STATE_COPY_DEST) || | ||
| 461 | !create(counter_buffer, default_heap, counter_buffer_bytes, uav_flag, D3D12_RESOURCE_STATE_COPY_DEST) || | ||
| 462 | !create(upload, upload_heap, api_records_bytes + counter_buffer_bytes, D3D12_RESOURCE_FLAG_NONE, | ||
| 463 | D3D12_RESOURCE_STATE_GENERIC_READ) || | ||
| 464 | !create(readback, readback_heap, api_readback, D3D12_RESOURCE_FLAG_NONE, D3D12_RESOURCE_STATE_COPY_DEST)) | ||
| 465 | return std::fprintf(stderr, "resource creation failed\n"), false; | ||
| 466 | { | ||
| 467 | std::uint8_t* mapped = nullptr; | ||
| 468 | if (FAILED(upload->Map(0, nullptr, reinterpret_cast<void**>(&mapped)))) return std::fprintf(stderr, "run_api: line %d\n", __LINE__), false; | ||
| 469 | std::memset(mapped, 0x11, api_records_bytes + counter_buffer_bytes); | ||
| 470 | const std::uint32_t seven = 7; | ||
| 471 | std::memcpy(mapped + api_records_bytes + counter_offset, &seven, 4); // the counter's word | ||
| 472 | upload->Unmap(0, nullptr); | ||
| 473 | } | ||
| 474 | constexpr UINT slots = 24; | ||
| 475 | Ref<ID3D12DescriptorHeap> cpu_heap, gpu_heap; | ||
| 476 | D3D12_DESCRIPTOR_HEAP_DESC desc{D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, slots, D3D12_DESCRIPTOR_HEAP_FLAG_NONE, 0}; | ||
| 477 | if (FAILED(device->CreateDescriptorHeap(&desc, IID_PPV_ARGS(&cpu_heap.p)))) return std::fprintf(stderr, "run_api: line %d\n", __LINE__), false; | ||
| 478 | if (host) { | ||
| 479 | desc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE; | ||
| 480 | if (FAILED(device->CreateDescriptorHeap(&desc, IID_PPV_ARGS(&gpu_heap.p)))) return std::fprintf(stderr, "run_api: line %d\n", __LINE__), false; | ||
| 481 | } | ||
| 482 | const UINT step = device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV); | ||
| 483 | const auto cpu = [&](UINT i) { | ||
| 484 | D3D12_CPU_DESCRIPTOR_HANDLE h = cpu_heap->GetCPUDescriptorHandleForHeapStart(); | ||
| 485 | h.ptr += SIZE_T(i) * step; | ||
| 486 | return h; | ||
| 487 | }; | ||
| 488 | const auto gpu = [&](UINT i) { | ||
| 489 | if (!host) return D3D12_GPU_DESCRIPTOR_HANDLE{0}; | ||
| 490 | D3D12_GPU_DESCRIPTOR_HANDLE h = gpu_heap->GetGPUDescriptorHandleForHeapStart(); | ||
| 491 | h.ptr += UINT64(i) * step; | ||
| 492 | return h; | ||
| 493 | }; | ||
| 494 | UINT next_slot = 0; | ||
| 495 | const auto make = [&](ID3D12Resource* resource, ID3D12Resource* counter, const D3D12_UNORDERED_ACCESS_VIEW_DESC& view) { | ||
| 496 | const UINT i = next_slot++; | ||
| 497 | device->CreateUnorderedAccessView(resource, counter, &view, cpu(i)); | ||
| 498 | if (host) { | ||
| 499 | D3D12_CPU_DESCRIPTOR_HANDLE visible = gpu_heap->GetCPUDescriptorHandleForHeapStart(); | ||
| 500 | visible.ptr += SIZE_T(i) * step; | ||
| 501 | device->CopyDescriptorsSimple(1, visible, cpu(i), D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV); | ||
| 502 | } | ||
| 503 | return i; | ||
| 504 | }; | ||
| 505 | |||
| 506 | Ref<ID3D12CommandQueue> queue; | ||
| 507 | Ref<ID3D12CommandAllocator> allocator; | ||
| 508 | Ref<ID3D12GraphicsCommandList> list; | ||
| 509 | Ref<ID3D12Fence> fence; | ||
| 510 | const D3D12_COMMAND_QUEUE_DESC queue_desc{D3D12_COMMAND_LIST_TYPE_DIRECT}; | ||
| 511 | if (FAILED(device->CreateCommandQueue(&queue_desc, IID_PPV_ARGS(&queue.p))) || | ||
| 512 | FAILED(device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(&allocator.p))) || | ||
| 513 | FAILED(device->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, allocator.p, nullptr, IID_PPV_ARGS(&list.p))) || | ||
| 514 | FAILED(device->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&fence.p)))) | ||
| 515 | return std::fprintf(stderr, "run_api: line %d\n", __LINE__), false; | ||
| 516 | ID3D12DescriptorHeap* heaps[] = {gpu_heap.p}; | ||
| 517 | if (host) list->SetDescriptorHeaps(1, heaps); | ||
| 518 | |||
| 519 | const auto clear = [&](UINT slot_index, ID3D12Resource* resource, bool is_float, const std::array<std::uint32_t, 4>& v) { | ||
| 520 | if (is_float) { | ||
| 521 | const float f[4] = {std::bit_cast<float>(v[0]), std::bit_cast<float>(v[1]), std::bit_cast<float>(v[2]), | ||
| 522 | std::bit_cast<float>(v[3])}; | ||
| 523 | list->ClearUnorderedAccessViewFloat(gpu(slot_index), cpu(slot_index), resource, f, 0, nullptr); | ||
| 524 | } else { | ||
| 525 | list->ClearUnorderedAccessViewUint(gpu(slot_index), cpu(slot_index), resource, v.data(), 0, nullptr); | ||
| 526 | } | ||
| 527 | const D3D12_RESOURCE_BARRIER barrier = uav_barrier(resource); | ||
| 528 | list->ResourceBarrier(1, &barrier); | ||
| 529 | }; | ||
| 530 | // The whole buffer 0xcdcdcdcd through a raw view, then each case's elements through a typed view. | ||
| 531 | clear(make(data.p, nullptr, buffer_view(DXGI_FORMAT_R32_TYPELESS, 0, api_data_bytes / 4, 0, 0, D3D12_BUFFER_UAV_FLAG_RAW)), | ||
| 532 | data.p, false, {0xcdcdcdcd, 0, 0, 0}); | ||
| 533 | supported_by_host.assign(std::size(clear_cases), true); | ||
| 534 | for (std::size_t c = 0; c < std::size(clear_cases); ++c) { | ||
| 535 | const ClearCase& test = clear_cases[c]; | ||
| 536 | if (host) { | ||
| 537 | D3D12_FEATURE_DATA_FORMAT_SUPPORT support{test.format}; | ||
| 538 | supported_by_host[c] = SUCCEEDED(device->CheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT, &support, sizeof(support))) && | ||
| 539 | (support.Support2 & D3D12_FORMAT_SUPPORT2_UAV_TYPED_STORE); | ||
| 540 | } | ||
| 541 | if (!supported_by_host[c]) continue; | ||
| 542 | const UINT size = uc::layout(test.vulkan)->bytes; | ||
| 543 | clear(make(data.p, nullptr, buffer_view(test.format, test.byte_offset / size, test.elements, 0)), data.p, | ||
| 544 | test.is_float, test.values); | ||
| 545 | } | ||
| 546 | // A structured view with a counter. The clear writes the records and leaves the counter (preset to 7) alone ... | ||
| 547 | list->CopyBufferRegion(structured.p, 0, upload.p, 0, api_records_bytes); | ||
| 548 | list->CopyBufferRegion(counter_buffer.p, 0, upload.p, api_records_bytes, counter_buffer_bytes); | ||
| 549 | D3D12_RESOURCE_BARRIER to_uav[2] = {transition(structured.p, D3D12_RESOURCE_STATE_COPY_DEST, D3D12_RESOURCE_STATE_UNORDERED_ACCESS), | ||
| 550 | transition(counter_buffer.p, D3D12_RESOURCE_STATE_COPY_DEST, | ||
| 551 | D3D12_RESOURCE_STATE_UNORDERED_ACCESS)}; | ||
| 552 | list->ResourceBarrier(2, to_uav); | ||
| 553 | clear(make(structured.p, counter_buffer.p, buffer_view(DXGI_FORMAT_UNKNOWN, 0, 256, 16, counter_offset)), structured.p, | ||
| 554 | false, {0xab, 0xcd, 0xef, 0x01}); | ||
| 555 | // ... and a raw view of the counter's own word (element 1024) clears it, as a game resets its counter. | ||
| 556 | clear(make(counter_buffer.p, nullptr, buffer_view(DXGI_FORMAT_R32_TYPELESS, counter_offset / 4, 1, 0, 0, D3D12_BUFFER_UAV_FLAG_RAW)), | ||
| 557 | counter_buffer.p, false, {3, 0, 0, 0}); | ||
| 558 | D3D12_RESOURCE_BARRIER to_copy[3] = { | ||
| 559 | transition(data.p, D3D12_RESOURCE_STATE_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_COPY_SOURCE), | ||
| 560 | transition(structured.p, D3D12_RESOURCE_STATE_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_COPY_SOURCE), | ||
| 561 | transition(counter_buffer.p, D3D12_RESOURCE_STATE_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_COPY_SOURCE)}; | ||
| 562 | list->ResourceBarrier(3, to_copy); | ||
| 563 | list->CopyBufferRegion(readback.p, 0, data.p, 0, api_data_bytes); | ||
| 564 | list->CopyBufferRegion(readback.p, api_data_bytes, structured.p, 0, api_records_bytes); | ||
| 565 | list->CopyBufferRegion(readback.p, api_data_bytes + api_records_bytes, counter_buffer.p, 0, counter_buffer_bytes); | ||
| 566 | if (const HRESULT hr = list->Close(); FAILED(hr)) return std::fprintf(stderr, "Close: %08lx\n", static_cast<unsigned long>(hr)), false; | ||
| 567 | ID3D12CommandList* lists[] = {list.p}; | ||
| 568 | queue->ExecuteCommandLists(1, lists); | ||
| 569 | if (!host && rt::d3d12::last_execute_result(queue.p) != leonida::ReplayResult::success) | ||
| 570 | return std::fprintf(stderr, "replay result %d\n", int(rt::d3d12::last_execute_result(queue.p))), false; | ||
| 571 | if (FAILED(queue->Signal(fence.p, 1))) return std::fprintf(stderr, "run_api: line %d\n", __LINE__), false; | ||
| 572 | const HANDLE event = CreateEventW(nullptr, FALSE, FALSE, nullptr); | ||
| 573 | if (!event || FAILED(fence->SetEventOnCompletion(1, event)) || WaitForSingleObject(event, 20000) != WAIT_OBJECT_0) | ||
| 574 | return std::fprintf(stderr, "run_api: line %d\n", __LINE__), false; | ||
| 575 | CloseHandle(event); | ||
| 576 | void* mapped = nullptr; | ||
| 577 | if (FAILED(readback->Map(0, nullptr, &mapped))) return std::fprintf(stderr, "run_api: line %d\n", __LINE__), false; | ||
| 578 | out.assign(static_cast<const std::uint8_t*>(mapped), static_cast<const std::uint8_t*>(mapped) + api_readback); | ||
| 579 | readback->Unmap(0, nullptr); | ||
| 580 | return true; | ||
| 581 | } | ||
| 582 | |||
| 583 | // What D3D12 says the same sequence leaves, from uav_clear.h: the model for a run with no host runtime to compare with. | ||
| 584 | std::vector<std::uint8_t> model(const std::vector<bool>& supported) { | ||
| 585 | std::vector<std::uint8_t> bytes(api_readback, 0x11); | ||
| 586 | std::fill(bytes.begin(), bytes.begin() + api_data_bytes, std::uint8_t(0xcd)); | ||
| 587 | for (std::size_t c = 0; c < std::size(clear_cases); ++c) { | ||
| 588 | const ClearCase& test = clear_cases[c]; | ||
| 589 | uc::Element e{}; | ||
| 590 | if (!supported[c] || !uc::encode(test.vulkan, test.is_float, test.values, e)) continue; | ||
| 591 | for (UINT64 i = 0; i < UINT64(test.elements) * e.size; ++i) bytes[test.byte_offset + i] = e.bytes[i % e.size]; | ||
| 592 | } | ||
| 593 | // A structured view clears every 32-bit word to the first value (D3D12 ignores the other three). | ||
| 594 | for (UINT64 i = 0; i < api_records_bytes; ++i) bytes[api_data_bytes + i] = i % 4 == 0 ? 0xab : 0; | ||
| 595 | const std::uint32_t three = 3; | ||
| 596 | std::memcpy(bytes.data() + api_data_bytes + api_records_bytes + counter_offset, &three, 4); | ||
| 597 | return bytes; | ||
| 598 | } | ||
| 599 | |||
| 600 | } // namespace | ||
| 601 | |||
| 602 | int main() { | ||
| 603 | vktest::Device d; | ||
| 604 | const auto device_status = d.initialize(); | ||
| 605 | if (device_status == vktest::DeviceStatus::unavailable) return 77; // no Vulkan GPU: ctest skips | ||
| 606 | if (device_status != vktest::DeviceStatus::ready) return 1; | ||
| 607 | if (!d.bindless) { | ||
| 608 | std::printf("SKIP: the device lacks the descriptor indexing features of the bindless set 0\n"); | ||
| 609 | return 77; | ||
| 610 | } | ||
| 611 | const std::filesystem::path root_dir = LEONIDA_TEST_BUFFER_UAV_DIR; | ||
| 612 | |||
| 613 | unsigned words = 0; | ||
| 614 | if (const int status = run_shaders(d, root_dir, words)) return status; | ||
| 615 | |||
| 616 | // Part 2: the layer's device and the host's on the same adapter. | ||
| 617 | std::vector<std::uint8_t> ours, host_bytes; | ||
| 618 | std::vector<bool> supported; | ||
| 619 | { | ||
| 620 | rt::d3d12::VulkanDeviceInfo info{}; | ||
| 621 | info.get_instance_proc = d.instance_proc; | ||
| 622 | info.instance = d.instance; | ||
| 623 | info.physical = d.physical; | ||
| 624 | info.device = d.device; | ||
| 625 | info.queue = d.queue; | ||
| 626 | info.queue_family = d.family; | ||
| 627 | info.buffer_device_address = true; // the V# holds the buffer's address | ||
| 628 | Ref<ID3D12Device> device; | ||
| 629 | EXPECT(SUCCEEDED(rt::d3d12::create_vulkan_device(info, IID_PPV_ARGS(&device.p)))); | ||
| 630 | EXPECT(run_api(device.p, false, ours, supported)); | ||
| 631 | } | ||
| 632 | std::string host_name = "none"; | ||
| 633 | bool compared = false; | ||
| 634 | { | ||
| 635 | VkPhysicalDeviceIDProperties id{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES}; | ||
| 636 | VkPhysicalDeviceProperties2 properties{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, &id}; | ||
| 637 | d.instance_fn<PFN_vkGetPhysicalDeviceProperties2>("vkGetPhysicalDeviceProperties2")(d.physical, &properties); | ||
| 638 | copycmp::Ptr<ID3D12Device> host; | ||
| 639 | LUID luid{}; | ||
| 640 | std::memcpy(&luid, id.deviceLUID, sizeof(luid)); | ||
| 641 | if (id.deviceLUIDValid && copycmp::try_create_host(host, host_name, &luid)) { | ||
| 642 | std::vector<bool> host_supported; | ||
| 643 | EXPECT(run_api(host.p, true, host_bytes, host_supported)); | ||
| 644 | supported = host_supported; | ||
| 645 | compared = true; | ||
| 646 | } | ||
| 647 | } | ||
| 648 | if (!compared) { | ||
| 649 | std::printf("no host D3D12 device on the layer's adapter: the layer's bytes are compared with uav_clear.h\n"); | ||
| 650 | host_bytes = model(supported); | ||
| 651 | host_name = "the uav_clear.h model"; | ||
| 652 | } else { | ||
| 653 | // The layer ran every case; the host only those its adapter can store typed. Mask the others in both. | ||
| 654 | for (std::size_t c = 0; c < std::size(clear_cases); ++c) { | ||
| 655 | if (supported[c]) continue; | ||
| 656 | const ClearCase& test = clear_cases[c]; | ||
| 657 | const UINT size = uc::layout(test.vulkan)->bytes; | ||
| 658 | std::fill_n(ours.begin() + test.byte_offset, UINT64(test.elements) * size, std::uint8_t(0)); | ||
| 659 | std::fill_n(host_bytes.begin() + test.byte_offset, UINT64(test.elements) * size, std::uint8_t(0)); | ||
| 660 | std::printf("host adapter has no typed UAV store for DXGI format %d: that case is not compared\n", | ||
| 661 | int(test.format)); | ||
| 662 | } | ||
| 663 | } | ||
| 664 | EXPECT(ours.size() == api_readback && host_bytes.size() == api_readback); | ||
| 665 | unsigned differing = 0; | ||
| 666 | for (std::size_t i = 0; i < ours.size(); ++i) { | ||
| 667 | ++words; | ||
| 668 | if (ours[i] == host_bytes[i]) continue; | ||
| 669 | if (differing++ < 12) { | ||
| 670 | const char* where = i < api_data_bytes ? "typed clears" : i < api_data_bytes + api_records_bytes ? "structured clear with a counter" : "counter buffer"; | ||
| 671 | std::fprintf(stderr, "%s byte %zu: layer %02x, %s %02x\n", where, i, ours[i], host_name.c_str(), host_bytes[i]); | ||
| 672 | } | ||
| 673 | } | ||
| 674 | if (differing) { | ||
| 675 | // Say which clear case the first differing byte belongs to. | ||
| 676 | for (std::size_t c = 0; c < std::size(clear_cases); ++c) { | ||
| 677 | const ClearCase& test = clear_cases[c]; | ||
| 678 | const UINT size = uc::layout(test.vulkan)->bytes; | ||
| 679 | for (UINT64 i = 0; i < UINT64(test.elements) * size; ++i) | ||
| 680 | if (ours[test.byte_offset + i] != host_bytes[test.byte_offset + i]) { | ||
| 681 | std::fprintf(stderr, "case %zu (DXGI format %d) differs\n", c, int(test.format)); | ||
| 682 | break; | ||
| 683 | } | ||
| 684 | } | ||
| 685 | std::fprintf(stderr, "%u bytes differ\n", differing); | ||
| 686 | return 1; | ||
| 687 | } | ||
| 688 | if (d.validation_errors()) { | ||
| 689 | std::fprintf(stderr, "%u validation errors\n", d.validation_errors()); | ||
| 690 | return 1; | ||
| 691 | } | ||
| 692 | std::printf("Buffer UAVs: typed views (R32_UINT with an atomic, R16G16B16A16_FLOAT, R8G8B8A8_UNORM from FirstElement 16, " | ||
| 693 | "R32G32B32A32_UINT, R32_FLOAT loads, R32_SINT) written by a translated compute shader with NUM_RECORDS " | ||
| 694 | "as the bound, and a structured UAV with a counter at offset 4096 appended to by 256 lanes and consumed " | ||
| 695 | "by 128 (counter 256 then 128 through CopyBufferRegion) matched the CPU reference; typed-buffer and " | ||
| 696 | "counter clears matched %s: %u values compared, error 0\n", | ||
| 697 | host_name.c_str(), words); | ||
| 698 | return 0; | ||
| 699 | } | ||
diff --git a/runtime/test/d3d12_compute_test.cpp b/runtime/test/d3d12_compute_test.cpp index a2011d3c2..2d9dff03f 100644 --- a/runtime/test/d3d12_compute_test.cpp +++ b/runtime/test/d3d12_compute_test.cpp | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | // No game data. Set LEONIDA_VK_VALIDATION=1 to run under VK_LAYER_KHRONOS_validation. | 10 | // No game data. Set LEONIDA_VK_VALIDATION=1 to run under VK_LAYER_KHRONOS_validation. |
| 11 | #include "vk_test_device.h" | 11 | #include "vk_test_device.h" |
| 12 | #include "../shims/d3d12_com.h" | 12 | #include "../shims/d3d12_com.h" |
| 13 | #include "../src/gfx10_descriptors.h" | ||
| 13 | #include "../src/shader_library.h" | 14 | #include "../src/shader_library.h" |
| 14 | #include "../shims/d3d12_xs_device.h" | 15 | #include "../shims/d3d12_xs_device.h" |
| 15 | 16 | ||
| @@ -33,6 +34,8 @@ using XboxHeapHandleFn = std::uint64_t(WINAPI*)(void* heap); // heap slots 9/10 | |||
| 33 | // Device slot 62 as XboxBvhBuilder.dll calls it on 1.0.2.1: (desc, 0, 0, riid, out) (main's 28cf235). | 34 | // Device slot 62 as XboxBvhBuilder.dll calls it on 1.0.2.1: (desc, 0, 0, riid, out) (main's 28cf235). |
| 34 | using XboxComputePipelineFn = HRESULT(WINAPI*)(void* device, const D3D12_COMPUTE_PIPELINE_STATE_DESC*, std::uint64_t, | 35 | using XboxComputePipelineFn = HRESULT(WINAPI*)(void* device, const D3D12_COMPUTE_PIPELINE_STATE_DESC*, std::uint64_t, |
| 35 | std::uint64_t, const IID*, void**); | 36 | std::uint64_t, const IID*, void**); |
| 37 | // Device slot 67 as amd_fidelityfx_upscaler_xbox.dll calls it: (desc, riid, out). | ||
| 38 | using XboxNativeComputePipelineFn = HRESULT(WINAPI*)(void* device, const void*, const IID*, void**); | ||
| 36 | using SerializeFn = HRESULT(WINAPI*)(const D3D12_VERSIONED_ROOT_SIGNATURE_DESC*, ID3DBlob**, ID3DBlob**); | 39 | using SerializeFn = HRESULT(WINAPI*)(const D3D12_VERSIONED_ROOT_SIGNATURE_DESC*, ID3DBlob**, ID3DBlob**); |
| 37 | 40 | ||
| 38 | template<class T> | 41 | template<class T> |
| @@ -169,6 +172,7 @@ int main() { | |||
| 169 | constexpr UINT elements = 64, bytes = elements * 4; | 172 | constexpr UINT elements = 64, bytes = elements * 4; |
| 170 | const std::uint32_t table_values[4] = {1000, 2000, 3000, 4000}; | 173 | const std::uint32_t table_values[4] = {1000, 2000, 3000, 4000}; |
| 171 | std::vector<std::uint32_t> first(elements), second(elements); | 174 | std::vector<std::uint32_t> first(elements), second(elements); |
| 175 | std::vector<std::uint32_t> cbv_a_out(elements), cbv_oob_out(elements), cbv_b_out(elements), cbv_null_out(elements); | ||
| 172 | { | 176 | { |
| 173 | rt::d3d12::VulkanDeviceInfo info{}; | 177 | rt::d3d12::VulkanDeviceInfo info{}; |
| 174 | info.get_instance_proc = d.instance_proc; | 178 | info.get_instance_proc = d.instance_proc; |
| @@ -221,6 +225,40 @@ int main() { | |||
| 221 | EXPECT(device->CreateComputePipelineState(&pso_desc, IID_PPV_ARGS(&unknown.p)) == E_INVALIDARG && !unknown.p); | 225 | EXPECT(device->CreateComputePipelineState(&pso_desc, IID_PPV_ARGS(&unknown.p)) == E_INVALIDARG && !unknown.p); |
| 222 | pso_desc.CS = {container.data(), container.size()}; | 226 | pso_desc.CS = {container.data(), container.size()}; |
| 223 | 227 | ||
| 228 | // The PSO through slot 67, compute pipeline from native code; maps to CreateComputePipelineState. | ||
| 229 | struct XboxNativeComputeDesc { | ||
| 230 | ID3D12RootSignature* root_signature; | ||
| 231 | const void* kind0; | ||
| 232 | std::uint64_t kind0_size; | ||
| 233 | const void* kind1; | ||
| 234 | std::uint64_t kind1_size; | ||
| 235 | const void* kind6; | ||
| 236 | std::uint64_t kind6_size; | ||
| 237 | const void* kind7; | ||
| 238 | std::uint64_t kind7_size; | ||
| 239 | } native_desc{}; | ||
| 240 | native_desc.root_signature = root.p; | ||
| 241 | native_desc.kind6 = fssm.data(); | ||
| 242 | native_desc.kind6_size = fssm.size(); | ||
| 243 | Ref<ID3D12PipelineState> pso67, unknown67; | ||
| 244 | EXPECT(SUCCEEDED(reinterpret_cast<XboxNativeComputePipelineFn>(slot(device.p, 67))( | ||
| 245 | device.p, &native_desc, &pso_iid, reinterpret_cast<void**>(&pso67.p)))); | ||
| 246 | EXPECT(pso67.p != nullptr); | ||
| 247 | native_desc.kind6 = other.data(); | ||
| 248 | native_desc.kind6_size = other.size(); | ||
| 249 | EXPECT(reinterpret_cast<XboxNativeComputePipelineFn>(slot(device.p, 67))( | ||
| 250 | device.p, &native_desc, &pso_iid, reinterpret_cast<void**>(&unknown67.p)) == E_INVALIDARG && !unknown67.p); | ||
| 251 | void* out_null = reinterpret_cast<void*>(0x1111); | ||
| 252 | EXPECT(reinterpret_cast<XboxNativeComputePipelineFn>(slot(device.p, 67))( | ||
| 253 | device.p, nullptr, &pso_iid, &out_null) == E_INVALIDARG && !out_null); | ||
| 254 | out_null = reinterpret_cast<void*>(0x1111); | ||
| 255 | native_desc.kind6 = fssm.data(); | ||
| 256 | native_desc.kind6_size = fssm.size(); | ||
| 257 | EXPECT(reinterpret_cast<XboxNativeComputePipelineFn>(slot(device.p, 67))( | ||
| 258 | device.p, &native_desc, nullptr, &out_null) == E_POINTER && !out_null); | ||
| 259 | EXPECT(reinterpret_cast<XboxNativeComputePipelineFn>(slot(device.p, 67))( | ||
| 260 | device.p, &native_desc, &pso_iid, nullptr) == E_POINTER); | ||
| 261 | |||
| 224 | // A device whose maxPushConstantsSize is the Vulkan minimum (128 bytes) cannot hold the 144-byte block, so | 262 | // A device whose maxPushConstantsSize is the Vulkan minimum (128 bytes) cannot hold the 144-byte block, so |
| 225 | // its PSOs are refused instead of creating a pipeline layout the spec forbids (#224's fallback flag). | 263 | // its PSOs are refused instead of creating a pipeline layout the spec forbids (#224's fallback flag). |
| 226 | { | 264 | { |
| @@ -344,7 +382,131 @@ int main() { | |||
| 344 | std::memcpy(first.data(), results, bytes); | 382 | std::memcpy(first.data(), results, bytes); |
| 345 | std::memcpy(second.data(), static_cast<const std::uint8_t*>(results) + bytes, bytes); | 383 | std::memcpy(second.data(), static_cast<const std::uint8_t*>(results) + bytes, bytes); |
| 346 | 384 | ||
| 385 | // CreateConstantBufferView: populate shader-visible descriptor heap slots with GFX10 V# descriptors for a | ||
| 386 | // 512-byte arena constant buffer (two 256-byte CBVs: A at +0, B at +256) and null CBVs. | ||
| 387 | { | ||
| 388 | const UINT inc = device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV); | ||
| 389 | EXPECT(inc == 32); | ||
| 390 | const auto cb_desc = buffer_desc(512, D3D12_RESOURCE_FLAG_NONE); | ||
| 391 | Ref<ID3D12Resource> cb_upload, cb_default, cb_readback; | ||
| 392 | EXPECT(SUCCEEDED(device->CreateCommittedResource(&upload_heap, D3D12_HEAP_FLAG_NONE, &cb_desc, | ||
| 393 | D3D12_RESOURCE_STATE_GENERIC_READ, nullptr, | ||
| 394 | IID_PPV_ARGS(&cb_upload.p)))); | ||
| 395 | EXPECT(SUCCEEDED(device->CreateCommittedResource(&default_heap, D3D12_HEAP_FLAG_NONE, &cb_desc, | ||
| 396 | D3D12_RESOURCE_STATE_COPY_DEST, nullptr, | ||
| 397 | IID_PPV_ARGS(&cb_default.p)))); | ||
| 398 | const auto cb_rb_desc = buffer_desc(4 * bytes, D3D12_RESOURCE_FLAG_NONE); | ||
| 399 | EXPECT(SUCCEEDED(device->CreateCommittedResource(&readback_heap, D3D12_HEAP_FLAG_NONE, &cb_rb_desc, | ||
| 400 | D3D12_RESOURCE_STATE_COPY_DEST, nullptr, | ||
| 401 | IID_PPV_ARGS(&cb_readback.p)))); | ||
| 402 | void* cb_mapped = nullptr; | ||
| 403 | EXPECT(SUCCEEDED(cb_upload->Map(0, nullptr, &cb_mapped))); | ||
| 404 | auto* cb_words = static_cast<std::uint32_t*>(cb_mapped); | ||
| 405 | for (UINT i = 0; i < elements; ++i) { | ||
| 406 | cb_words[i] = 0x10000u + i; | ||
| 407 | cb_words[elements + i] = 0x20000u + i; | ||
| 408 | } | ||
| 409 | const D3D12_GPU_VIRTUAL_ADDRESS cb_va = cb_default->GetGPUVirtualAddress(); | ||
| 410 | EXPECT(cb_va >= 0x10000 && cb_va < (1ull << 32)); | ||
| 411 | |||
| 412 | const auto slot_cpu = [&](UINT idx) { return D3D12_CPU_DESCRIPTOR_HANDLE{SIZE_T(cpu + idx * inc)}; }; | ||
| 413 | const auto slot_gpu = [&](UINT idx) { return D3D12_GPU_DESCRIPTOR_HANDLE{gpu + idx * inc}; }; | ||
| 414 | |||
| 415 | // Pre-fill slot 3 with non-zero bytes to prove null CBV zeroes the entire 32-byte slot. | ||
| 416 | std::memset(reinterpret_cast<void*>(slot_cpu(3).ptr), 0xA5, inc); | ||
| 417 | device->CreateConstantBufferView(nullptr, slot_cpu(3)); | ||
| 418 | std::uint8_t zeros[32] = {}; | ||
| 419 | EXPECT(std::memcmp(reinterpret_cast<const void*>(slot_cpu(3).ptr), zeros, sizeof(zeros)) == 0); | ||
| 420 | |||
| 421 | // Zero BufferLocation or zero SizeInBytes also produces a zeroed null V#. | ||
| 422 | const D3D12_CONSTANT_BUFFER_VIEW_DESC zero_loc{0, 256}; | ||
| 423 | std::memset(reinterpret_cast<void*>(slot_cpu(3).ptr), 0x5A, inc); | ||
| 424 | device->CreateConstantBufferView(&zero_loc, slot_cpu(3)); | ||
| 425 | EXPECT(std::memcmp(reinterpret_cast<const void*>(slot_cpu(3).ptr), zeros, sizeof(zeros)) == 0); | ||
| 426 | const D3D12_CONSTANT_BUFFER_VIEW_DESC zero_size{cb_va, 0}; | ||
| 427 | std::memset(reinterpret_cast<void*>(slot_cpu(3).ptr), 0x5A, inc); | ||
| 428 | device->CreateConstantBufferView(&zero_size, slot_cpu(3)); | ||
| 429 | EXPECT(std::memcmp(reinterpret_cast<const void*>(slot_cpu(3).ptr), zeros, sizeof(zeros)) == 0); | ||
| 430 | |||
| 431 | const D3D12_CONSTANT_BUFFER_VIEW_DESC cbv_a{cb_va, 256}; | ||
| 432 | const D3D12_CONSTANT_BUFFER_VIEW_DESC cbv_b{cb_va + 256, 256}; | ||
| 433 | device->CreateConstantBufferView(&cbv_a, slot_cpu(1)); | ||
| 434 | device->CreateConstantBufferView(&cbv_b, slot_cpu(2)); | ||
| 435 | |||
| 436 | // Decode the written V# in slots 1 and 2 and verify every field + zeroed trailing 16 bytes. | ||
| 437 | for (const auto& [slot_idx, expected_va] : | ||
| 438 | {std::pair{1u, std::uint64_t(cb_va)}, std::pair{2u, std::uint64_t(cb_va + 256)}}) { | ||
| 439 | leonida::gfx10::BufferWords raw{}; | ||
| 440 | std::memcpy(raw.data(), reinterpret_cast<const void*>(slot_cpu(slot_idx).ptr), sizeof(raw)); | ||
| 441 | leonida::gfx10::Buffer decoded{}; | ||
| 442 | EXPECT(leonida::gfx10::decode(raw, decoded)); | ||
| 443 | EXPECT(decoded.address == expected_va); | ||
| 444 | EXPECT(decoded.stride == 0); | ||
| 445 | EXPECT(decoded.num_records == 256); | ||
| 446 | EXPECT(decoded.format == leonida::gfx10::format_from_vulkan(VK_FORMAT_R32_UINT)); | ||
| 447 | EXPECT(decoded.swizzle == leonida::gfx10::identity_swizzle); | ||
| 448 | EXPECT(decoded.oob_select == leonida::gfx10::OobSelect::raw); | ||
| 449 | EXPECT(std::memcmp(reinterpret_cast<const std::uint8_t*>(slot_cpu(slot_idx).ptr) + 16, zeros, 16) == 0); | ||
| 450 | } | ||
| 451 | |||
| 452 | // Copy CBV data into the arena buffer, then run 4 dispatches: | ||
| 453 | // 1) CBV A at byte offset 0 (all 64 dwords in-bounds) | ||
| 454 | // 2) CBV A at byte offset 128 (dwords 0..31 in-bounds, dwords 32..63 OOB -> 0) | ||
| 455 | // 3) CBV B at byte offset 0 (negative control: all 64 dwords flip to 0x20000 + i) | ||
| 456 | // 4) Null CBV at byte offset 0 (negative control: all 64 dwords become 0) | ||
| 457 | EXPECT(SUCCEEDED(allocator->Reset()) && SUCCEEDED(list->Reset(allocator.p, pso.p))); | ||
| 458 | list->CopyBufferRegion(cb_default.p, 0, cb_upload.p, 0, 512); | ||
| 459 | const D3D12_RESOURCE_BARRIER cb_ready[] = { | ||
| 460 | transition(cb_default.p, D3D12_RESOURCE_STATE_COPY_DEST, | ||
| 461 | D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER), | ||
| 462 | transition(out_a.p, D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_UNORDERED_ACCESS), | ||
| 463 | }; | ||
| 464 | list->ResourceBarrier(2, cb_ready); | ||
| 465 | list->SetDescriptorHeaps(1, heaps); | ||
| 466 | list->SetComputeRootSignature(root.p); | ||
| 467 | list->SetComputeRootUnorderedAccessView(1, va_a); | ||
| 468 | |||
| 469 | const struct CbvDispatch { | ||
| 470 | UINT byte_offset; | ||
| 471 | UINT slot_idx; | ||
| 472 | UINT readback_offset; | ||
| 473 | } cbv_dispatches[] = { | ||
| 474 | {0, 1, 0 * bytes}, | ||
| 475 | {128, 1, 1 * bytes}, | ||
| 476 | {0, 2, 2 * bytes}, | ||
| 477 | {0, 3, 3 * bytes}, | ||
| 478 | }; | ||
| 479 | for (const auto& d_cfg : cbv_dispatches) { | ||
| 480 | const std::uint32_t rc[2] = {d_cfg.byte_offset, 0}; // s1 == 0 selects CBV V# mode | ||
| 481 | list->SetComputeRoot32BitConstants(0, 2, rc, 0); | ||
| 482 | list->SetComputeRootDescriptorTable(2, slot_gpu(d_cfg.slot_idx)); | ||
| 483 | list->Dispatch(1, 1, 1); | ||
| 484 | const auto to_src = | ||
| 485 | transition(out_a.p, D3D12_RESOURCE_STATE_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_COPY_SOURCE); | ||
| 486 | list->ResourceBarrier(1, &to_src); | ||
| 487 | list->CopyBufferRegion(cb_readback.p, d_cfg.readback_offset, out_a.p, 0, bytes); | ||
| 488 | const auto to_uav = | ||
| 489 | transition(out_a.p, D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_UNORDERED_ACCESS); | ||
| 490 | list->ResourceBarrier(1, &to_uav); | ||
| 491 | } | ||
| 492 | EXPECT(list->Close() == S_OK); | ||
| 493 | queue->ExecuteCommandLists(1, lists); | ||
| 494 | EXPECT(rt::d3d12::last_execute_result(queue.p) == leonida::ReplayResult::success); | ||
| 495 | EXPECT(SUCCEEDED(queue->Signal(fence.p, 2))); | ||
| 496 | EXPECT(SUCCEEDED(fence->SetEventOnCompletion(2, nullptr))); | ||
| 497 | |||
| 498 | void* cb_res = nullptr; | ||
| 499 | EXPECT(SUCCEEDED(cb_readback->Map(0, nullptr, &cb_res))); | ||
| 500 | const auto* src_bytes = static_cast<const std::uint8_t*>(cb_res); | ||
| 501 | std::memcpy(cbv_a_out.data(), src_bytes + 0 * bytes, bytes); | ||
| 502 | std::memcpy(cbv_oob_out.data(), src_bytes + 1 * bytes, bytes); | ||
| 503 | std::memcpy(cbv_b_out.data(), src_bytes + 2 * bytes, bytes); | ||
| 504 | std::memcpy(cbv_null_out.data(), src_bytes + 3 * bytes, bytes); | ||
| 505 | } | ||
| 506 | |||
| 347 | for (auto* r : {&out_a, &out_b, &constants, &readback}) r->reset(); | 507 | for (auto* r : {&out_a, &out_b, &constants, &readback}) r->reset(); |
| 508 | pso67.reset(); | ||
| 509 | unknown67.reset(); | ||
| 348 | pso.reset(); | 510 | pso.reset(); |
| 349 | root.reset(); | 511 | root.reset(); |
| 350 | heap.reset(); | 512 | heap.reset(); |
| @@ -364,6 +526,27 @@ int main() { | |||
| 364 | std::fprintf(stderr, "element %u: got %u and %u, want %u and %u\n", i, first[i], second[i], a, b); | 526 | std::fprintf(stderr, "element %u: got %u and %u, want %u and %u\n", i, first[i], second[i], a, b); |
| 365 | } | 527 | } |
| 366 | EXPECT(!mismatches); | 528 | EXPECT(!mismatches); |
| 529 | UINT cbv_b_diff = 0, cbv_null_diff = 0; | ||
| 530 | for (std::uint32_t i = 0; i < elements; ++i) { | ||
| 531 | const std::uint32_t want_a = 0x10000u + i; | ||
| 532 | const std::uint32_t want_oob = i < 32 ? (0x10000u + 32u + i) : 0u; | ||
| 533 | const std::uint32_t want_b = 0x20000u + i; | ||
| 534 | if (cbv_a_out[i] != want_a && mismatches++ < 4) | ||
| 535 | std::fprintf(stderr, "CBV A[%u]: got 0x%x want 0x%x\n", i, cbv_a_out[i], want_a); | ||
| 536 | if (cbv_oob_out[i] != want_oob && mismatches++ < 4) | ||
| 537 | std::fprintf(stderr, "CBV OOB[%u]: got 0x%x want 0x%x\n", i, cbv_oob_out[i], want_oob); | ||
| 538 | if (cbv_b_out[i] != want_b && mismatches++ < 4) | ||
| 539 | std::fprintf(stderr, "CBV B[%u]: got 0x%x want 0x%x\n", i, cbv_b_out[i], want_b); | ||
| 540 | if (cbv_null_out[i] != 0u && mismatches++ < 4) | ||
| 541 | std::fprintf(stderr, "CBV null[%u]: got 0x%x want 0\n", i, cbv_null_out[i]); | ||
| 542 | if (cbv_b_out[i] != cbv_a_out[i]) ++cbv_b_diff; | ||
| 543 | if (cbv_null_out[i] != cbv_a_out[i]) ++cbv_null_diff; | ||
| 544 | } | ||
| 545 | EXPECT(!mismatches); | ||
| 546 | EXPECT(cbv_b_diff == elements && cbv_null_diff == elements); | ||
| 547 | std::printf("CreateConstantBufferView: 64/64 dwords matched for CBV A, 32 in-bounds + 32 OOB-zero matched at " | ||
| 548 | "+128, negative controls flipped %u/%u (CBV B) and %u/%u (null CBV)\n", | ||
| 549 | cbv_b_diff, elements, cbv_null_diff, elements); | ||
| 367 | if (d.validation_errors()) { | 550 | if (d.validation_errors()) { |
| 368 | std::fprintf(stderr, "%u validation errors\n", d.validation_errors()); | 551 | std::fprintf(stderr, "%u validation errors\n", d.validation_errors()); |
| 369 | return 1; | 552 | return 1; |
diff --git a/runtime/test/d3d12_copy_compare.h b/runtime/test/d3d12_copy_compare.h index 3679ab754..3d4281a17 100644 --- a/runtime/test/d3d12_copy_compare.h +++ b/runtime/test/d3d12_copy_compare.h | |||
| @@ -5,7 +5,8 @@ | |||
| 5 | // into a readback buffer prefilled with 0xcd, and the bytes are compared. Only the texels a footprint row holds are | 5 | // into a readback buffer prefilled with 0xcd, and the bytes are compared. Only the texels a footprint row holds are |
| 6 | // compared (row padding is the driver's); everything else, including the 0xcd around a partial copy, must match. | 6 | // compared (row padding is the driver's); everything else, including the 0xcd around a partial copy, must match. |
| 7 | // Layouts come from the host's GetCopyableFootprints for both sides (those are compared separately). | 7 | // Layouts come from the host's GetCopyableFootprints for both sides (those are compared separately). |
| 8 | // LEONIDA_HOST_ADAPTER picks the host side: "warp", or part of an adapter name; unset is the default adapter. | 8 | // LEONIDA_HOST_ADAPTER picks the host side: "warp", or part of an adapter name; unset is the layer's own adapter when |
| 9 | // the test has set layer_adapter(), else the default adapter. | ||
| 9 | #pragma once | 10 | #pragma once |
| 10 | #include <windows.h> | 11 | #include <windows.h> |
| 11 | #include <d3d12.h> | 12 | #include <d3d12.h> |
| @@ -18,6 +19,7 @@ | |||
| 18 | #include <cstdio> | 19 | #include <cstdio> |
| 19 | #include <cstring> | 20 | #include <cstring> |
| 20 | #include <functional> | 21 | #include <functional> |
| 22 | #include <optional> | ||
| 21 | #include <string> | 23 | #include <string> |
| 22 | #include <vector> | 24 | #include <vector> |
| 23 | 25 | ||
| @@ -110,12 +112,25 @@ inline bool try_create_host(Ptr<ID3D12Device>& host, std::string& name, const LU | |||
| 110 | return true; | 112 | return true; |
| 111 | } | 113 | } |
| 112 | 114 | ||
| 113 | // A host device, or false when there is none (the comparisons are then skipped). When LEONIDA_HOST_ADAPTER names an | 115 | // The adapter behind the layer's Vulkan device (VkPhysicalDeviceIDProperties::deviceLUID), for a test that knows it. |
| 114 | // adapter that cannot be had, the run fails: a typo must not turn the comparisons into a silent pass. | 116 | // On a PC with two GPUs D3D12's default adapter can be the other one, whose driver accepts other formats (an AMD |
| 117 | // layer device accepts an R9G9B9E5 render target that the NVIDIA host refuses), so the comparison would be between | ||
| 118 | // two GPUs instead of between the layer and the host runtime. | ||
| 119 | inline std::optional<LUID>& layer_adapter() { | ||
| 120 | static std::optional<LUID> luid; | ||
| 121 | return luid; | ||
| 122 | } | ||
| 123 | |||
| 124 | // A host device, or false when there is none (the comparisons are then skipped). Without LEONIDA_HOST_ADAPTER it is | ||
| 125 | // on the layer's own adapter when that is set and has a D3D12 device, else on the default adapter. When | ||
| 126 | // LEONIDA_HOST_ADAPTER names an adapter that cannot be had, the run fails: a typo must not turn the comparisons into a | ||
| 127 | // silent pass. | ||
| 115 | inline bool create_host(Ptr<ID3D12Device>& host, std::string& name) { | 128 | inline bool create_host(Ptr<ID3D12Device>& host, std::string& name) { |
| 116 | if (try_create_host(host, name)) return true; | ||
| 117 | char want[128] = {}; | 129 | char want[128] = {}; |
| 118 | if (GetEnvironmentVariableA("LEONIDA_HOST_ADAPTER", want, sizeof(want)) && want[0]) { | 130 | const bool named = GetEnvironmentVariableA("LEONIDA_HOST_ADAPTER", want, sizeof(want)) && want[0]; |
| 131 | if (!named && layer_adapter() && try_create_host(host, name, &*layer_adapter())) return true; | ||
| 132 | if (try_create_host(host, name)) return true; | ||
| 133 | if (named) { | ||
| 119 | std::fprintf(stderr, "LEONIDA_HOST_ADAPTER=%s: no such adapter, or no D3D12 device on it\n", want); | 134 | std::fprintf(stderr, "LEONIDA_HOST_ADAPTER=%s: no such adapter, or no D3D12 device on it\n", want); |
| 120 | std::exit(1); | 135 | std::exit(1); |
| 121 | } | 136 | } |
diff --git a/runtime/test/d3d12_descriptor_test.cpp b/runtime/test/d3d12_descriptor_test.cpp index 64ef24da6..13c10d043 100644 --- a/runtime/test/d3d12_descriptor_test.cpp +++ b/runtime/test/d3d12_descriptor_test.cpp | |||
| @@ -698,6 +698,42 @@ int main() { | |||
| 698 | const auto null_at = [&](UINT i) { | 698 | const auto null_at = [&](UINT i) { |
| 699 | return std::all_of(view_bytes(i), view_bytes(i) + step, [](std::uint8_t byte) { return byte == 0; }); | 699 | return std::all_of(view_bytes(i), view_bytes(i) + step, [](std::uint8_t byte) { return byte == 0; }); |
| 700 | }; | 700 | }; |
| 701 | // An explicit D3D12_SRV_DIMENSION_TEXTURE1D view on a 1D texture array selects layer zero (like TEXTURE2D | ||
| 702 | // and TEXTURE2DMS on 2D arrays), while a default (nullptr) SRV on a 1D array remains a null descriptor. | ||
| 703 | { | ||
| 704 | auto line_array_desc = line_desc; | ||
| 705 | line_array_desc.DepthOrArraySize = 3; | ||
| 706 | Ref<ID3D12Resource> line_array; | ||
| 707 | EXPECT(SUCCEEDED(device->CreateCommittedResource(&default_heap, D3D12_HEAP_FLAG_NONE, &line_array_desc, | ||
| 708 | D3D12_RESOURCE_STATE_COMMON, nullptr, | ||
| 709 | IID_PPV_ARGS(&line_array.p)))); | ||
| 710 | D3D12_DESCRIPTOR_HEAP_DESC la_heap_desc{D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, 2, | ||
| 711 | D3D12_DESCRIPTOR_HEAP_FLAG_NONE, 0}; | ||
| 712 | Ref<ID3D12DescriptorHeap> la_heap; | ||
| 713 | EXPECT(SUCCEEDED(device->CreateDescriptorHeap(&la_heap_desc, IID_PPV_ARGS(&la_heap.p)))); | ||
| 714 | const std::uint64_t la_cpu = reinterpret_cast<XboxHeapHandleFn>(slot(la_heap.p, 9))(la_heap.p); | ||
| 715 | const D3D12_CPU_DESCRIPTOR_HANDLE la_default{SIZE_T(la_cpu)}, la_slice0{SIZE_T(la_cpu + step)}; | ||
| 716 | std::memset(reinterpret_cast<void*>(la_default.ptr), 0x77, step); | ||
| 717 | device->CreateShaderResourceView(line_array.p, nullptr, la_default); | ||
| 718 | EXPECT(std::all_of(reinterpret_cast<const std::uint8_t*>(la_default.ptr), | ||
| 719 | reinterpret_cast<const std::uint8_t*>(la_default.ptr) + step, | ||
| 720 | [](std::uint8_t byte) { return byte == 0; })); | ||
| 721 | D3D12_SHADER_RESOURCE_VIEW_DESC la_view{}; | ||
| 722 | la_view.Format = DXGI_FORMAT_UNKNOWN; | ||
| 723 | la_view.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE1D; | ||
| 724 | la_view.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING; | ||
| 725 | la_view.Texture1D = {1, 1, 0}; | ||
| 726 | device->CreateShaderResourceView(line_array.p, &la_view, la_slice0); | ||
| 727 | g::ImageWords la_words{}; | ||
| 728 | std::memcpy(la_words.data(), reinterpret_cast<const void*>(la_slice0.ptr), sizeof(la_words)); | ||
| 729 | g::Image la_image{}; | ||
| 730 | EXPECT(g::is_image(la_words) && g::decode(la_words, la_image) && | ||
| 731 | la_image.type == g::ImageType::image_1d && la_image.first_mip == 1 && la_image.mip_count == 1 && | ||
| 732 | la_image.first_layer == 0 && la_image.layer_count == 1); | ||
| 733 | std::uint32_t la_key[8]{}; | ||
| 734 | std::memcpy(la_key, la_words.data(), sizeof(la_key)); | ||
| 735 | EXPECT(rt::d3d12::bindless_hash_lookup(device.p, la_key) != 0); | ||
| 736 | } | ||
| 701 | D3D12_RESOURCE_DESC ms_desc = texture_desc; | 737 | D3D12_RESOURCE_DESC ms_desc = texture_desc; |
| 702 | ms_desc.Width = ms_desc.Height = 4; | 738 | ms_desc.Width = ms_desc.Height = 4; |
| 703 | ms_desc.SampleDesc.Count = 4; | 739 | ms_desc.SampleDesc.Count = 4; |
| @@ -2166,6 +2202,47 @@ int main() { | |||
| 2166 | #endif | 2202 | #endif |
| 2167 | } | 2203 | } |
| 2168 | 2204 | ||
| 2205 | // Cross-family castable SRV: write_image_descriptor must pass resource.has_view_format_list() into a single | ||
| 2206 | // bind_image call so a listed R8G8B8A8_UINT -> R32_UINT view registers cleanly without a spurious first-pass | ||
| 2207 | // failure (and without double-binding every view). | ||
| 2208 | if (d.bindless) { | ||
| 2209 | Ref<ID3D12Device10> inner10; | ||
| 2210 | EXPECT(SUCCEEDED(inner->QueryInterface(IID_PPV_ARGS(&inner10.p)))); | ||
| 2211 | D3D12_RESOURCE_DESC1 cast_desc{}; | ||
| 2212 | cast_desc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D; | ||
| 2213 | cast_desc.Width = 4; | ||
| 2214 | cast_desc.Height = 4; | ||
| 2215 | cast_desc.DepthOrArraySize = 1; | ||
| 2216 | cast_desc.MipLevels = 1; | ||
| 2217 | cast_desc.Format = DXGI_FORMAT_R8G8B8A8_UINT; | ||
| 2218 | cast_desc.SampleDesc = {1, 0}; | ||
| 2219 | cast_desc.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN; | ||
| 2220 | const DXGI_FORMAT cast_formats[] = {DXGI_FORMAT_R8G8B8A8_UINT, DXGI_FORMAT_R32_UINT}; | ||
| 2221 | Ref<ID3D12Resource> cast_tex; | ||
| 2222 | EXPECT(SUCCEEDED(inner10->CreateCommittedResource3( | ||
| 2223 | &default_heap, D3D12_HEAP_FLAG_NONE, &cast_desc, D3D12_BARRIER_LAYOUT_COMMON, nullptr, nullptr, | ||
| 2224 | 2, cast_formats, IID_PPV_ARGS(&cast_tex.p)))); | ||
| 2225 | const D3D12_DESCRIPTOR_HEAP_DESC cast_hd{D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, 1, | ||
| 2226 | D3D12_DESCRIPTOR_HEAP_FLAG_NONE, 0}; | ||
| 2227 | Ref<ID3D12DescriptorHeap> cast_heap; | ||
| 2228 | EXPECT(SUCCEEDED(inner10->CreateDescriptorHeap(&cast_hd, IID_PPV_ARGS(&cast_heap.p)))); | ||
| 2229 | const D3D12_CPU_DESCRIPTOR_HANDLE cast_slot = cast_heap->GetCPUDescriptorHandleForHeapStart(); | ||
| 2230 | D3D12_SHADER_RESOURCE_VIEW_DESC cast_srv{}; | ||
| 2231 | cast_srv.Format = DXGI_FORMAT_R32_UINT; | ||
| 2232 | cast_srv.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE2D; | ||
| 2233 | cast_srv.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING; | ||
| 2234 | cast_srv.Texture2D.MipLevels = 1; | ||
| 2235 | inner10->CreateShaderResourceView(cast_tex.p, &cast_srv, cast_slot); | ||
| 2236 | g::ImageWords cast_words{}; | ||
| 2237 | std::memcpy(cast_words.data(), reinterpret_cast<const void*>(cast_slot.ptr), sizeof(cast_words)); | ||
| 2238 | g::Image decoded{}; | ||
| 2239 | EXPECT(g::decode(cast_words, decoded) && decoded.type == g::ImageType::image_2d); | ||
| 2240 | EXPECT(decoded.format == g::format_from_vulkan(VK_FORMAT_R32_UINT)); | ||
| 2241 | std::uint32_t cast_key[8]{}; | ||
| 2242 | std::memcpy(cast_key, cast_words.data(), sizeof(cast_key)); | ||
| 2243 | EXPECT(rt::d3d12::bindless_hash_lookup(device.p, cast_key) != 0); | ||
| 2244 | } | ||
| 2245 | |||
| 2169 | upload.reset(); | 2246 | upload.reset(); |
| 2170 | array_texture.reset(); | 2247 | array_texture.reset(); |
| 2171 | line.reset(); | 2248 | line.reset(); |
diff --git a/runtime/test/d3d12_draw_test.cpp b/runtime/test/d3d12_draw_test.cpp index 1c29d3822..12a1c71cf 100644 --- a/runtime/test/d3d12_draw_test.cpp +++ b/runtime/test/d3d12_draw_test.cpp | |||
| @@ -630,7 +630,8 @@ int main() { | |||
| 630 | EXPECT(list->Close() == S_OK); | 630 | EXPECT(list->Close() == S_OK); |
| 631 | queue->ExecuteCommandLists(1, lists); | 631 | queue->ExecuteCommandLists(1, lists); |
| 632 | EXPECT(rt::d3d12::last_execute_result(queue.p) == leonida::ReplayResult::success); | 632 | EXPECT(rt::d3d12::last_execute_result(queue.p) == leonida::ReplayResult::success); |
| 633 | EXPECT(SUCCEEDED(queue->Signal(fence.p, 4)) && SUCCEEDED(fence->SetEventOnCompletion(4, nullptr))); | 633 | // Above the strip passes' 20: a lower value is already reached, so the wait would return at once. |
| 634 | EXPECT(SUCCEEDED(queue->Signal(fence.p, 21)) && SUCCEEDED(fence->SetEventOnCompletion(21, nullptr))); | ||
| 634 | const auto* result = static_cast<const std::uint8_t*>(mapped); | 635 | const auto* result = static_cast<const std::uint8_t*>(mapped); |
| 635 | for (UINT row = 0; row < size; ++row) { | 636 | for (UINT row = 0; row < size; ++row) { |
| 636 | for (UINT col = 0; col < size; ++col) { | 637 | for (UINT col = 0; col < size; ++col) { |
diff --git a/runtime/test/d3d12_gcl8_test.cpp b/runtime/test/d3d12_gcl8_test.cpp index 5872a624f..8b0426e6c 100644 --- a/runtime/test/d3d12_gcl8_test.cpp +++ b/runtime/test/d3d12_gcl8_test.cpp | |||
| @@ -36,6 +36,10 @@ int main(int argc, char** argv) { | |||
| 36 | EXPECT(SUCCEEDED(create_command_allocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(&allocator.p)))); | 36 | EXPECT(SUCCEEDED(create_command_allocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(&allocator.p)))); |
| 37 | EXPECT(SUCCEEDED(create_command_list(D3D12_COMMAND_LIST_TYPE_DIRECT, allocator.p, IID_PPV_ARGS(&list7.p)))); | 37 | EXPECT(SUCCEEDED(create_command_list(D3D12_COMMAND_LIST_TYPE_DIRECT, allocator.p, IID_PPV_ARGS(&list7.p)))); |
| 38 | 38 | ||
| 39 | // Null bindings exercise the public entry points without creating a pipeline or loading Vulkan. | ||
| 40 | list7.p->SetPipelineState(nullptr); | ||
| 41 | list7.p->SetGraphicsRootSignature(nullptr); | ||
| 42 | |||
| 39 | // AddRef through the GCL7 pointer gives the count this test expects while the QueryInterface reference is held. | 43 | // AddRef through the GCL7 pointer gives the count this test expects while the QueryInterface reference is held. |
| 40 | const ULONG held = list7.p->AddRef(); | 44 | const ULONG held = list7.p->AddRef(); |
| 41 | list7.p->Release(); | 45 | list7.p->Release(); |
diff --git a/runtime/test/d3d12_m2_textured_test.cpp b/runtime/test/d3d12_m2_textured_test.cpp index db8e9fd3f..8d13bf214 100644 --- a/runtime/test/d3d12_m2_textured_test.cpp +++ b/runtime/test/d3d12_m2_textured_test.cpp | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | // [1] POINT/WRAP. The left half takes the WRAP sampler (U + 1 wraps back: the gradient again), the right half the | 20 | // [1] POINT/WRAP. The left half takes the WRAP sampler (U + 1 wraps back: the gradient again), the right half the |
| 21 | // CLAMP one (U + 1 clamps to the last column: each row is that row's right-edge texel of the reflected texture). The | 21 | // CLAMP one (U + 1 clamps to the last column: each row is that row's right-edge texel of the reflected texture). The |
| 22 | // pixels are predicted on the CPU, error 0, and 1536 of them differ from the plain reflection. | 22 | // pixels are predicted on the CPU, error 0, and 1536 of them differ from the plain reflection. |
| 23 | // The control also keeps one unbounded SRV table bound and selects its two entries by a root constant. | ||
| 23 | // Set LEONIDA_VK_VALIDATION=1 to run under VK_LAYER_KHRONOS_validation (0 errors required). | 24 | // Set LEONIDA_VK_VALIDATION=1 to run under VK_LAYER_KHRONOS_validation (0 errors required). |
| 24 | #include "vk_test_device.h" | 25 | #include "vk_test_device.h" |
| 25 | #include "d3d12_test_shaders.h" | 26 | #include "d3d12_test_shaders.h" |
| @@ -148,6 +149,22 @@ int main() { | |||
| 148 | pso_desc.SampleDesc.Count = 1; | 149 | pso_desc.SampleDesc.Count = 1; |
| 149 | Ref<ID3D12PipelineState> pso, uoff_pso; | 150 | Ref<ID3D12PipelineState> pso, uoff_pso; |
| 150 | EXPECT(SUCCEEDED(device->CreateGraphicsPipelineState(&pso_desc, IID_PPV_ARGS(&pso.p)))); | 151 | EXPECT(SUCCEEDED(device->CreateGraphicsPipelineState(&pso_desc, IID_PPV_ARGS(&pso.p)))); |
| 152 | D3D12_DESCRIPTOR_RANGE indexed_range = srv_range; | ||
| 153 | indexed_range.NumDescriptors = UINT32_MAX; | ||
| 154 | D3D12_ROOT_PARAMETER indexed_params[3] = {params[0], params[1], {}}; | ||
| 155 | indexed_params[0].DescriptorTable = {1, &indexed_range}; | ||
| 156 | indexed_params[2].ParameterType = D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS; | ||
| 157 | indexed_params[2].ShaderVisibility = D3D12_SHADER_VISIBILITY_PIXEL; | ||
| 158 | indexed_params[2].Constants = {0, 0, 2}; // s4 = SRV index, s5 = SRV stride in bytes | ||
| 159 | D3D12_VERSIONED_ROOT_SIGNATURE_DESC indexed_desc = root_desc; | ||
| 160 | indexed_desc.Desc_1_0.NumParameters = 3; | ||
| 161 | indexed_desc.Desc_1_0.pParameters = indexed_params; | ||
| 162 | const auto indexed_blob = serialize_root_signature(indexed_desc); | ||
| 163 | EXPECT(!indexed_blob.empty()); | ||
| 164 | Ref<ID3D12RootSignature> indexed_root; | ||
| 165 | EXPECT(SUCCEEDED(device->CreateRootSignature(0, indexed_blob.data(), indexed_blob.size(), | ||
| 166 | IID_PPV_ARGS(&indexed_root.p)))); | ||
| 167 | pso_desc.pRootSignature = indexed_root.p; | ||
| 151 | pso_desc.PS = {uoff_container.data(), uoff_container.size()}; | 168 | pso_desc.PS = {uoff_container.data(), uoff_container.size()}; |
| 152 | EXPECT(SUCCEEDED(device->CreateGraphicsPipelineState(&pso_desc, IID_PPV_ARGS(&uoff_pso.p)))); | 169 | EXPECT(SUCCEEDED(device->CreateGraphicsPipelineState(&pso_desc, IID_PPV_ARGS(&uoff_pso.p)))); |
| 153 | 170 | ||
| @@ -350,8 +367,9 @@ int main() { | |||
| 350 | D3D12_RESOURCE_STATE_RENDER_TARGET); | 367 | D3D12_RESOURCE_STATE_RENDER_TARGET); |
| 351 | list2->ResourceBarrier(1, &back); | 368 | list2->ResourceBarrier(1, &back); |
| 352 | list2->ClearRenderTargetView(rtv, clear, 0, nullptr); | 369 | list2->ClearRenderTargetView(rtv, clear, 0, nullptr); |
| 353 | list2->SetGraphicsRootSignature(root.p); | 370 | list2->SetGraphicsRootSignature(indexed_root.p); |
| 354 | list2->SetDescriptorHeaps(2, heaps); | 371 | list2->SetDescriptorHeaps(2, heaps); |
| 372 | list2->SetGraphicsRootDescriptorTable(0, D3D12_GPU_DESCRIPTOR_HANDLE{srv_gpu}); | ||
| 355 | list2->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST); | 373 | list2->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST); |
| 356 | list2->IASetIndexBuffer(&ibv); | 374 | list2->IASetIndexBuffer(&ibv); |
| 357 | list2->RSSetViewports(1, &viewport); | 375 | list2->RSSetViewports(1, &viewport); |
| @@ -359,7 +377,8 @@ int main() { | |||
| 359 | for (UINT half = 0; half < 2; ++half) { | 377 | for (UINT half = 0; half < 2; ++half) { |
| 360 | const D3D12_RECT scissor{LONG(half * target_size / 2), 0, LONG((half + 1) * target_size / 2), LONG(target_size)}; | 378 | const D3D12_RECT scissor{LONG(half * target_size / 2), 0, LONG((half + 1) * target_size / 2), LONG(target_size)}; |
| 361 | list2->RSSetScissorRects(1, &scissor); | 379 | list2->RSSetScissorRects(1, &scissor); |
| 362 | list2->SetGraphicsRootDescriptorTable(0, D3D12_GPU_DESCRIPTOR_HANDLE{srv_gpu + std::uint64_t(half) * step}); | 380 | const UINT srv_args[] = {half, step}; |
| 381 | list2->SetGraphicsRoot32BitConstants(2, 2, srv_args, 0); | ||
| 363 | list2->SetGraphicsRootDescriptorTable( | 382 | list2->SetGraphicsRootDescriptorTable( |
| 364 | 1, D3D12_GPU_DESCRIPTOR_HANDLE{sampler_gpu + std::uint64_t(half == 0 ? sampler_step : 0)}); | 383 | 1, D3D12_GPU_DESCRIPTOR_HANDLE{sampler_gpu + std::uint64_t(half == 0 ? sampler_step : 0)}); |
| 365 | list2->DrawIndexedInstanced(6, 1, 0, 0, 0); | 384 | list2->DrawIndexedInstanced(6, 1, 0, 0, 0); |
| @@ -387,6 +406,7 @@ int main() { | |||
| 387 | uoff_pso.reset(); | 406 | uoff_pso.reset(); |
| 388 | list2.reset(); | 407 | list2.reset(); |
| 389 | allocator2.reset(); | 408 | allocator2.reset(); |
| 409 | indexed_root.reset(); | ||
| 390 | root.reset(); | 410 | root.reset(); |
| 391 | srv_heap.reset(); | 411 | srv_heap.reset(); |
| 392 | sampler_heap.reset(); | 412 | sampler_heap.reset(); |
diff --git a/runtime/test/d3d12_m4_compute_test.cpp b/runtime/test/d3d12_m4_compute_test.cpp new file mode 100644 index 000000000..bd3a555fd --- /dev/null +++ b/runtime/test/d3d12_m4_compute_test.cpp | |||
| @@ -0,0 +1,395 @@ | |||
| 1 | // Milestone M4, the synthetic part (docs/d3d12_vulkan.md section 6): a compute workload with the structure a game's asset | ||
| 2 | // streaming and compute passes have, through the D3D12 API on the proxy, with compute shaders that are translator output | ||
| 3 | // (test/shaders/cs_m4_fill.asm and cs_m4_indirect.asm, hand-written RDNA2). | ||
| 4 | // Three queues' worth of work, each its own command list type: | ||
| 5 | // COPY queue streams an input buffer: CopyBufferRegion from an UPLOAD buffer into a DEFAULT buffer that was created | ||
| 6 | // in COMMON (promoted to COPY_DEST there), then Signal(copy fence, 1). | ||
| 7 | // COMPUTE queue Wait(copy fence, 1), then one list: a barrier COMMON -> UNORDERED_ACCESS for the input, a compute root | ||
| 8 | // signature (four root constants and a descriptor table of five UAVs: a structured buffer, a raw | ||
| 9 | // buffer, an R32_UINT RWTexture2D, the raw input and a raw output), a compute PSO, and Dispatch with | ||
| 10 | // four groups. That shader fills the structured buffer and the image from the input and writes the | ||
| 11 | // arguments of the next dispatch into the raw buffer. Barriers (a transition of the argument buffer to | ||
| 12 | // INDIRECT_ARGUMENT and UAV barriers on the buffer and the image) and ExecuteIndirect with a dispatch | ||
| 13 | // command signature runs a second PSO whose group count is that buffer's first word: it reads the | ||
| 14 | // structured buffer and the image back and writes the raw output. Everything then goes to COMMON and | ||
| 15 | // the queue does Signal(compute fence, 1). | ||
| 16 | // COPY queue Wait(compute fence, 1), a COPY list that copies the five results (four buffers and the image through | ||
| 17 | // CopyTextureRegion) to a READBACK buffer, Signal(copy fence, 2). The CPU waits for that with | ||
| 18 | // SetEventOnCompletion and an event. | ||
| 19 | // When the Vulkan family has two queues, the copy and the compute D3D12 queue get their own VkQueue (so the fences are | ||
| 20 | // real cross-queue semaphores); with one, they share it. Either way the three batches are submitted in dependency order. | ||
| 21 | // Compared with a CPU reference, word by word, error 0: the input after the round trip, the structured buffer, the | ||
| 22 | // argument buffer, the image and the indirect dispatch's output (which also shows that exactly the 3 groups the | ||
| 23 | // first dispatch asked for ran). | ||
| 24 | // Set LEONIDA_VK_VALIDATION=1 to run under VK_LAYER_KHRONOS_validation (0 errors required). | ||
| 25 | #include "vk_test_device.h" | ||
| 26 | #include "d3d12_test_shaders.h" | ||
| 27 | #include "../shims/d3d12_com.h" | ||
| 28 | #include "../shims/d3d12_xs_device.h" | ||
| 29 | #include "../src/shader_library.h" | ||
| 30 | |||
| 31 | #include <array> | ||
| 32 | #include <cstring> | ||
| 33 | |||
| 34 | #ifndef LEONIDA_TEST_M4_DIR | ||
| 35 | #error "LEONIDA_TEST_M4_DIR must name the folder build.py wrote (spirv/index.json, fssm/cs_*.fssm)" | ||
| 36 | #endif | ||
| 37 | |||
| 38 | #define EXPECT(condition) do { \ | ||
| 39 | if (!(condition)) { std::fprintf(stderr, "line %d: %s\n", __LINE__, #condition); return 1; } \ | ||
| 40 | } while (0) | ||
| 41 | |||
| 42 | using namespace d3d12test; | ||
| 43 | using XboxHeapHandleFn = std::uint64_t(WINAPI*)(void* heap); // heap slots 9/10: handle in RAX | ||
| 44 | |||
| 45 | namespace { | ||
| 46 | |||
| 47 | std::vector<std::uint8_t> read_file(const std::filesystem::path& path) { | ||
| 48 | std::ifstream in(path, std::ios::binary); | ||
| 49 | return {std::istreambuf_iterator<char>(in), std::istreambuf_iterator<char>()}; | ||
| 50 | } | ||
| 51 | |||
| 52 | constexpr UINT records = 256; // fill: 4 groups of 64 | ||
| 53 | constexpr UINT second_groups = 3; // the indirect dispatch: 3 groups of 64 | ||
| 54 | constexpr UINT image_dim = 16; // 16 x 16 R32_UINT, one texel a record | ||
| 55 | constexpr UINT seed = 0x00c0ffee, multiplier = 0x01000193; | ||
| 56 | // The readback buffer: the structured buffer, the argument buffer's 16 bytes, the second output, the input, the image. | ||
| 57 | constexpr UINT64 data_bytes = records * 16, args_bytes = 16, out2_bytes = second_groups * 64 * 8, in_bytes = records * 4; | ||
| 58 | constexpr UINT64 offset_data = 0, offset_args = offset_data + data_bytes, offset_out2 = offset_args + args_bytes, | ||
| 59 | offset_in = offset_out2 + out2_bytes; | ||
| 60 | constexpr UINT64 offset_image = (offset_in + in_bytes + 511) / 512 * 512; | ||
| 61 | constexpr UINT image_pitch = D3D12_TEXTURE_DATA_PITCH_ALIGNMENT; | ||
| 62 | constexpr UINT64 readback_bytes = offset_image + UINT64(image_dim) * image_pitch; | ||
| 63 | |||
| 64 | std::uint32_t rotr(std::uint32_t v, unsigned n) { return (v >> n) | (v << (32 - n)); } | ||
| 65 | std::uint32_t input_word(UINT g) { return (g + 1) * 0x9e3779b1u ^ (g << 7); } | ||
| 66 | |||
| 67 | struct Reference { | ||
| 68 | std::vector<std::uint32_t> data, args, in, image, out2; | ||
| 69 | }; | ||
| 70 | Reference reference() { | ||
| 71 | Reference ref; | ||
| 72 | ref.args = {second_groups, 1, 1, 0xc0de0001u}; | ||
| 73 | ref.data.resize(records * 4); | ||
| 74 | ref.image.resize(image_dim * image_dim); | ||
| 75 | for (UINT g = 0; g < records; ++g) { | ||
| 76 | const std::uint32_t in = input_word(g); | ||
| 77 | ref.in.push_back(in); | ||
| 78 | ref.data[g * 4 + 0] = in + seed; | ||
| 79 | ref.data[g * 4 + 1] = g * multiplier; | ||
| 80 | ref.data[g * 4 + 2] = in ^ (g << 8); | ||
| 81 | ref.data[g * 4 + 3] = rotr(in, 13); | ||
| 82 | const UINT x = g & 15, y = g >> 4; | ||
| 83 | ref.image[y * image_dim + x] = in * 3 + x * 0x10001u + y; | ||
| 84 | } | ||
| 85 | for (UINT g = 0; g < second_groups * 64; ++g) { | ||
| 86 | const std::uint32_t t = ref.image[g]; // (g & 15, g >> 4) is texel g of the row-major image | ||
| 87 | ref.out2.push_back((ref.data[g * 4 + 0] + t) ^ ref.data[g * 4 + 3]); | ||
| 88 | ref.out2.push_back((ref.data[g * 4 + 2] ^ t) + ref.data[g * 4 + 1]); | ||
| 89 | } | ||
| 90 | return ref; | ||
| 91 | } | ||
| 92 | |||
| 93 | } // namespace | ||
| 94 | |||
| 95 | int main() { | ||
| 96 | vktest::Device d; | ||
| 97 | d.queue_count_wanted = 2; // the copy queue and the compute queue each get a VkQueue where the family has two | ||
| 98 | const auto device_status = d.initialize(); | ||
| 99 | if (device_status == vktest::DeviceStatus::unavailable) return 77; // no Vulkan GPU: ctest skips | ||
| 100 | if (device_status != vktest::DeviceStatus::ready) return 1; | ||
| 101 | if (!d.bindless) { | ||
| 102 | std::printf("SKIP: the device lacks the descriptor indexing features of the bindless set 0\n"); | ||
| 103 | return 77; | ||
| 104 | } | ||
| 105 | |||
| 106 | const std::filesystem::path root_dir = LEONIDA_TEST_M4_DIR; | ||
| 107 | leonida::ShaderLibrary library; | ||
| 108 | EXPECT(library.load((root_dir / "spirv").string())); | ||
| 109 | const auto program = [&](const char* name) { return read_file(root_dir / "fssm" / (std::string(name) + ".fssm")); }; | ||
| 110 | const auto fill = program("cs_m4_fill"), indirect = program("cs_m4_indirect"); | ||
| 111 | EXPECT(fill.size() >= 0x150 && indirect.size() >= 0x150 && fill != indirect); | ||
| 112 | EXPECT(library.find("cs", leonida::sha256_hex(fill)) && library.find("cs", leonida::sha256_hex(indirect))); | ||
| 113 | const auto fill_container = shader_container(fill), indirect_container = shader_container(indirect); | ||
| 114 | |||
| 115 | const bool distinct_queues = d.queues.size() >= 2; | ||
| 116 | Reference want = reference(); | ||
| 117 | std::vector<std::uint8_t> got; | ||
| 118 | { | ||
| 119 | rt::d3d12::VulkanDeviceInfo info{}; | ||
| 120 | info.get_instance_proc = d.instance_proc; | ||
| 121 | info.instance = d.instance; | ||
| 122 | info.physical = d.physical; | ||
| 123 | info.device = d.device; | ||
| 124 | info.queue = d.queue; | ||
| 125 | info.queue_family = d.family; | ||
| 126 | if (distinct_queues) info.command_queues = d.queues; | ||
| 127 | info.buffer_device_address = true; | ||
| 128 | info.bindless = d.bindless; | ||
| 129 | info.bindless_partially_bound = d.partially_bound; | ||
| 130 | info.image_view_min_lod = d.image_view_min_lod; | ||
| 131 | info.shader_dir = (root_dir / "spirv").string(); | ||
| 132 | ID3D12Device* inner = nullptr; | ||
| 133 | EXPECT(SUCCEEDED(rt::d3d12::create_vulkan_device(info, IID_PPV_ARGS(&inner)))); | ||
| 134 | Ref<ID3D12Device> device; | ||
| 135 | EXPECT(SUCCEEDED(rt::d3d12_xs::create_device_proxy(inner, __uuidof(ID3D12Device), | ||
| 136 | reinterpret_cast<void**>(&device.p)))); | ||
| 137 | rt::d3d12::set_device_outer(inner, device.p); | ||
| 138 | EXPECT(rt::d3d12::bindless_set(device.p) != VK_NULL_HANDLE); | ||
| 139 | |||
| 140 | // [0] four 32-bit constants (s0..s3), [1] a table of five UAVs (s[4:5]). | ||
| 141 | D3D12_DESCRIPTOR_RANGE uav_range{D3D12_DESCRIPTOR_RANGE_TYPE_UAV, 5, 0, 0, 0}; | ||
| 142 | D3D12_ROOT_PARAMETER params[2] = {}; | ||
| 143 | params[0].ParameterType = D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS; | ||
| 144 | params[0].Constants = {0, 0, 4}; | ||
| 145 | params[0].ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL; | ||
| 146 | params[1].ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE; | ||
| 147 | params[1].DescriptorTable = {1, &uav_range}; | ||
| 148 | params[1].ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL; | ||
| 149 | D3D12_VERSIONED_ROOT_SIGNATURE_DESC root_desc{}; | ||
| 150 | root_desc.Version = D3D_ROOT_SIGNATURE_VERSION_1_0; | ||
| 151 | root_desc.Desc_1_0 = {2, params, 0, nullptr, D3D12_ROOT_SIGNATURE_FLAG_NONE}; | ||
| 152 | const auto root_blob = serialize_root_signature(root_desc); | ||
| 153 | EXPECT(!root_blob.empty()); | ||
| 154 | Ref<ID3D12RootSignature> root; | ||
| 155 | EXPECT(SUCCEEDED(device->CreateRootSignature(0, root_blob.data(), root_blob.size(), IID_PPV_ARGS(&root.p)))); | ||
| 156 | |||
| 157 | D3D12_COMPUTE_PIPELINE_STATE_DESC pso_desc{}; | ||
| 158 | pso_desc.pRootSignature = root.p; | ||
| 159 | pso_desc.CS = {fill_container.data(), fill_container.size()}; | ||
| 160 | Ref<ID3D12PipelineState> pso_fill, pso_indirect; | ||
| 161 | EXPECT(SUCCEEDED(device->CreateComputePipelineState(&pso_desc, IID_PPV_ARGS(&pso_fill.p)))); | ||
| 162 | pso_desc.CS = {indirect_container.data(), indirect_container.size()}; | ||
| 163 | EXPECT(SUCCEEDED(device->CreateComputePipelineState(&pso_desc, IID_PPV_ARGS(&pso_indirect.p)))); | ||
| 164 | |||
| 165 | D3D12_INDIRECT_ARGUMENT_DESC argument{}; | ||
| 166 | argument.Type = D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH; | ||
| 167 | D3D12_COMMAND_SIGNATURE_DESC signature_desc{}; | ||
| 168 | signature_desc.ByteStride = sizeof(D3D12_DISPATCH_ARGUMENTS); | ||
| 169 | signature_desc.NumArgumentDescs = 1; | ||
| 170 | signature_desc.pArgumentDescs = &argument; | ||
| 171 | Ref<ID3D12CommandSignature> signature; | ||
| 172 | EXPECT(SUCCEEDED(device->CreateCommandSignature(&signature_desc, nullptr, IID_PPV_ARGS(&signature.p)))); | ||
| 173 | |||
| 174 | const D3D12_HEAP_PROPERTIES default_heap{D3D12_HEAP_TYPE_DEFAULT}; | ||
| 175 | const D3D12_HEAP_PROPERTIES upload_heap{D3D12_HEAP_TYPE_UPLOAD}; | ||
| 176 | const D3D12_HEAP_PROPERTIES readback_heap{D3D12_HEAP_TYPE_READBACK}; | ||
| 177 | constexpr auto uav_flag = D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS; | ||
| 178 | constexpr auto uav_state = D3D12_RESOURCE_STATE_UNORDERED_ACCESS; | ||
| 179 | constexpr auto common = D3D12_RESOURCE_STATE_COMMON; | ||
| 180 | Ref<ID3D12Resource> upload, input, data, args, out2, image, readback; | ||
| 181 | const auto create_buffer = [&](Ref<ID3D12Resource>& out, const D3D12_HEAP_PROPERTIES& heap, UINT64 bytes, | ||
| 182 | D3D12_RESOURCE_FLAGS flags, D3D12_RESOURCE_STATES state) { | ||
| 183 | const auto desc = buffer_desc(bytes, flags); | ||
| 184 | return SUCCEEDED(device->CreateCommittedResource(&heap, D3D12_HEAP_FLAG_NONE, &desc, state, nullptr, | ||
| 185 | IID_PPV_ARGS(&out.p))); | ||
| 186 | }; | ||
| 187 | EXPECT(create_buffer(upload, upload_heap, in_bytes, D3D12_RESOURCE_FLAG_NONE, D3D12_RESOURCE_STATE_GENERIC_READ)); | ||
| 188 | EXPECT(create_buffer(input, default_heap, in_bytes, uav_flag, common)); | ||
| 189 | EXPECT(create_buffer(data, default_heap, data_bytes, uav_flag, uav_state)); | ||
| 190 | EXPECT(create_buffer(args, default_heap, 256, uav_flag, uav_state)); | ||
| 191 | EXPECT(create_buffer(out2, default_heap, out2_bytes, uav_flag, uav_state)); | ||
| 192 | EXPECT(create_buffer(readback, readback_heap, readback_bytes, D3D12_RESOURCE_FLAG_NONE, | ||
| 193 | D3D12_RESOURCE_STATE_COPY_DEST)); | ||
| 194 | D3D12_RESOURCE_DESC image_desc{}; | ||
| 195 | image_desc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D; | ||
| 196 | image_desc.Width = image_desc.Height = image_dim; | ||
| 197 | image_desc.DepthOrArraySize = 1; | ||
| 198 | image_desc.MipLevels = 1; | ||
| 199 | image_desc.Format = DXGI_FORMAT_R32_UINT; | ||
| 200 | image_desc.SampleDesc.Count = 1; | ||
| 201 | image_desc.Flags = uav_flag; | ||
| 202 | EXPECT(SUCCEEDED(device->CreateCommittedResource(&default_heap, D3D12_HEAP_FLAG_NONE, &image_desc, uav_state, | ||
| 203 | nullptr, IID_PPV_ARGS(&image.p)))); | ||
| 204 | { | ||
| 205 | std::uint32_t* mapped = nullptr; | ||
| 206 | EXPECT(SUCCEEDED(upload->Map(0, nullptr, reinterpret_cast<void**>(&mapped)))); | ||
| 207 | for (UINT g = 0; g < records; ++g) mapped[g] = input_word(g); | ||
| 208 | upload->Unmap(0, nullptr); | ||
| 209 | } | ||
| 210 | |||
| 211 | // The table: slot 0 structured buffer (stride 16), 1 raw argument buffer, 2 image, 3 raw input, 4 raw output. | ||
| 212 | const D3D12_DESCRIPTOR_HEAP_DESC heap_desc{D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, 5, | ||
| 213 | D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE, 0}; | ||
| 214 | Ref<ID3D12DescriptorHeap> heap; | ||
| 215 | EXPECT(SUCCEEDED(device->CreateDescriptorHeap(&heap_desc, IID_PPV_ARGS(&heap.p)))); | ||
| 216 | const std::uint64_t cpu = reinterpret_cast<XboxHeapHandleFn>(slot(heap.p, 9))(heap.p); | ||
| 217 | const std::uint64_t gpu = reinterpret_cast<XboxHeapHandleFn>(slot(heap.p, 10))(heap.p); | ||
| 218 | const UINT step = device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV); | ||
| 219 | EXPECT(cpu && gpu >= 0x10000 && gpu < (1ull << 32) && step == 32); // the shaders step 32 bytes a slot | ||
| 220 | const auto handle = [&](UINT i) { return D3D12_CPU_DESCRIPTOR_HANDLE{SIZE_T(cpu + std::uint64_t(i) * step)}; }; | ||
| 221 | const auto buffer_view = [](DXGI_FORMAT format, UINT count, UINT stride, D3D12_BUFFER_UAV_FLAGS flags) { | ||
| 222 | D3D12_UNORDERED_ACCESS_VIEW_DESC view{}; | ||
| 223 | view.Format = format; | ||
| 224 | view.ViewDimension = D3D12_UAV_DIMENSION_BUFFER; | ||
| 225 | view.Buffer = {0, count, stride, 0, flags}; | ||
| 226 | return view; | ||
| 227 | }; | ||
| 228 | auto view = buffer_view(DXGI_FORMAT_UNKNOWN, records, 16, D3D12_BUFFER_UAV_FLAG_NONE); | ||
| 229 | device->CreateUnorderedAccessView(data.p, nullptr, &view, handle(0)); | ||
| 230 | view = buffer_view(DXGI_FORMAT_R32_TYPELESS, 4, 0, D3D12_BUFFER_UAV_FLAG_RAW); // the 16 bytes of arguments | ||
| 231 | device->CreateUnorderedAccessView(args.p, nullptr, &view, handle(1)); | ||
| 232 | D3D12_UNORDERED_ACCESS_VIEW_DESC image_view{}; | ||
| 233 | image_view.Format = DXGI_FORMAT_R32_UINT; | ||
| 234 | image_view.ViewDimension = D3D12_UAV_DIMENSION_TEXTURE2D; | ||
| 235 | device->CreateUnorderedAccessView(image.p, nullptr, &image_view, handle(2)); | ||
| 236 | view = buffer_view(DXGI_FORMAT_R32_TYPELESS, records, 0, D3D12_BUFFER_UAV_FLAG_RAW); | ||
| 237 | device->CreateUnorderedAccessView(input.p, nullptr, &view, handle(3)); | ||
| 238 | view = buffer_view(DXGI_FORMAT_R32_TYPELESS, UINT(out2_bytes / 4), 0, D3D12_BUFFER_UAV_FLAG_RAW); | ||
| 239 | device->CreateUnorderedAccessView(out2.p, nullptr, &view, handle(4)); | ||
| 240 | // The V# of the structured view and the T# of the image view are what the shader loads from the table. | ||
| 241 | std::uint32_t v_data[4], v_args[4]; | ||
| 242 | std::memcpy(v_data, reinterpret_cast<const void*>(handle(0).ptr), sizeof(v_data)); | ||
| 243 | std::memcpy(v_args, reinterpret_cast<const void*>(handle(1).ptr), sizeof(v_args)); | ||
| 244 | EXPECT(v_data[0] == std::uint32_t(data->GetGPUVirtualAddress()) && (v_data[1] >> 16 & 0x3fff) == 16 && | ||
| 245 | v_data[2] == records); | ||
| 246 | EXPECT(v_args[0] == std::uint32_t(args->GetGPUVirtualAddress()) && (v_args[1] >> 16 & 0x3fff) == 0 && | ||
| 247 | v_args[2] == 16); | ||
| 248 | |||
| 249 | D3D12_COMMAND_QUEUE_DESC queue_desc{}; | ||
| 250 | Ref<ID3D12CommandQueue> copy_queue, compute_queue; | ||
| 251 | queue_desc.Type = D3D12_COMMAND_LIST_TYPE_COPY; | ||
| 252 | EXPECT(SUCCEEDED(device->CreateCommandQueue(&queue_desc, IID_PPV_ARGS(©_queue.p)))); | ||
| 253 | queue_desc.Type = D3D12_COMMAND_LIST_TYPE_COMPUTE; | ||
| 254 | EXPECT(SUCCEEDED(device->CreateCommandQueue(&queue_desc, IID_PPV_ARGS(&compute_queue.p)))); | ||
| 255 | Ref<ID3D12CommandAllocator> stream_alloc, compute_alloc, readback_alloc; | ||
| 256 | Ref<ID3D12GraphicsCommandList> stream_list, compute_list, readback_list; | ||
| 257 | Ref<ID3D12Fence> copy_fence, compute_fence; | ||
| 258 | const auto make_list = [&](D3D12_COMMAND_LIST_TYPE type, Ref<ID3D12CommandAllocator>& alloc, | ||
| 259 | Ref<ID3D12GraphicsCommandList>& list) { | ||
| 260 | return SUCCEEDED(device->CreateCommandAllocator(type, IID_PPV_ARGS(&alloc.p))) && | ||
| 261 | SUCCEEDED(device->CreateCommandList(0, type, alloc.p, nullptr, IID_PPV_ARGS(&list.p))); | ||
| 262 | }; | ||
| 263 | EXPECT(make_list(D3D12_COMMAND_LIST_TYPE_COPY, stream_alloc, stream_list)); | ||
| 264 | EXPECT(make_list(D3D12_COMMAND_LIST_TYPE_COMPUTE, compute_alloc, compute_list)); | ||
| 265 | EXPECT(make_list(D3D12_COMMAND_LIST_TYPE_COPY, readback_alloc, readback_list)); | ||
| 266 | EXPECT(SUCCEEDED(device->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(©_fence.p)))); | ||
| 267 | EXPECT(SUCCEEDED(device->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&compute_fence.p)))); | ||
| 268 | |||
| 269 | // Copy list 1: stream the input in (the buffer is in COMMON and is promoted to COPY_DEST by the copy). This is the | ||
| 270 | // first submission after the UAV views were written, and a copy queue: it must not initialize the storage image | ||
| 271 | // (the compute queue does, in the submission that dispatches), or the data written later would be at risk. | ||
| 272 | stream_list->CopyBufferRegion(input.p, 0, upload.p, 0, in_bytes); | ||
| 273 | EXPECT(stream_list->Close() == S_OK); | ||
| 274 | |||
| 275 | D3D12_TEXTURE_COPY_LOCATION dst{}, src{}; | ||
| 276 | dst.pResource = readback.p; | ||
| 277 | dst.Type = D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT; | ||
| 278 | dst.PlacedFootprint = {offset_image, {DXGI_FORMAT_R32_UINT, image_dim, image_dim, 1, image_pitch}}; | ||
| 279 | src.pResource = image.p; | ||
| 280 | src.Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX; | ||
| 281 | |||
| 282 | // Compute list. | ||
| 283 | ID3D12DescriptorHeap* heaps[] = {heap.p}; | ||
| 284 | D3D12_RESOURCE_BARRIER acquire = transition(input.p, common, uav_state); | ||
| 285 | compute_list->ResourceBarrier(1, &acquire); | ||
| 286 | compute_list->SetDescriptorHeaps(1, heaps); | ||
| 287 | compute_list->SetComputeRootSignature(root.p); | ||
| 288 | compute_list->SetPipelineState(pso_fill.p); | ||
| 289 | const std::uint32_t constants[4] = {seed, multiplier, second_groups, 0}; | ||
| 290 | compute_list->SetComputeRoot32BitConstants(0, 4, constants, 0); | ||
| 291 | compute_list->SetComputeRootDescriptorTable(1, D3D12_GPU_DESCRIPTOR_HANDLE{gpu}); | ||
| 292 | compute_list->Dispatch(records / 64, 1, 1); | ||
| 293 | D3D12_RESOURCE_BARRIER between[3] = {transition(args.p, uav_state, D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT), | ||
| 294 | {}, {}}; | ||
| 295 | for (int i : {1, 2}) { | ||
| 296 | between[i].Type = D3D12_RESOURCE_BARRIER_TYPE_UAV; | ||
| 297 | between[i].UAV.pResource = i == 1 ? data.p : image.p; | ||
| 298 | } | ||
| 299 | compute_list->ResourceBarrier(3, between); | ||
| 300 | compute_list->SetPipelineState(pso_indirect.p); // the root arguments stay | ||
| 301 | compute_list->ExecuteIndirect(signature.p, 1, args.p, 0, nullptr, 0); | ||
| 302 | D3D12_RESOURCE_BARRIER release[5] = {transition(data.p, uav_state, common), | ||
| 303 | transition(args.p, D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT, common), | ||
| 304 | transition(out2.p, uav_state, common), | ||
| 305 | transition(input.p, uav_state, common), | ||
| 306 | transition(image.p, uav_state, common)}; | ||
| 307 | compute_list->ResourceBarrier(5, release); | ||
| 308 | EXPECT(compute_list->Close() == S_OK); | ||
| 309 | |||
| 310 | // Copy list 2: the results to the readback buffer, once the compute queue is done. | ||
| 311 | readback_list->CopyBufferRegion(readback.p, offset_data, data.p, 0, data_bytes); | ||
| 312 | readback_list->CopyBufferRegion(readback.p, offset_args, args.p, 0, args_bytes); | ||
| 313 | readback_list->CopyBufferRegion(readback.p, offset_out2, out2.p, 0, out2_bytes); | ||
| 314 | readback_list->CopyBufferRegion(readback.p, offset_in, input.p, 0, in_bytes); | ||
| 315 | readback_list->CopyTextureRegion(&dst, 0, 0, 0, &src, nullptr); | ||
| 316 | EXPECT(readback_list->Close() == S_OK); | ||
| 317 | |||
| 318 | const auto execute = [&](ID3D12CommandQueue* queue, ID3D12GraphicsCommandList* list) { | ||
| 319 | ID3D12CommandList* lists[] = {list}; | ||
| 320 | queue->ExecuteCommandLists(1, lists); | ||
| 321 | return rt::d3d12::last_execute_result(queue) == leonida::ReplayResult::success; | ||
| 322 | }; | ||
| 323 | const auto submit_copy = [&] { | ||
| 324 | return execute(copy_queue.p, stream_list.p) && SUCCEEDED(copy_queue->Signal(copy_fence.p, 1)); | ||
| 325 | }; | ||
| 326 | const auto submit_readback = [&] { | ||
| 327 | return SUCCEEDED(copy_queue->Wait(compute_fence.p, 1)) && execute(copy_queue.p, readback_list.p) && | ||
| 328 | SUCCEEDED(copy_queue->Signal(copy_fence.p, 2)); | ||
| 329 | }; | ||
| 330 | const auto submit_compute = [&] { | ||
| 331 | return SUCCEEDED(compute_queue->Wait(copy_fence.p, 1)) && execute(compute_queue.p, compute_list.p) && | ||
| 332 | SUCCEEDED(compute_queue->Signal(compute_fence.p, 1)); | ||
| 333 | }; | ||
| 334 | // In dependency order: the layer replays a list at ExecuteCommandLists and tracks every image's layout in that | ||
| 335 | // order, so a list that waits for another queue's signal has to be submitted after the list it waits for | ||
| 336 | // (the Wait-before-Signal order d3d12_queue_wait_test covers, without a resource handed over). | ||
| 337 | EXPECT(submit_copy() && submit_compute() && submit_readback()); | ||
| 338 | |||
| 339 | const HANDLE event = CreateEventW(nullptr, FALSE, FALSE, nullptr); | ||
| 340 | EXPECT(event != nullptr); | ||
| 341 | EXPECT(SUCCEEDED(copy_fence->SetEventOnCompletion(2, event))); | ||
| 342 | if (WaitForSingleObject(event, 20000) != WAIT_OBJECT_0) { | ||
| 343 | std::fprintf(stderr, "the copy fence never reached 2 (compute fence at %llu)\n", | ||
| 344 | static_cast<unsigned long long>(compute_fence->GetCompletedValue())); | ||
| 345 | return 1; | ||
| 346 | } | ||
| 347 | CloseHandle(event); | ||
| 348 | EXPECT(copy_fence->GetCompletedValue() >= 2 && compute_fence->GetCompletedValue() >= 1); | ||
| 349 | |||
| 350 | void* mapped = nullptr; | ||
| 351 | EXPECT(SUCCEEDED(readback->Map(0, nullptr, &mapped))); | ||
| 352 | got.assign(static_cast<const std::uint8_t*>(mapped), static_cast<const std::uint8_t*>(mapped) + readback_bytes); | ||
| 353 | readback->Unmap(0, nullptr); | ||
| 354 | |||
| 355 | for (auto* r : {&upload, &input, &data, &args, &out2, &image, &readback}) r->reset(); | ||
| 356 | stream_list.reset(); compute_list.reset(); readback_list.reset(); | ||
| 357 | stream_alloc.reset(); compute_alloc.reset(); readback_alloc.reset(); | ||
| 358 | copy_fence.reset(); compute_fence.reset(); | ||
| 359 | signature.reset(); pso_fill.reset(); pso_indirect.reset(); root.reset(); heap.reset(); | ||
| 360 | copy_queue.reset(); compute_queue.reset(); | ||
| 361 | EXPECT(rt::d3d12_xs::device_proxy_ref_count(device.p) == 1); | ||
| 362 | } | ||
| 363 | |||
| 364 | unsigned mismatches = 0, words = 0; | ||
| 365 | const auto compare = [&](const char* what, UINT64 offset, const std::vector<std::uint32_t>& expected, UINT pitch, | ||
| 366 | UINT row_words) { | ||
| 367 | unsigned bad = 0; | ||
| 368 | for (std::size_t i = 0; i < expected.size(); ++i) { | ||
| 369 | std::uint32_t value = 0; | ||
| 370 | const UINT64 at = offset + (pitch ? (i / row_words) * pitch + (i % row_words) * 4 : i * 4); | ||
| 371 | std::memcpy(&value, got.data() + at, 4); | ||
| 372 | ++words; | ||
| 373 | if (value == expected[i]) continue; | ||
| 374 | ++mismatches; | ||
| 375 | if (bad++ < 4) std::fprintf(stderr, "%s word %zu: got %08x want %08x\n", what, i, value, expected[i]); | ||
| 376 | } | ||
| 377 | if (bad) std::fprintf(stderr, "%s: %u of %zu words differ\n", what, bad, expected.size()); | ||
| 378 | }; | ||
| 379 | compare("input (copy queue round trip)", offset_in, want.in, 0, 0); | ||
| 380 | compare("structured buffer", offset_data, want.data, 0, 0); | ||
| 381 | compare("dispatch arguments", offset_args, want.args, 0, 0); | ||
| 382 | compare("image", offset_image, want.image, image_pitch, image_dim); | ||
| 383 | compare("indirect dispatch output", offset_out2, want.out2, 0, 0); | ||
| 384 | EXPECT(!mismatches); | ||
| 385 | if (d.validation_errors()) { | ||
| 386 | std::fprintf(stderr, "%u validation errors\n", d.validation_errors()); | ||
| 387 | return 1; | ||
| 388 | } | ||
| 389 | std::printf("M4: a COPY queue streamed an input buffer in, a COMPUTE queue ran a compute PSO over a UAV table " | ||
| 390 | "(structured buffer, raw buffers, an R32_UINT storage image) and a second dispatch through " | ||
| 391 | "ExecuteIndirect from arguments the first wrote, and a COPY queue behind a cross-queue fence read the " | ||
| 392 | "results back (%s): %u words matched the CPU reference (error 0)\n", | ||
| 393 | distinct_queues ? "two VkQueues" : "one VkQueue", words); | ||
| 394 | return 0; | ||
| 395 | } | ||
diff --git a/runtime/test/d3d12_pipeline_library_test.cpp b/runtime/test/d3d12_pipeline_library_test.cpp new file mode 100644 index 000000000..cd7b411e5 --- /dev/null +++ b/runtime/test/d3d12_pipeline_library_test.cpp | |||
| @@ -0,0 +1,316 @@ | |||
| 1 | // Synthetic GPU test for ID3D12Device1::CreatePipelineLibrary and ID3D12PipelineLibrary / ID3D12PipelineLibrary1: | ||
| 2 | // - empty library creation (0-byte blob), null-output capability check (S_FALSE), and invalid/foreign/corrupt | ||
| 3 | // blob rejection (E_INVALIDARG for null pointer with non-zero size, D3D12_ERROR_DRIVER_VERSION_MISMATCH for | ||
| 4 | // unrecognized or corrupt headers); | ||
| 5 | // - StorePipeline (unique names, duplicate rejection, null/empty name rejection, null/foreign PSO rejection); | ||
| 6 | // - LoadComputePipeline, LoadGraphicsPipeline, and ID3D12PipelineLibrary1::LoadPipeline (including cross-type | ||
| 7 | // mismatch rejection when a compute PSO is requested through LoadGraphicsPipeline or vice versa); | ||
| 8 | // - GetSerializedSize + Serialize round-trip into a second CreatePipelineLibrary; | ||
| 9 | // - GPU execution of both loaded compute and loaded graphics PSOs under LEONIDA_VK_VALIDATION=1. | ||
| 10 | // No game data. | ||
| 11 | #include "vk_test_device.h" | ||
| 12 | #include "d3d12_test_shaders.h" | ||
| 13 | #include "../shims/d3d12_com.h" | ||
| 14 | #include "../src/shader_library.h" | ||
| 15 | |||
| 16 | #include <cstring> | ||
| 17 | #include <filesystem> | ||
| 18 | #include <fstream> | ||
| 19 | #include <vector> | ||
| 20 | |||
| 21 | #if !defined(LEONIDA_TEST_CS_SPV) || !defined(LEONIDA_TEST_VS_SPV) || !defined(LEONIDA_TEST_PS_SPV) | ||
| 22 | #error "LEONIDA_TEST_CS_SPV, LEONIDA_TEST_VS_SPV and LEONIDA_TEST_PS_SPV must be defined" | ||
| 23 | #endif | ||
| 24 | |||
| 25 | #define EXPECT(condition) do { \ | ||
| 26 | if (!(condition)) { std::fprintf(stderr, "line %d: %s\n", __LINE__, #condition); return 1; } \ | ||
| 27 | } while (0) | ||
| 28 | |||
| 29 | using namespace d3d12test; | ||
| 30 | |||
| 31 | namespace { | ||
| 32 | |||
| 33 | struct Vertex { | ||
| 34 | float x, y; | ||
| 35 | std::uint8_t r, g, b, a; | ||
| 36 | }; | ||
| 37 | |||
| 38 | D3D12_RESOURCE_DESC tex2d_desc(UINT w, UINT h, DXGI_FORMAT fmt, D3D12_RESOURCE_FLAGS flags) { | ||
| 39 | D3D12_RESOURCE_DESC d{}; | ||
| 40 | d.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D; | ||
| 41 | d.Width = w; | ||
| 42 | d.Height = h; | ||
| 43 | d.DepthOrArraySize = 1; | ||
| 44 | d.MipLevels = 1; | ||
| 45 | d.Format = fmt; | ||
| 46 | d.SampleDesc = {1, 0}; | ||
| 47 | d.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN; | ||
| 48 | d.Flags = flags; | ||
| 49 | return d; | ||
| 50 | } | ||
| 51 | |||
| 52 | } // namespace | ||
| 53 | |||
| 54 | int main() { | ||
| 55 | vktest::Device d; | ||
| 56 | const auto status = d.initialize(); | ||
| 57 | if (status == vktest::DeviceStatus::unavailable) { | ||
| 58 | std::fprintf(stderr, "SKIP: no usable Vulkan 1.3 device\n"); | ||
| 59 | return 77; | ||
| 60 | } | ||
| 61 | EXPECT(status == vktest::DeviceStatus::ready); | ||
| 62 | |||
| 63 | const auto cs_prog = fssm_program({0x43532001, 0xbf810000}); | ||
| 64 | const auto vs_prog = fssm_program({0x56532001, 0xbf810000}); | ||
| 65 | const auto ps_prog = fssm_program({0x50532001, 0xbf810000}); | ||
| 66 | const auto cs_dxbc = shader_container(cs_prog); | ||
| 67 | const auto vs_dxbc = shader_container(vs_prog); | ||
| 68 | const auto ps_dxbc = shader_container(ps_prog); | ||
| 69 | |||
| 70 | const auto lib_dir = std::filesystem::temp_directory_path() / "leonida_pipeline_library_test"; | ||
| 71 | std::filesystem::create_directories(lib_dir); | ||
| 72 | std::filesystem::copy_file(LEONIDA_TEST_CS_SPV, lib_dir / "cs.spv", | ||
| 73 | std::filesystem::copy_options::overwrite_existing); | ||
| 74 | std::filesystem::copy_file(LEONIDA_TEST_VS_SPV, lib_dir / "vs.spv", | ||
| 75 | std::filesystem::copy_options::overwrite_existing); | ||
| 76 | std::filesystem::copy_file(LEONIDA_TEST_PS_SPV, lib_dir / "ps.spv", | ||
| 77 | std::filesystem::copy_options::overwrite_existing); | ||
| 78 | { | ||
| 79 | std::ofstream idx(lib_dir / "index.json", std::ios::binary); | ||
| 80 | idx << "{\"cs\": {\"stage\": \"cs\", \"fssm_sha256\": \"" << leonida::sha256_hex(cs_prog) | ||
| 81 | << "\", \"bindings\": [], \"push_constant_bytes\": 144},\n" | ||
| 82 | " \"vs\": {\"stage\": \"vs\", \"fssm_sha256\": \"" << leonida::sha256_hex(vs_prog) | ||
| 83 | << "\", \"bindings\": [], \"push_constant_bytes\": 144, \"input_signature\": [" | ||
| 84 | "{\"semantic\": \"COLOR\", \"semantic_index\": 0, \"register\": 0, \"mask\": 15, \"rw_mask\": 15, " | ||
| 85 | "\"system_value\": 0, \"component_type\": \"float\"}, " | ||
| 86 | "{\"semantic\": \"POSITION\", \"semantic_index\": 0, \"register\": 1, \"mask\": 3, \"rw_mask\": 3, " | ||
| 87 | "\"system_value\": 0, \"component_type\": \"float\"}]},\n" | ||
| 88 | " \"ps\": {\"stage\": \"ps\", \"fssm_sha256\": \"" << leonida::sha256_hex(ps_prog) | ||
| 89 | << "\", \"bindings\": [], \"push_constant_bytes\": 144, \"outputs\": [0]}}"; | ||
| 90 | } | ||
| 91 | |||
| 92 | rt::d3d12::VulkanDeviceInfo info{}; | ||
| 93 | info.get_instance_proc = d.instance_proc; | ||
| 94 | info.instance = d.instance; | ||
| 95 | info.physical = d.physical; | ||
| 96 | info.device = d.device; | ||
| 97 | info.queue = d.queue; | ||
| 98 | info.queue_family = d.family; | ||
| 99 | info.buffer_device_address = true; | ||
| 100 | info.shader_dir = lib_dir.string(); | ||
| 101 | |||
| 102 | Ref<ID3D12Device1> device; | ||
| 103 | EXPECT(SUCCEEDED(rt::d3d12::create_vulkan_device(info, IID_PPV_ARGS(&device.p)))); | ||
| 104 | |||
| 105 | // 1. CreatePipelineLibrary creation, capability check (null output -> S_FALSE), and invalid/corrupt blobs. | ||
| 106 | { | ||
| 107 | EXPECT(device->CreatePipelineLibrary(nullptr, 0, __uuidof(ID3D12PipelineLibrary), nullptr) == S_FALSE); | ||
| 108 | Ref<ID3D12PipelineLibrary> bad; | ||
| 109 | EXPECT(device->CreatePipelineLibrary(nullptr, 16, IID_PPV_ARGS(&bad.p)) == E_INVALIDARG && !bad.p); | ||
| 110 | const std::uint32_t foreign[4] = {0xDEADBEEFu, 1u, 0u, 0u}; | ||
| 111 | EXPECT(device->CreatePipelineLibrary(foreign, sizeof(foreign), IID_PPV_ARGS(&bad.p)) == | ||
| 112 | D3D12_ERROR_DRIVER_VERSION_MISMATCH && | ||
| 113 | !bad.p); | ||
| 114 | const std::uint8_t tiny[4] = {1, 2, 3, 4}; | ||
| 115 | EXPECT(device->CreatePipelineLibrary(tiny, sizeof(tiny), IID_PPV_ARGS(&bad.p)) == | ||
| 116 | D3D12_ERROR_DRIVER_VERSION_MISMATCH && | ||
| 117 | !bad.p); | ||
| 118 | } | ||
| 119 | |||
| 120 | // 2. Build one compute PSO and one graphics PSO. | ||
| 121 | D3D12_DESCRIPTOR_RANGE uav_range{D3D12_DESCRIPTOR_RANGE_TYPE_UAV, 1, 1, 0, 0}; | ||
| 122 | D3D12_ROOT_PARAMETER cs_params[3]{}; | ||
| 123 | cs_params[0].ParameterType = D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS; | ||
| 124 | cs_params[0].Constants = {0, 0, 1}; | ||
| 125 | cs_params[1].ParameterType = D3D12_ROOT_PARAMETER_TYPE_UAV; | ||
| 126 | cs_params[1].Descriptor = {0, 0}; | ||
| 127 | cs_params[2].ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE; | ||
| 128 | cs_params[2].DescriptorTable = {1, &uav_range}; | ||
| 129 | D3D12_VERSIONED_ROOT_SIGNATURE_DESC cs_rs_desc{}; | ||
| 130 | cs_rs_desc.Version = D3D_ROOT_SIGNATURE_VERSION_1_0; | ||
| 131 | cs_rs_desc.Desc_1_0 = {3, cs_params, 0, nullptr, D3D12_ROOT_SIGNATURE_FLAG_NONE}; | ||
| 132 | const auto cs_rs_blob = serialize_root_signature(cs_rs_desc); | ||
| 133 | Ref<ID3D12RootSignature> cs_rs; | ||
| 134 | EXPECT(SUCCEEDED(device->CreateRootSignature(0, cs_rs_blob.data(), cs_rs_blob.size(), IID_PPV_ARGS(&cs_rs.p)))); | ||
| 135 | |||
| 136 | D3D12_COMPUTE_PIPELINE_STATE_DESC cs_desc{}; | ||
| 137 | cs_desc.pRootSignature = cs_rs.p; | ||
| 138 | cs_desc.CS = {cs_dxbc.data(), cs_dxbc.size()}; | ||
| 139 | Ref<ID3D12PipelineState> cs_pso; | ||
| 140 | EXPECT(SUCCEEDED(device->CreateComputePipelineState(&cs_desc, IID_PPV_ARGS(&cs_pso.p)))); | ||
| 141 | |||
| 142 | D3D12_ROOT_PARAMETER gfx_params[2]{}; | ||
| 143 | gfx_params[0].ParameterType = D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS; | ||
| 144 | gfx_params[0].Constants = {0, 0, 2}; | ||
| 145 | gfx_params[1].ParameterType = D3D12_ROOT_PARAMETER_TYPE_CBV; | ||
| 146 | gfx_params[1].Descriptor = {1, 0}; | ||
| 147 | D3D12_VERSIONED_ROOT_SIGNATURE_DESC gfx_rs_desc{}; | ||
| 148 | gfx_rs_desc.Version = D3D_ROOT_SIGNATURE_VERSION_1_0; | ||
| 149 | gfx_rs_desc.Desc_1_0 = {2, gfx_params, 0, nullptr, D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT}; | ||
| 150 | const auto gfx_rs_blob = serialize_root_signature(gfx_rs_desc); | ||
| 151 | Ref<ID3D12RootSignature> gfx_rs; | ||
| 152 | EXPECT(SUCCEEDED(device->CreateRootSignature(0, gfx_rs_blob.data(), gfx_rs_blob.size(), IID_PPV_ARGS(&gfx_rs.p)))); | ||
| 153 | |||
| 154 | const D3D12_INPUT_ELEMENT_DESC input_elems[2] = { | ||
| 155 | {"POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0}, | ||
| 156 | {"COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, D3D12_APPEND_ALIGNED_ELEMENT, | ||
| 157 | D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0}, | ||
| 158 | }; | ||
| 159 | D3D12_GRAPHICS_PIPELINE_STATE_DESC gfx_desc{}; | ||
| 160 | gfx_desc.pRootSignature = gfx_rs.p; | ||
| 161 | gfx_desc.VS = {vs_dxbc.data(), vs_dxbc.size()}; | ||
| 162 | gfx_desc.PS = {ps_dxbc.data(), ps_dxbc.size()}; | ||
| 163 | gfx_desc.BlendState.RenderTarget[0].RenderTargetWriteMask = D3D12_COLOR_WRITE_ENABLE_ALL; | ||
| 164 | gfx_desc.SampleMask = 0xFFFFFFFFu; | ||
| 165 | gfx_desc.RasterizerState.FillMode = D3D12_FILL_MODE_SOLID; | ||
| 166 | gfx_desc.RasterizerState.CullMode = D3D12_CULL_MODE_BACK; | ||
| 167 | gfx_desc.RasterizerState.DepthClipEnable = TRUE; | ||
| 168 | gfx_desc.InputLayout = {input_elems, 2}; | ||
| 169 | gfx_desc.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE; | ||
| 170 | gfx_desc.NumRenderTargets = 1; | ||
| 171 | gfx_desc.RTVFormats[0] = DXGI_FORMAT_R8G8B8A8_UNORM; | ||
| 172 | gfx_desc.SampleDesc = {1, 0}; | ||
| 173 | Ref<ID3D12PipelineState> gfx_pso; | ||
| 174 | EXPECT(SUCCEEDED(device->CreateGraphicsPipelineState(&gfx_desc, IID_PPV_ARGS(&gfx_pso.p)))); | ||
| 175 | |||
| 176 | // 3. Store, load, cross-type rejection, and serialize round-trip. | ||
| 177 | Ref<ID3D12PipelineLibrary1> lib; | ||
| 178 | EXPECT(SUCCEEDED(device->CreatePipelineLibrary(nullptr, 0, IID_PPV_ARGS(&lib.p))) && lib.p); | ||
| 179 | Ref<ID3D12Device> parent_dev; | ||
| 180 | EXPECT(SUCCEEDED(lib->GetDevice(IID_PPV_ARGS(&parent_dev.p))) && parent_dev.p); | ||
| 181 | |||
| 182 | EXPECT(lib->StorePipeline(nullptr, cs_pso.p) == E_INVALIDARG); | ||
| 183 | EXPECT(lib->StorePipeline(L"", cs_pso.p) == E_INVALIDARG); | ||
| 184 | EXPECT(lib->StorePipeline(L"cs", nullptr) == E_INVALIDARG); | ||
| 185 | EXPECT(SUCCEEDED(lib->StorePipeline(L"cs", cs_pso.p))); | ||
| 186 | EXPECT(lib->StorePipeline(L"cs", cs_pso.p) == E_INVALIDARG); // duplicate name | ||
| 187 | EXPECT(SUCCEEDED(lib->StorePipeline(L"gfx", gfx_pso.p))); | ||
| 188 | |||
| 189 | Ref<ID3D12PipelineState> loaded_cs, loaded_gfx, loaded_any, wrong; | ||
| 190 | EXPECT(lib->LoadComputePipeline(L"missing", &cs_desc, IID_PPV_ARGS(&wrong.p)) == E_INVALIDARG && !wrong.p); | ||
| 191 | EXPECT(lib->LoadComputePipeline(L"gfx", &cs_desc, IID_PPV_ARGS(&wrong.p)) == E_INVALIDARG && !wrong.p); | ||
| 192 | EXPECT(lib->LoadGraphicsPipeline(L"cs", &gfx_desc, IID_PPV_ARGS(&wrong.p)) == E_INVALIDARG && !wrong.p); | ||
| 193 | EXPECT(SUCCEEDED(lib->LoadComputePipeline(L"cs", &cs_desc, IID_PPV_ARGS(&loaded_cs.p))) && loaded_cs.p); | ||
| 194 | EXPECT(SUCCEEDED(lib->LoadGraphicsPipeline(L"gfx", &gfx_desc, IID_PPV_ARGS(&loaded_gfx.p))) && loaded_gfx.p); | ||
| 195 | |||
| 196 | std::uint32_t dummy_stream = 0; | ||
| 197 | D3D12_PIPELINE_STATE_STREAM_DESC stream_desc{sizeof(dummy_stream), &dummy_stream}; | ||
| 198 | D3D12_PIPELINE_STATE_STREAM_DESC empty_stream{0, nullptr}; | ||
| 199 | EXPECT(lib->LoadPipeline(L"gfx", &empty_stream, IID_PPV_ARGS(&wrong.p)) == E_INVALIDARG && !wrong.p); | ||
| 200 | EXPECT(SUCCEEDED(lib->LoadPipeline(L"gfx", &stream_desc, IID_PPV_ARGS(&loaded_any.p))) && loaded_any.p); | ||
| 201 | |||
| 202 | const SIZE_T blob_size = lib->GetSerializedSize(); | ||
| 203 | EXPECT(blob_size >= 16); | ||
| 204 | std::vector<std::uint8_t> blob(blob_size); | ||
| 205 | EXPECT(lib->Serialize(nullptr, blob_size) == E_INVALIDARG); | ||
| 206 | EXPECT(lib->Serialize(blob.data(), blob_size - 1) == E_INVALIDARG); | ||
| 207 | EXPECT(SUCCEEDED(lib->Serialize(blob.data(), blob_size))); | ||
| 208 | |||
| 209 | Ref<ID3D12PipelineLibrary> reloaded; | ||
| 210 | EXPECT(SUCCEEDED(device->CreatePipelineLibrary(blob.data(), blob.size(), IID_PPV_ARGS(&reloaded.p))) && reloaded.p); | ||
| 211 | |||
| 212 | // 4. Execute the loaded compute PSO and loaded graphics PSO on the GPU. | ||
| 213 | Ref<ID3D12CommandQueue> queue; | ||
| 214 | const D3D12_COMMAND_QUEUE_DESC qd{D3D12_COMMAND_LIST_TYPE_DIRECT, 0, D3D12_COMMAND_QUEUE_FLAG_NONE, 0}; | ||
| 215 | EXPECT(SUCCEEDED(device->CreateCommandQueue(&qd, IID_PPV_ARGS(&queue.p)))); | ||
| 216 | Ref<ID3D12CommandAllocator> alloc; | ||
| 217 | EXPECT(SUCCEEDED(device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(&alloc.p)))); | ||
| 218 | Ref<ID3D12GraphicsCommandList> list; | ||
| 219 | EXPECT(SUCCEEDED( | ||
| 220 | device->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, alloc.p, nullptr, IID_PPV_ARGS(&list.p)))); | ||
| 221 | Ref<ID3D12Fence> fence; | ||
| 222 | EXPECT(SUCCEEDED(device->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&fence.p)))); | ||
| 223 | |||
| 224 | constexpr UINT W = 16, H = 16; | ||
| 225 | const D3D12_HEAP_PROPERTIES hp_def{D3D12_HEAP_TYPE_DEFAULT}; | ||
| 226 | const D3D12_HEAP_PROPERTIES hp_up{D3D12_HEAP_TYPE_UPLOAD}; | ||
| 227 | const D3D12_HEAP_PROPERTIES hp_rb{D3D12_HEAP_TYPE_READBACK}; | ||
| 228 | const auto rtd = tex2d_desc(W, H, DXGI_FORMAT_R8G8B8A8_UNORM, D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET); | ||
| 229 | const Vertex verts[4] = { | ||
| 230 | {-1.0f, 1.0f, 255, 0, 0, 255}, | ||
| 231 | { 0.0f, 1.0f, 255, 0, 0, 255}, | ||
| 232 | { 0.0f, 0.0f, 255, 0, 0, 255}, | ||
| 233 | {-1.0f, 0.0f, 255, 0, 0, 255}, | ||
| 234 | }; | ||
| 235 | const std::uint16_t indices[6] = {0, 1, 2, 0, 2, 3}; | ||
| 236 | const float tint[4] = {1.0f, 0.0f, 1.0f, 1.0f}; | ||
| 237 | const auto vbd = buffer_desc(sizeof(verts)); | ||
| 238 | const auto ibd = buffer_desc(sizeof(indices)); | ||
| 239 | const auto cbd = buffer_desc(256); | ||
| 240 | Ref<ID3D12Resource> rt, vb, ib, cb, rb; | ||
| 241 | EXPECT(SUCCEEDED(device->CreateCommittedResource(&hp_def, D3D12_HEAP_FLAG_NONE, &rtd, | ||
| 242 | D3D12_RESOURCE_STATE_RENDER_TARGET, nullptr, IID_PPV_ARGS(&rt.p)))); | ||
| 243 | EXPECT(SUCCEEDED(device->CreateCommittedResource(&hp_up, D3D12_HEAP_FLAG_NONE, &vbd, | ||
| 244 | D3D12_RESOURCE_STATE_GENERIC_READ, nullptr, IID_PPV_ARGS(&vb.p)))); | ||
| 245 | EXPECT(SUCCEEDED(device->CreateCommittedResource(&hp_up, D3D12_HEAP_FLAG_NONE, &ibd, | ||
| 246 | D3D12_RESOURCE_STATE_GENERIC_READ, nullptr, IID_PPV_ARGS(&ib.p)))); | ||
| 247 | EXPECT(SUCCEEDED(device->CreateCommittedResource(&hp_up, D3D12_HEAP_FLAG_NONE, &cbd, | ||
| 248 | D3D12_RESOURCE_STATE_GENERIC_READ, nullptr, IID_PPV_ARGS(&cb.p)))); | ||
| 249 | void* p = nullptr; | ||
| 250 | EXPECT(SUCCEEDED(vb->Map(0, nullptr, &p))); | ||
| 251 | std::memcpy(p, verts, sizeof(verts)); | ||
| 252 | vb->Unmap(0, nullptr); | ||
| 253 | EXPECT(SUCCEEDED(ib->Map(0, nullptr, &p))); | ||
| 254 | std::memcpy(p, indices, sizeof(indices)); | ||
| 255 | ib->Unmap(0, nullptr); | ||
| 256 | EXPECT(SUCCEEDED(cb->Map(0, nullptr, &p))); | ||
| 257 | std::memcpy(p, tint, sizeof(tint)); | ||
| 258 | cb->Unmap(0, nullptr); | ||
| 259 | |||
| 260 | D3D12_PLACED_SUBRESOURCE_FOOTPRINT fp{}; | ||
| 261 | UINT64 total_bytes = 0; | ||
| 262 | device->GetCopyableFootprints(&rtd, 0, 1, 0, &fp, nullptr, nullptr, &total_bytes); | ||
| 263 | const auto rbd = buffer_desc(total_bytes); | ||
| 264 | EXPECT(SUCCEEDED(device->CreateCommittedResource(&hp_rb, D3D12_HEAP_FLAG_NONE, &rbd, | ||
| 265 | D3D12_RESOURCE_STATE_COPY_DEST, nullptr, IID_PPV_ARGS(&rb.p)))); | ||
| 266 | |||
| 267 | Ref<ID3D12DescriptorHeap> rtv_heap; | ||
| 268 | const D3D12_DESCRIPTOR_HEAP_DESC rhd{D3D12_DESCRIPTOR_HEAP_TYPE_RTV, 1, D3D12_DESCRIPTOR_HEAP_FLAG_NONE, 0}; | ||
| 269 | EXPECT(SUCCEEDED(device->CreateDescriptorHeap(&rhd, IID_PPV_ARGS(&rtv_heap.p)))); | ||
| 270 | const auto rtv = rtv_heap->GetCPUDescriptorHandleForHeapStart(); | ||
| 271 | device->CreateRenderTargetView(rt.p, nullptr, rtv); | ||
| 272 | |||
| 273 | const float blue[4] = {0.0f, 0.0f, 1.0f, 1.0f}; | ||
| 274 | list->ClearRenderTargetView(rtv, blue, 0, nullptr); | ||
| 275 | list->OMSetRenderTargets(1, &rtv, FALSE, nullptr); | ||
| 276 | const D3D12_VIEWPORT vp{0, 0, float(W), float(H), 0.0f, 1.0f}; | ||
| 277 | const D3D12_RECT sc{0, 0, LONG(W), LONG(H)}; | ||
| 278 | list->RSSetViewports(1, &vp); | ||
| 279 | list->RSSetScissorRects(1, &sc); | ||
| 280 | list->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST); | ||
| 281 | const D3D12_VERTEX_BUFFER_VIEW vbv{vb->GetGPUVirtualAddress(), sizeof(verts), sizeof(Vertex)}; | ||
| 282 | const D3D12_INDEX_BUFFER_VIEW ibv{ib->GetGPUVirtualAddress(), sizeof(indices), DXGI_FORMAT_R16_UINT}; | ||
| 283 | list->IASetVertexBuffers(0, 1, &vbv); | ||
| 284 | list->IASetIndexBuffer(&ibv); | ||
| 285 | list->SetGraphicsRootSignature(gfx_rs.p); | ||
| 286 | const float offset[2] = {0.0f, 0.0f}; | ||
| 287 | list->SetGraphicsRoot32BitConstants(0, 2, offset, 0); | ||
| 288 | list->SetGraphicsRootConstantBufferView(1, cb->GetGPUVirtualAddress()); | ||
| 289 | list->SetPipelineState(loaded_gfx.p); | ||
| 290 | list->DrawIndexedInstanced(6, 1, 0, 0, 0); | ||
| 291 | |||
| 292 | const auto to_src = transition(rt.p, D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE); | ||
| 293 | list->ResourceBarrier(1, &to_src); | ||
| 294 | D3D12_TEXTURE_COPY_LOCATION src_loc{rt.p, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, {0}}; | ||
| 295 | D3D12_TEXTURE_COPY_LOCATION dst_loc{rb.p, D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT, {}}; | ||
| 296 | dst_loc.PlacedFootprint = fp; | ||
| 297 | list->CopyTextureRegion(&dst_loc, 0, 0, 0, &src_loc, nullptr); | ||
| 298 | EXPECT(SUCCEEDED(list->Close())); | ||
| 299 | ID3D12CommandList* lists[] = {list.p}; | ||
| 300 | queue->ExecuteCommandLists(1, lists); | ||
| 301 | EXPECT(rt::d3d12::last_execute_result(queue.p) == leonida::ReplayResult::success); | ||
| 302 | EXPECT(SUCCEEDED(queue->Signal(fence.p, 1)) && SUCCEEDED(fence->SetEventOnCompletion(1, nullptr))); | ||
| 303 | |||
| 304 | EXPECT(SUCCEEDED(rb->Map(0, nullptr, &p))); | ||
| 305 | const auto* bytes = static_cast<const std::uint8_t*>(p); | ||
| 306 | std::uint32_t tl = 0, br = 0; | ||
| 307 | std::memcpy(&tl, bytes + 2 * fp.Footprint.RowPitch + 2 * 4, 4); | ||
| 308 | std::memcpy(&br, bytes + 12 * fp.Footprint.RowPitch + 12 * 4, 4); | ||
| 309 | EXPECT(tl == 0xFF0000FFu); // red quad drawn by PSO loaded from PipelineLibrary | ||
| 310 | EXPECT(br == 0xFFFF0000u); // blue background clear | ||
| 311 | rb->Unmap(0, nullptr); | ||
| 312 | |||
| 313 | EXPECT(d.validation_errors() == 0); | ||
| 314 | std::printf("d3d12_pipeline_library_test: ok\n"); | ||
| 315 | return 0; | ||
| 316 | } | ||
diff --git a/runtime/test/d3d12_present_test.cpp b/runtime/test/d3d12_present_test.cpp index 8b28eb67a..f01fb902b 100644 --- a/runtime/test/d3d12_present_test.cpp +++ b/runtime/test/d3d12_present_test.cpp | |||
| @@ -115,6 +115,8 @@ int fail_semaphore_in = 0; // armed: the n-th vkCreateSemaphore fr | |||
| 115 | bool fail_surface_formats = false; // armed: the next surface-format query fails before creation | 115 | bool fail_surface_formats = false; // armed: the next surface-format query fails before creation |
| 116 | bool observe_next_swapchain = false; | 116 | bool observe_next_swapchain = false; |
| 117 | bool report_undefined_extent = false; // armed: surface capabilities reports undefined extent (0xFFFFFFFF) | 117 | bool report_undefined_extent = false; // armed: surface capabilities reports undefined extent (0xFFFFFFFF) |
| 118 | bool undefined_extent_queried = false; | ||
| 119 | VkExtent2D last_swapchain_extent{}; | ||
| 118 | VkSwapchainKHR last_created_swapchain = VK_NULL_HANDLE; | 120 | VkSwapchainKHR last_created_swapchain = VK_NULL_HANDLE; |
| 119 | VkSwapchainKHR observed_old_swapchain = VK_NULL_HANDLE; | 121 | VkSwapchainKHR observed_old_swapchain = VK_NULL_HANDLE; |
| 120 | unsigned out_of_date = 0; // presents the real driver reported out of date | 122 | unsigned out_of_date = 0; // presents the real driver reported out of date |
| @@ -170,6 +172,7 @@ VKAPI_ATTR VkResult VKAPI_CALL surface_formats(VkPhysicalDevice physical, VkSurf | |||
| 170 | 172 | ||
| 171 | VKAPI_ATTR VkResult VKAPI_CALL create_swapchain(VkDevice device, const VkSwapchainCreateInfoKHR* info, | 173 | VKAPI_ATTR VkResult VKAPI_CALL create_swapchain(VkDevice device, const VkSwapchainCreateInfoKHR* info, |
| 172 | const VkAllocationCallbacks* allocator, VkSwapchainKHR* out) { | 174 | const VkAllocationCallbacks* allocator, VkSwapchainKHR* out) { |
| 175 | if (info) last_swapchain_extent = info->imageExtent; | ||
| 173 | if (observe_next_swapchain) { | 176 | if (observe_next_swapchain) { |
| 174 | observed_old_swapchain = info->oldSwapchain; | 177 | observed_old_swapchain = info->oldSwapchain; |
| 175 | observe_next_swapchain = false; | 178 | observe_next_swapchain = false; |
| @@ -185,6 +188,7 @@ VKAPI_ATTR VkResult VKAPI_CALL get_surface_capabilities(VkPhysicalDevice physica | |||
| 185 | if (result == VK_SUCCESS && report_undefined_extent && caps) { | 188 | if (result == VK_SUCCESS && report_undefined_extent && caps) { |
| 186 | caps->currentExtent.width = 0xFFFFFFFF; | 189 | caps->currentExtent.width = 0xFFFFFFFF; |
| 187 | caps->currentExtent.height = 0xFFFFFFFF; | 190 | caps->currentExtent.height = 0xFFFFFFFF; |
| 191 | undefined_extent_queried = true; | ||
| 188 | } | 192 | } |
| 189 | return result; | 193 | return result; |
| 190 | } | 194 | } |
| @@ -409,9 +413,14 @@ int main() { | |||
| 409 | EXPECT(SUCCEEDED(fence->SetEventOnCompletion(signalled, nullptr))); | 413 | EXPECT(SUCCEEDED(fence->SetEventOnCompletion(signalled, nullptr))); |
| 410 | 414 | ||
| 411 | // 4. Undefined surface extent (0xFFFFFFFF, reported by Intel UHD graphics / Win32 WSI; D3D-165): | 415 | // 4. Undefined surface extent (0xFFFFFFFF, reported by Intel UHD graphics / Win32 WSI; D3D-165): |
| 412 | // the presenter queries the window client extent and clamps to surface bounds. | 416 | // switch vsync to 0 to force swapchain recreation, verifying that vkGetPhysicalDeviceSurfaceCapabilitiesKHR |
| 417 | // is reached while armed and that vkCreateSwapchainKHR receives the clamped client extent (400x300) | ||
| 418 | // instead of 0xFFFFFFFF. | ||
| 413 | driver::report_undefined_extent = true; | 419 | driver::report_undefined_extent = true; |
| 414 | EXPECT(frame(1)); | 420 | driver::undefined_extent_queried = false; |
| 421 | EXPECT(frame(0)); | ||
| 422 | EXPECT(driver::undefined_extent_queried); | ||
| 423 | EXPECT(driver::last_swapchain_extent.width == 400 && driver::last_swapchain_extent.height == 300); | ||
| 415 | EXPECT(presenter->extent().width == 400 && presenter->extent().height == 300); | 424 | EXPECT(presenter->extent().width == 400 && presenter->extent().height == 300); |
| 416 | driver::report_undefined_extent = false; | 425 | driver::report_undefined_extent = false; |
| 417 | 426 | ||
diff --git a/runtime/test/d3d12_translated_draw_test.cpp b/runtime/test/d3d12_translated_draw_test.cpp index 80bd911c1..c6b660dda 100644 --- a/runtime/test/d3d12_translated_draw_test.cpp +++ b/runtime/test/d3d12_translated_draw_test.cpp | |||
| @@ -63,8 +63,8 @@ struct Vertex { | |||
| 63 | }; | 63 | }; |
| 64 | 64 | ||
| 65 | using Pixel = std::array<float, 4>; | 65 | using Pixel = std::array<float, 4>; |
| 66 | constexpr UINT extent = 64; | 66 | constexpr UINT target_extent = 64; |
| 67 | constexpr UINT pitch = extent * sizeof(Pixel); // 1024, a multiple of 256 | 67 | constexpr UINT pitch = target_extent * sizeof(Pixel); // 1024, a multiple of 256 |
| 68 | 68 | ||
| 69 | // A V# for the vertex records: stride 32, `records` records, format 32_32_32_32_FLOAT, identity swizzle. The | 69 | // A V# for the vertex records: stride 32, `records` records, format 32_32_32_32_FLOAT, identity swizzle. The |
| 70 | // out-of-range mode is structured (an index checked against num_records), which is what the hardware does with an | 70 | // out-of-range mode is structured (an index checked against num_records), which is what the hardware does with an |
| @@ -113,7 +113,7 @@ int main() { | |||
| 113 | vertex(-1, 0, c2), vertex(-1, -1, c2), vertex(0, -1, c2)}; | 113 | vertex(-1, 0, c2), vertex(-1, -1, c2), vertex(0, -1, c2)}; |
| 114 | static_assert(sizeof(Vertex) == 32 && sizeof(vertices) == 288); | 114 | static_assert(sizeof(Vertex) == 32 && sizeof(vertices) == 288); |
| 115 | 115 | ||
| 116 | std::vector<Pixel> pixels(extent * extent); | 116 | std::vector<Pixel> pixels(target_extent * target_extent); |
| 117 | { | 117 | { |
| 118 | rt::d3d12::VulkanDeviceInfo info{}; | 118 | rt::d3d12::VulkanDeviceInfo info{}; |
| 119 | info.get_instance_proc = d.instance_proc; | 119 | info.get_instance_proc = d.instance_proc; |
| @@ -178,13 +178,13 @@ int main() { | |||
| 178 | EXPECT(SUCCEEDED(device->CreateCommittedResource(&upload_heap, D3D12_HEAP_FLAG_NONE, &upload_desc, | 178 | EXPECT(SUCCEEDED(device->CreateCommittedResource(&upload_heap, D3D12_HEAP_FLAG_NONE, &upload_desc, |
| 179 | D3D12_RESOURCE_STATE_GENERIC_READ, nullptr, | 179 | D3D12_RESOURCE_STATE_GENERIC_READ, nullptr, |
| 180 | IID_PPV_ARGS(&upload.p)))); | 180 | IID_PPV_ARGS(&upload.p)))); |
| 181 | const auto readback_desc = buffer_desc(pitch * extent); | 181 | const auto readback_desc = buffer_desc(pitch * target_extent); |
| 182 | EXPECT(SUCCEEDED(device->CreateCommittedResource(&readback_heap, D3D12_HEAP_FLAG_NONE, &readback_desc, | 182 | EXPECT(SUCCEEDED(device->CreateCommittedResource(&readback_heap, D3D12_HEAP_FLAG_NONE, &readback_desc, |
| 183 | D3D12_RESOURCE_STATE_COPY_DEST, nullptr, | 183 | D3D12_RESOURCE_STATE_COPY_DEST, nullptr, |
| 184 | IID_PPV_ARGS(&readback.p)))); | 184 | IID_PPV_ARGS(&readback.p)))); |
| 185 | D3D12_RESOURCE_DESC rt_desc{}; | 185 | D3D12_RESOURCE_DESC rt_desc{}; |
| 186 | rt_desc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D; | 186 | rt_desc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D; |
| 187 | rt_desc.Width = rt_desc.Height = extent; | 187 | rt_desc.Width = rt_desc.Height = target_extent; |
| 188 | rt_desc.DepthOrArraySize = 1; | 188 | rt_desc.DepthOrArraySize = 1; |
| 189 | rt_desc.MipLevels = 1; | 189 | rt_desc.MipLevels = 1; |
| 190 | rt_desc.Format = DXGI_FORMAT_R32G32B32A32_FLOAT; | 190 | rt_desc.Format = DXGI_FORMAT_R32G32B32A32_FLOAT; |
| @@ -245,8 +245,8 @@ int main() { | |||
| 245 | ID3D12DescriptorHeap* heaps[] = {srv_heap.p}; | 245 | ID3D12DescriptorHeap* heaps[] = {srv_heap.p}; |
| 246 | list->SetDescriptorHeaps(1, heaps); | 246 | list->SetDescriptorHeaps(1, heaps); |
| 247 | list->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST); | 247 | list->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST); |
| 248 | const D3D12_VIEWPORT viewport{0, 0, float(extent), float(extent), 0, 1}; | 248 | const D3D12_VIEWPORT viewport{0, 0, float(target_extent), float(target_extent), 0, 1}; |
| 249 | const D3D12_RECT scissor{0, 0, LONG(extent), LONG(extent)}; | 249 | const D3D12_RECT scissor{0, 0, LONG(target_extent), LONG(target_extent)}; |
| 250 | list->RSSetViewports(1, &viewport); | 250 | list->RSSetViewports(1, &viewport); |
| 251 | list->RSSetScissorRects(1, &scissor); | 251 | list->RSSetScissorRects(1, &scissor); |
| 252 | list->OMSetRenderTargets(1, &rtv, FALSE, nullptr); | 252 | list->OMSetRenderTargets(1, &rtv, FALSE, nullptr); |
| @@ -271,7 +271,7 @@ int main() { | |||
| 271 | D3D12_TEXTURE_COPY_LOCATION dst{}; | 271 | D3D12_TEXTURE_COPY_LOCATION dst{}; |
| 272 | dst.pResource = readback.p; | 272 | dst.pResource = readback.p; |
| 273 | dst.Type = D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT; | 273 | dst.Type = D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT; |
| 274 | dst.PlacedFootprint = {0, {DXGI_FORMAT_R32G32B32A32_FLOAT, extent, extent, 1, pitch}}; | 274 | dst.PlacedFootprint = {0, {DXGI_FORMAT_R32G32B32A32_FLOAT, target_extent, target_extent, 1, pitch}}; |
| 275 | D3D12_TEXTURE_COPY_LOCATION src{}; | 275 | D3D12_TEXTURE_COPY_LOCATION src{}; |
| 276 | src.pResource = target.p; | 276 | src.pResource = target.p; |
| 277 | src.Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX; | 277 | src.Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX; |
| @@ -302,10 +302,10 @@ int main() { | |||
| 302 | const Pixel top_left = {0.125f, 1.0f, 0.75f, 1.0f}, bottom_right = {0.25f, 1.125f, 0.875f, 1.0f}; | 302 | const Pixel top_left = {0.125f, 1.0f, 0.75f, 1.0f}, bottom_right = {0.25f, 1.125f, 0.875f, 1.0f}; |
| 303 | const Pixel bottom_left = {0.75f, 0.25f, 0.75f, 1.0f}; | 303 | const Pixel bottom_left = {0.75f, 0.25f, 0.75f, 1.0f}; |
| 304 | unsigned mismatches = 0, edge = 0, edge_triangle = 0, edge_clear = 0; | 304 | unsigned mismatches = 0, edge = 0, edge_triangle = 0, edge_clear = 0; |
| 305 | for (UINT row = 0; row < extent; ++row) { | 305 | for (UINT row = 0; row < target_extent; ++row) { |
| 306 | for (UINT col = 0; col < extent; ++col) { | 306 | for (UINT col = 0; col < target_extent; ++col) { |
| 307 | const bool top = row < extent / 2, left = col < extent / 2; | 307 | const bool top = row < target_extent / 2, left = col < target_extent / 2; |
| 308 | const Pixel& got = pixels[row * extent + col]; | 308 | const Pixel& got = pixels[row * target_extent + col]; |
| 309 | const auto bits_equal = [&](const Pixel& want) { return std::memcmp(&got, &want, sizeof(Pixel)) == 0; }; | 309 | const auto bits_equal = [&](const Pixel& want) { return std::memcmp(&got, &want, sizeof(Pixel)) == 0; }; |
| 310 | const Pixel* want; | 310 | const Pixel* want; |
| 311 | if (top) { | 311 | if (top) { |
| @@ -340,6 +340,6 @@ int main() { | |||
| 340 | "pixels on the triangle's diagonal (%u its colour, %u the clear colour). User data from a descriptor " | 340 | "pixels on the triangle's diagonal (%u its colour, %u the clear colour). User data from a descriptor " |
| 341 | "table and root constants, V# vertex fetch from the arena, PS constants " | 341 | "table and root constants, V# vertex fetch from the arena, PS constants " |
| 342 | "through the code base\n", | 342 | "through the code base\n", |
| 343 | extent * extent - edge, extent * extent, edge, edge_triangle, edge_clear); | 343 | target_extent * target_extent - edge, target_extent * target_extent, edge, edge_triangle, edge_clear); |
| 344 | return 0; | 344 | return 0; |
| 345 | } | 345 | } |
diff --git a/runtime/test/d3d12_typeless_rtv_test.cpp b/runtime/test/d3d12_typeless_rtv_test.cpp index cc6054f85..d8b8d841e 100644 --- a/runtime/test/d3d12_typeless_rtv_test.cpp +++ b/runtime/test/d3d12_typeless_rtv_test.cpp | |||
| @@ -213,19 +213,36 @@ bool clear_and_read(ID3D12Device* device, DXGI_FORMAT whole_format, DXGI_FORMAT | |||
| 213 | return true; | 213 | return true; |
| 214 | } | 214 | } |
| 215 | bool rejects_view(ID3D12Device* device, DXGI_FORMAT resource_format, const D3D12_RENDER_TARGET_VIEW_DESC* view, | 215 | bool rejects_view(ID3D12Device* device, DXGI_FORMAT resource_format, const D3D12_RENDER_TARGET_VIEW_DESC* view, |
| 216 | UINT16 mips = 1, UINT16 layers = 1) { | 216 | UINT16 mips = 1, UINT16 layers = 1, UINT samples = 1, |
| 217 | const DXGI_FORMAT* cast_list = nullptr, UINT32 cast_count = 0) { | ||
| 217 | Ref<ID3D12Resource> resource; | 218 | Ref<ID3D12Resource> resource; |
| 218 | D3D12_HEAP_PROPERTIES heap_properties{D3D12_HEAP_TYPE_DEFAULT}; | 219 | D3D12_HEAP_PROPERTIES heap_properties{D3D12_HEAP_TYPE_DEFAULT}; |
| 219 | D3D12_RESOURCE_DESC texture{}; | 220 | if (cast_count) { |
| 220 | texture.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D; | 221 | Ref<ID3D12Device10> device10; |
| 221 | texture.Width = texture.Height = 4; | 222 | CHECK(SUCCEEDED(device->QueryInterface(IID_PPV_ARGS(&device10.p)))); |
| 222 | texture.DepthOrArraySize = layers; | 223 | D3D12_RESOURCE_DESC1 tex1{}; |
| 223 | texture.MipLevels = mips; | 224 | tex1.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D; |
| 224 | texture.Format = resource_format; | 225 | tex1.Width = tex1.Height = 4; |
| 225 | texture.SampleDesc.Count = 1; | 226 | tex1.DepthOrArraySize = layers; |
| 226 | texture.Flags = D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET; | 227 | tex1.MipLevels = mips; |
| 227 | CHECK(SUCCEEDED(device->CreateCommittedResource(&heap_properties, D3D12_HEAP_FLAG_NONE, &texture, | 228 | tex1.Format = resource_format; |
| 228 | D3D12_RESOURCE_STATE_RENDER_TARGET, nullptr, IID_PPV_ARGS(&resource.p)))); | 229 | tex1.SampleDesc.Count = samples; |
| 230 | tex1.Flags = D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET; | ||
| 231 | CHECK(SUCCEEDED(device10->CreateCommittedResource3(&heap_properties, D3D12_HEAP_FLAG_NONE, &tex1, | ||
| 232 | D3D12_BARRIER_LAYOUT_RENDER_TARGET, nullptr, nullptr, cast_count, cast_list, | ||
| 233 | IID_PPV_ARGS(&resource.p)))); | ||
| 234 | } else { | ||
| 235 | D3D12_RESOURCE_DESC texture{}; | ||
| 236 | texture.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D; | ||
| 237 | texture.Width = texture.Height = 4; | ||
| 238 | texture.DepthOrArraySize = layers; | ||
| 239 | texture.MipLevels = mips; | ||
| 240 | texture.Format = resource_format; | ||
| 241 | texture.SampleDesc.Count = samples; | ||
| 242 | texture.Flags = D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET; | ||
| 243 | CHECK(SUCCEEDED(device->CreateCommittedResource(&heap_properties, D3D12_HEAP_FLAG_NONE, &texture, | ||
| 244 | D3D12_RESOURCE_STATE_RENDER_TARGET, nullptr, IID_PPV_ARGS(&resource.p)))); | ||
| 245 | } | ||
| 229 | Ref<ID3D12DescriptorHeap> heap; | 246 | Ref<ID3D12DescriptorHeap> heap; |
| 230 | const D3D12_DESCRIPTOR_HEAP_DESC desc{D3D12_DESCRIPTOR_HEAP_TYPE_RTV, 1, D3D12_DESCRIPTOR_HEAP_FLAG_NONE, 0}; | 247 | const D3D12_DESCRIPTOR_HEAP_DESC desc{D3D12_DESCRIPTOR_HEAP_TYPE_RTV, 1, D3D12_DESCRIPTOR_HEAP_FLAG_NONE, 0}; |
| 231 | CHECK(SUCCEEDED(device->CreateDescriptorHeap(&desc, IID_PPV_ARGS(&heap.p)))); | 248 | CHECK(SUCCEEDED(device->CreateDescriptorHeap(&desc, IID_PPV_ARGS(&heap.p)))); |
| @@ -237,7 +254,7 @@ bool rejects_view(ID3D12Device* device, DXGI_FORMAT resource_format, const D3D12 | |||
| 237 | const auto handle = heap->GetCPUDescriptorHandleForHeapStart(); | 254 | const auto handle = heap->GetCPUDescriptorHandleForHeapStart(); |
| 238 | // For the supported shape, overwrite a valid slot too: rejection must not leave its old RTV active. | 255 | // For the supported shape, overwrite a valid slot too: rejection must not leave its old RTV active. |
| 239 | D3D12_RENDER_TARGET_VIEW_DESC seed{}; | 256 | D3D12_RENDER_TARGET_VIEW_DESC seed{}; |
| 240 | seed.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2D; | 257 | seed.ViewDimension = samples > 1 ? D3D12_RTV_DIMENSION_TEXTURE2DMS : D3D12_RTV_DIMENSION_TEXTURE2D; |
| 241 | seed.Format = resource_format == DXGI_FORMAT_R8G8B8A8_TYPELESS ? DXGI_FORMAT_R8G8B8A8_UNORM : resource_format; | 258 | seed.Format = resource_format == DXGI_FORMAT_R8G8B8A8_TYPELESS ? DXGI_FORMAT_R8G8B8A8_UNORM : resource_format; |
| 242 | device->CreateRenderTargetView(resource.p, &seed, handle); | 259 | device->CreateRenderTargetView(resource.p, &seed, handle); |
| 243 | device->CreateRenderTargetView(resource.p, view, handle); | 260 | device->CreateRenderTargetView(resource.p, view, handle); |
| @@ -246,6 +263,150 @@ bool rejects_view(ID3D12Device* device, DXGI_FORMAT resource_format, const D3D12 | |||
| 246 | CHECK(list->Close() == E_INVALIDARG); // The invalid list is never sent to the GPU. | 263 | CHECK(list->Close() == E_INVALIDARG); // The invalid list is never sent to the GPU. |
| 247 | return true; | 264 | return true; |
| 248 | } | 265 | } |
| 266 | |||
| 267 | bool clear_and_read_msaa(ID3D12Device* device, DXGI_FORMAT resource_format, | ||
| 268 | const DXGI_FORMAT* cast_list, UINT32 cast_count, | ||
| 269 | DXGI_FORMAT whole_format, DXGI_FORMAT rect_format, bool partial, | ||
| 270 | bool array, UINT first_layer, UINT layer_count, | ||
| 271 | std::vector<unsigned char>& pixels) { | ||
| 272 | Ref<ID3D12CommandQueue> queue; | ||
| 273 | Ref<ID3D12CommandAllocator> allocator; | ||
| 274 | Ref<ID3D12GraphicsCommandList> list; | ||
| 275 | Ref<ID3D12Fence> fence; | ||
| 276 | D3D12_COMMAND_QUEUE_DESC queue_desc{}; | ||
| 277 | CHECK(SUCCEEDED(device->CreateCommandQueue(&queue_desc, IID_PPV_ARGS(&queue.p)))); | ||
| 278 | CHECK(SUCCEEDED(device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(&allocator.p)))); | ||
| 279 | CHECK(SUCCEEDED(device->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, allocator.p, nullptr, | ||
| 280 | IID_PPV_ARGS(&list.p)))); | ||
| 281 | CHECK(SUCCEEDED(device->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&fence.p)))); | ||
| 282 | |||
| 283 | constexpr UINT width = 5, height = 3; | ||
| 284 | const UINT16 layers = array ? 4 : 1; | ||
| 285 | Ref<ID3D12Resource> msaa, resolved, readback; | ||
| 286 | D3D12_HEAP_PROPERTIES default_heap{D3D12_HEAP_TYPE_DEFAULT}; | ||
| 287 | if (cast_count) { | ||
| 288 | Ref<ID3D12Device10> device10; | ||
| 289 | CHECK(SUCCEEDED(device->QueryInterface(IID_PPV_ARGS(&device10.p)))); | ||
| 290 | D3D12_RESOURCE_DESC1 tex1{}; | ||
| 291 | tex1.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D; | ||
| 292 | tex1.Width = width; | ||
| 293 | tex1.Height = height; | ||
| 294 | tex1.DepthOrArraySize = layers; | ||
| 295 | tex1.MipLevels = 1; | ||
| 296 | tex1.Format = resource_format; | ||
| 297 | tex1.SampleDesc.Count = 4; | ||
| 298 | tex1.Flags = D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET; | ||
| 299 | CHECK(SUCCEEDED(device10->CreateCommittedResource3(&default_heap, D3D12_HEAP_FLAG_NONE, &tex1, | ||
| 300 | D3D12_BARRIER_LAYOUT_RENDER_TARGET, nullptr, nullptr, cast_count, cast_list, | ||
| 301 | IID_PPV_ARGS(&msaa.p)))); | ||
| 302 | } else { | ||
| 303 | D3D12_RESOURCE_DESC tex{}; | ||
| 304 | tex.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D; | ||
| 305 | tex.Width = width; | ||
| 306 | tex.Height = height; | ||
| 307 | tex.DepthOrArraySize = layers; | ||
| 308 | tex.MipLevels = 1; | ||
| 309 | tex.Format = resource_format; | ||
| 310 | tex.SampleDesc.Count = 4; | ||
| 311 | tex.Flags = D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET; | ||
| 312 | CHECK(SUCCEEDED(device->CreateCommittedResource(&default_heap, D3D12_HEAP_FLAG_NONE, &tex, | ||
| 313 | D3D12_RESOURCE_STATE_RENDER_TARGET, nullptr, IID_PPV_ARGS(&msaa.p)))); | ||
| 314 | } | ||
| 315 | D3D12_RESOURCE_DESC resolved_desc{}; | ||
| 316 | resolved_desc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D; | ||
| 317 | resolved_desc.Width = width; | ||
| 318 | resolved_desc.Height = height; | ||
| 319 | resolved_desc.DepthOrArraySize = layers; | ||
| 320 | resolved_desc.MipLevels = 1; | ||
| 321 | resolved_desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; | ||
| 322 | resolved_desc.SampleDesc.Count = 1; | ||
| 323 | CHECK(SUCCEEDED(device->CreateCommittedResource(&default_heap, D3D12_HEAP_FLAG_NONE, &resolved_desc, | ||
| 324 | D3D12_RESOURCE_STATE_RESOLVE_DEST, nullptr, IID_PPV_ARGS(&resolved.p)))); | ||
| 325 | |||
| 326 | std::vector<D3D12_PLACED_SUBRESOURCE_FOOTPRINT> placed(layers); | ||
| 327 | UINT64 total = 0; | ||
| 328 | device->GetCopyableFootprints(&resolved_desc, 0, layers, 0, placed.data(), nullptr, nullptr, &total); | ||
| 329 | D3D12_RESOURCE_DESC buf{}; | ||
| 330 | buf.Dimension = D3D12_RESOURCE_DIMENSION_BUFFER; | ||
| 331 | buf.Width = total; | ||
| 332 | buf.Height = buf.SampleDesc.Count = 1; | ||
| 333 | buf.DepthOrArraySize = buf.MipLevels = 1; | ||
| 334 | buf.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR; | ||
| 335 | D3D12_HEAP_PROPERTIES rb_heap{D3D12_HEAP_TYPE_READBACK}; | ||
| 336 | CHECK(SUCCEEDED(device->CreateCommittedResource(&rb_heap, D3D12_HEAP_FLAG_NONE, &buf, | ||
| 337 | D3D12_RESOURCE_STATE_COPY_DEST, nullptr, IID_PPV_ARGS(&readback.p)))); | ||
| 338 | |||
| 339 | Ref<ID3D12DescriptorHeap> rtv_heap; | ||
| 340 | const D3D12_DESCRIPTOR_HEAP_DESC rtv_desc{D3D12_DESCRIPTOR_HEAP_TYPE_RTV, 2, D3D12_DESCRIPTOR_HEAP_FLAG_NONE, 0}; | ||
| 341 | CHECK(SUCCEEDED(device->CreateDescriptorHeap(&rtv_desc, IID_PPV_ARGS(&rtv_heap.p)))); | ||
| 342 | const auto h0 = rtv_heap->GetCPUDescriptorHandleForHeapStart(); | ||
| 343 | const D3D12_CPU_DESCRIPTOR_HANDLE h1{h0.ptr + device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_RTV)}; | ||
| 344 | |||
| 345 | D3D12_RENDER_TARGET_VIEW_DESC view{}; | ||
| 346 | view.ViewDimension = array ? D3D12_RTV_DIMENSION_TEXTURE2DMSARRAY : D3D12_RTV_DIMENSION_TEXTURE2DMS; | ||
| 347 | if (array) { | ||
| 348 | view.Format = DXGI_FORMAT_R8G8B8A8_UNORM; | ||
| 349 | for (UINT layer = 0; layer < layers; ++layer) { | ||
| 350 | view.Texture2DMSArray = {layer, 1}; | ||
| 351 | device->CreateRenderTargetView(msaa.p, &view, h0); | ||
| 352 | const FLOAT seed[] = {FLOAT(layer + 1) * 0.1f, 0.2f, 0.3f, 1.0f}; | ||
| 353 | list->ClearRenderTargetView(h0, seed, 0, nullptr); | ||
| 354 | } | ||
| 355 | view.Texture2DMSArray = {first_layer, layer_count}; | ||
| 356 | } | ||
| 357 | view.Format = whole_format; | ||
| 358 | device->CreateRenderTargetView(msaa.p, &view, h0); | ||
| 359 | view.Format = rect_format; | ||
| 360 | device->CreateRenderTargetView(msaa.p, &view, h1); | ||
| 361 | const FLOAT full[4] = {0.25f, 0.5f, 0.75f, 0.25f}; | ||
| 362 | const FLOAT part[4] = {0.0031308f, 0.18f, 0.5f, 0.75f}; | ||
| 363 | list->ClearRenderTargetView(h0, full, 0, nullptr); | ||
| 364 | const D3D12_RECT rect{1, 1, 4, 3}; | ||
| 365 | if (partial) list->ClearRenderTargetView(h1, part, 1, &rect); | ||
| 366 | |||
| 367 | D3D12_RESOURCE_BARRIER b{}; | ||
| 368 | b.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION; | ||
| 369 | b.Transition = {msaa.p, D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES, | ||
| 370 | D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_RESOLVE_SOURCE}; | ||
| 371 | list->ResourceBarrier(1, &b); | ||
| 372 | for (UINT layer = 0; layer < layers; ++layer) | ||
| 373 | list->ResolveSubresource(resolved.p, layer, msaa.p, layer, DXGI_FORMAT_R8G8B8A8_UNORM); | ||
| 374 | b.Transition = {resolved.p, D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES, | ||
| 375 | D3D12_RESOURCE_STATE_RESOLVE_DEST, D3D12_RESOURCE_STATE_COPY_SOURCE}; | ||
| 376 | list->ResourceBarrier(1, &b); | ||
| 377 | D3D12_TEXTURE_COPY_LOCATION src{}, dst{}; | ||
| 378 | src.pResource = resolved.p; | ||
| 379 | src.Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX; | ||
| 380 | dst.pResource = readback.p; | ||
| 381 | dst.Type = D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT; | ||
| 382 | for (UINT layer = 0; layer < layers; ++layer) { | ||
| 383 | src.SubresourceIndex = layer; | ||
| 384 | dst.PlacedFootprint = placed[layer]; | ||
| 385 | list->CopyTextureRegion(&dst, 0, 0, 0, &src, nullptr); | ||
| 386 | } | ||
| 387 | CHECK(SUCCEEDED(list->Close())); | ||
| 388 | ID3D12CommandList* lists[] = {list.p}; | ||
| 389 | queue->ExecuteCommandLists(1, lists); | ||
| 390 | CHECK(SUCCEEDED(queue->Signal(fence.p, 1))); | ||
| 391 | Event event; | ||
| 392 | CHECK(event.handle); | ||
| 393 | CHECK(SUCCEEDED(fence->SetEventOnCompletion(1, event.handle))); | ||
| 394 | CHECK(WaitForSingleObject(event.handle, 5000) == WAIT_OBJECT_0); | ||
| 395 | void* mapped = nullptr; | ||
| 396 | const D3D12_RANGE range{0, SIZE_T(total)}; | ||
| 397 | CHECK(SUCCEEDED(readback->Map(0, &range, &mapped)) && mapped); | ||
| 398 | pixels.clear(); | ||
| 399 | for (const auto& footprint : placed) { | ||
| 400 | const auto& f = footprint.Footprint; | ||
| 401 | for (UINT y = 0; y < f.Height; ++y) { | ||
| 402 | const auto* row = static_cast<unsigned char*>(mapped) + footprint.Offset + y * f.RowPitch; | ||
| 403 | pixels.insert(pixels.end(), row, row + f.Width * 4); | ||
| 404 | } | ||
| 405 | } | ||
| 406 | const D3D12_RANGE none{}; | ||
| 407 | readback->Unmap(0, &none); | ||
| 408 | return true; | ||
| 409 | } | ||
| 249 | } // namespace | 410 | } // namespace |
| 250 | 411 | ||
| 251 | int main() { | 412 | int main() { |
| @@ -452,8 +613,10 @@ int main() { | |||
| 452 | regressions, vk.conditional_rendering ? "enabled" : "unavailable (predicated cases skipped)"); | 613 | regressions, vk.conditional_rendering ? "enabled" : "unavailable (predicated cases skipped)"); |
| 453 | if (mismatches) return 1; | 614 | if (mismatches) return 1; |
| 454 | const auto rejects = [&](DXGI_FORMAT resource_format, const D3D12_RENDER_TARGET_VIEW_DESC* view, | 615 | const auto rejects = [&](DXGI_FORMAT resource_format, const D3D12_RENDER_TARGET_VIEW_DESC* view, |
| 455 | UINT16 mips = 1, UINT16 layers = 1) { | 616 | UINT16 mips = 1, UINT16 layers = 1, UINT samples = 1, |
| 456 | if (!rejects_view(ours.p, resource_format, view, mips, layers)) return false; | 617 | const DXGI_FORMAT* cast_list = nullptr, UINT32 cast_count = 0) { |
| 618 | if (!rejects_view(ours.p, resource_format, view, mips, layers, samples, cast_list, cast_count)) | ||
| 619 | return false; | ||
| 457 | ++rejected; | 620 | ++rejected; |
| 458 | return true; | 621 | return true; |
| 459 | }; | 622 | }; |
| @@ -501,6 +664,64 @@ int main() { | |||
| 501 | invalid.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2DARRAY; | 664 | invalid.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2DARRAY; |
| 502 | invalid.Texture2DArray = {1, 1, 2, 1}; | 665 | invalid.Texture2DArray = {1, 1, 2, 1}; |
| 503 | if (!rejects(DXGI_FORMAT_R8G8B8A8_TYPELESS, &invalid, 3, 4)) return 1; | 666 | if (!rejects(DXGI_FORMAT_R8G8B8A8_TYPELESS, &invalid, 3, 4)) return 1; |
| 667 | |||
| 668 | // 4x MSAA typeless and castable RGBA8 RTVs (TEXTURE2DMS / TEXTURE2DMSARRAY) compared against WARP. | ||
| 669 | { | ||
| 670 | const DXGI_FORMAT srgb_list[] = {DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB}; | ||
| 671 | const auto compare_msaa = [&](DXGI_FORMAT resource_format, const DXGI_FORMAT* cast_list, | ||
| 672 | UINT32 cast_count, DXGI_FORMAT full, DXGI_FORMAT rect, bool partial, | ||
| 673 | bool array, UINT first_layer, UINT layer_count) { | ||
| 674 | std::vector<unsigned char> actual, expected; | ||
| 675 | if (!clear_and_read_msaa(ours.p, resource_format, cast_list, cast_count, full, rect, partial, array, | ||
| 676 | first_layer, layer_count, actual) || | ||
| 677 | !clear_and_read_msaa(host.p, resource_format, cast_list, cast_count, full, rect, partial, array, | ||
| 678 | first_layer, layer_count, expected)) | ||
| 679 | return false; | ||
| 680 | ++comparisons; | ||
| 681 | if (actual.size() != expected.size()) return false; | ||
| 682 | for (std::size_t i = 0; i < actual.size(); ++i) { | ||
| 683 | if (std::abs(int(actual[i]) - int(expected[i])) > 1) { | ||
| 684 | std::fprintf(stderr, "MSAA RTV mismatch fmt %d full %d rect %d array %d byte %zu: ours %u WARP %u\n", | ||
| 685 | int(resource_format), int(full), int(rect), int(array), i, unsigned(actual[i]), | ||
| 686 | unsigned(expected[i])); | ||
| 687 | ++mismatches; | ||
| 688 | return false; | ||
| 689 | } | ||
| 690 | } | ||
| 691 | return true; | ||
| 692 | }; | ||
| 693 | if (!compare_msaa(DXGI_FORMAT_R8G8B8A8_TYPELESS, nullptr, 0, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, | ||
| 694 | DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, false, false, 0, 1)) | ||
| 695 | return 1; | ||
| 696 | if (!compare_msaa(DXGI_FORMAT_R8G8B8A8_TYPELESS, nullptr, 0, DXGI_FORMAT_R8G8B8A8_UNORM, | ||
| 697 | DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, true, false, 0, 1)) | ||
| 698 | return 1; | ||
| 699 | if (!compare_msaa(DXGI_FORMAT_R8G8B8A8_TYPELESS, nullptr, 0, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, | ||
| 700 | DXGI_FORMAT_R8G8B8A8_UNORM, true, true, 1, 2)) | ||
| 701 | return 1; | ||
| 702 | Ref<ID3D12Device10> host10; | ||
| 703 | if (SUCCEEDED(host->QueryInterface(IID_PPV_ARGS(&host10.p)))) { | ||
| 704 | if (!compare_msaa(DXGI_FORMAT_R8G8B8A8_UNORM, srgb_list, 2, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, | ||
| 705 | DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, false, false, 0, 1)) | ||
| 706 | return 1; | ||
| 707 | if (!compare_msaa(DXGI_FORMAT_R8G8B8A8_UNORM, srgb_list, 2, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, | ||
| 708 | DXGI_FORMAT_R8G8B8A8_UNORM, true, true, 1, 2)) | ||
| 709 | return 1; | ||
| 710 | } | ||
| 711 | // MSAA vs 1x view-dimension mismatches, out-of-range MSAA array slices, and unlisted castable formats. | ||
| 712 | D3D12_RENDER_TARGET_VIEW_DESC bad_msaa{}; | ||
| 713 | bad_msaa.Format = DXGI_FORMAT_R8G8B8A8_UNORM_SRGB; | ||
| 714 | bad_msaa.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2D; | ||
| 715 | if (!rejects(DXGI_FORMAT_R8G8B8A8_TYPELESS, &bad_msaa, 1, 1, 4)) return 1; | ||
| 716 | bad_msaa.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2DMS; | ||
| 717 | if (!rejects(DXGI_FORMAT_R8G8B8A8_TYPELESS, &bad_msaa, 1, 1, 1)) return 1; | ||
| 718 | bad_msaa.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2DMSARRAY; | ||
| 719 | bad_msaa.Texture2DMSArray = {3, 2}; | ||
| 720 | if (!rejects(DXGI_FORMAT_R8G8B8A8_TYPELESS, &bad_msaa, 1, 4, 4)) return 1; | ||
| 721 | bad_msaa.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2DMS; | ||
| 722 | bad_msaa.Format = DXGI_FORMAT_R8G8B8A8_UINT; | ||
| 723 | if (!rejects(DXGI_FORMAT_R8G8B8A8_UNORM, &bad_msaa, 1, 1, 4, srgb_list, 2)) return 1; | ||
| 724 | } | ||
| 504 | } | 725 | } |
| 505 | if (vk.validation_errors()) return 1; | 726 | if (vk.validation_errors()) return 1; |
| 506 | std::printf("typeless RTV: %u WARP readbacks matched, descriptor snapshots and format-cache order checked; %u unsupported/invalid views rejected\n", | 727 | std::printf("typeless RTV: %u WARP readbacks matched, descriptor snapshots and format-cache order checked; %u unsupported/invalid views rejected\n", |
diff --git a/runtime/test/d3d12_vulkan_device_test.cpp b/runtime/test/d3d12_vulkan_device_test.cpp index 556ab1566..9d49740e0 100644 --- a/runtime/test/d3d12_vulkan_device_test.cpp +++ b/runtime/test/d3d12_vulkan_device_test.cpp | |||
| @@ -324,8 +324,8 @@ int cpu_copies(ID3D12Device* device, bool bc, const char* path) { | |||
| 324 | return 0; | 324 | return 0; |
| 325 | } | 325 | } |
| 326 | 326 | ||
| 327 | // The host PC runtime's D3D12 device to compare answers with: the default adapter, or the one LEONIDA_HOST_ADAPTER | 327 | // The host PC runtime's D3D12 device to compare answers with: the layer's own adapter (set in main), else the default |
| 328 | // names ("warp", or part of an adapter's name); false if there is none. | 328 | // one, or the one LEONIDA_HOST_ADAPTER names ("warp", or part of an adapter's name); false if there is none. |
| 329 | // Under Wine there is none (copycmp::create_host). | 329 | // Under Wine there is none (copycmp::create_host). |
| 330 | bool create_host_device(Ref<ID3D12Device>& host, std::string* adapter_name = nullptr) { | 330 | bool create_host_device(Ref<ID3D12Device>& host, std::string* adapter_name = nullptr) { |
| 331 | copycmp::Ptr<ID3D12Device> device; | 331 | copycmp::Ptr<ID3D12Device> device; |
| @@ -785,6 +785,9 @@ int compare_allocation_info(ID3D12Device* ours) { | |||
| 785 | d.Layout = D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE; | 785 | d.Layout = D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE; |
| 786 | return d; | 786 | return d; |
| 787 | }(), 0}, | 787 | }(), 0}, |
| 788 | {"UNKNOWN 4x MSAA NONE (invalid)", with(texture_desc(256, 256, rgba8, none, 1), 0, 4), 0}, | ||
| 789 | {"UNKNOWN 4x MSAA RT+DS (invalid)", | ||
| 790 | with(texture_desc(256, 256, rgba8, rt | D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL, 1), 0, 4), 0}, | ||
| 788 | }; | 791 | }; |
| 789 | int mismatches = 0; | 792 | int mismatches = 0; |
| 790 | const auto mismatch = [&](const char* name, const D3D12_RESOURCE_ALLOCATION_INFO& a, | 793 | const auto mismatch = [&](const char* name, const D3D12_RESOURCE_ALLOCATION_INFO& a, |
| @@ -797,6 +800,18 @@ int compare_allocation_info(ID3D12Device* ours) { | |||
| 797 | for (const Case& c : cases) { | 800 | for (const Case& c : cases) { |
| 798 | const D3D12_RESOURCE_ALLOCATION_INFO a = ours->GetResourceAllocationInfo(0, 1, &c.desc); | 801 | const D3D12_RESOURCE_ALLOCATION_INFO a = ours->GetResourceAllocationInfo(0, 1, &c.desc); |
| 799 | const D3D12_RESOURCE_ALLOCATION_INFO b = host->GetResourceAllocationInfo(0, 1, &c.desc); | 802 | const D3D12_RESOURCE_ALLOCATION_INFO b = host->GetResourceAllocationInfo(0, 1, &c.desc); |
| 803 | if (c.top_mip_bytes && b.SizeInBytes == UINT64_MAX && c.desc.SampleDesc.Count > 1 && | ||
| 804 | c.desc.Layout == D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE) { | ||
| 805 | D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS ms{ | ||
| 806 | c.desc.Format, c.desc.SampleDesc.Count, D3D12_MULTISAMPLE_QUALITY_LEVELS_FLAG_TILED_RESOURCE, 0}; | ||
| 807 | if (SUCCEEDED(host->CheckFeatureSupport(D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS, &ms, sizeof(ms))) && | ||
| 808 | ms.NumQualityLevels == 0) { | ||
| 809 | if (a.SizeInBytes == UINT64_MAX || a.Alignment != D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT) | ||
| 810 | mismatch(c.name, a, b); | ||
| 811 | std::printf("allocation info %s: host unsupported (NumQualityLevels=0), skipped\n", c.name); | ||
| 812 | continue; | ||
| 813 | } | ||
| 814 | } | ||
| 800 | if (b.SizeInBytes == UINT64_MAX || !c.top_mip_bytes) { | 815 | if (b.SizeInBytes == UINT64_MAX || !c.top_mip_bytes) { |
| 801 | if (a.SizeInBytes != b.SizeInBytes || (b.SizeInBytes != UINT64_MAX && a.Alignment != b.Alignment)) | 816 | if (a.SizeInBytes != b.SizeInBytes || (b.SizeInBytes != UINT64_MAX && a.Alignment != b.Alignment)) |
| 802 | mismatch(c.name, a, b); | 817 | mismatch(c.name, a, b); |
| @@ -1597,6 +1612,15 @@ int compare_feature_support(ID3D12Device* ours) { | |||
| 1597 | 1612 | ||
| 1598 | // Same-adapter host D3D12 device matched by VkPhysicalDeviceIDProperties (LUID first, then PCI IDs), falling back | 1613 | // Same-adapter host D3D12 device matched by VkPhysicalDeviceIDProperties (LUID first, then PCI IDs), falling back |
| 1599 | // to the default adapter. False if the host has no D3D12 device. | 1614 | // to the default adapter. False if the host has no D3D12 device. |
| 1615 | // D3D11.3 spec 3.2.3.8's ideal FLOAT -> SRGB encoding of c in [0, 1], before scaling to the format's maximum. | ||
| 1616 | double ideal_srgb(double c) { return c <= 0.0031308 ? c * 12.92 : 1.055 * std::pow(c, 1.0 / 2.4) - 0.055; } | ||
| 1617 | |||
| 1618 | // Both bytes within 0.6 ULP (on the integer side) of the ideal value: the tolerance spec 3.2.3.6 (FLOAT -> UNORM) | ||
| 1619 | // and 3.2.3.8 (FLOAT -> SRGB) permit, so two drivers may give the codes either side of a near-tie. | ||
| 1620 | bool within_06_ulp(std::uint8_t a, std::uint8_t b, double ideal) { | ||
| 1621 | return std::abs(double(a) - ideal) <= 0.6 && std::abs(double(b) - ideal) <= 0.6; | ||
| 1622 | } | ||
| 1623 | |||
| 1600 | bool create_host_device_for_physical(VkInstance instance, VkPhysicalDevice physical, | 1624 | bool create_host_device_for_physical(VkInstance instance, VkPhysicalDevice physical, |
| 1601 | PFN_vkGetInstanceProcAddr instance_proc, Ref<ID3D12Device>& host, | 1625 | PFN_vkGetInstanceProcAddr instance_proc, Ref<ID3D12Device>& host, |
| 1602 | std::string& adapter_name) { | 1626 | std::string& adapter_name) { |
| @@ -2205,6 +2229,32 @@ HRESULT fence(ID3D12Device* device, D3D12_FENCE_FLAGS flags, REFIID riid = __uui | |||
| 2205 | return released(device->CreateFence(0, flags, riid, &out), &out); | 2229 | return released(device->CreateFence(0, flags, riid, &out), &out); |
| 2206 | } | 2230 | } |
| 2207 | 2231 | ||
| 2232 | // A 64 KiB heap description for the CreateHeap/CreateHeap1 cases (D3D-238). | ||
| 2233 | D3D12_HEAP_DESC heap_desc_of(UINT64 alignment, D3D12_HEAP_PROPERTIES properties = {D3D12_HEAP_TYPE_DEFAULT}, | ||
| 2234 | D3D12_HEAP_FLAGS flags = D3D12_HEAP_FLAG_NONE, UINT64 size = 64 * 1024) { | ||
| 2235 | D3D12_HEAP_DESC desc{}; | ||
| 2236 | desc.SizeInBytes = size; | ||
| 2237 | desc.Properties = properties; | ||
| 2238 | desc.Alignment = alignment; | ||
| 2239 | desc.Flags = flags; | ||
| 2240 | return desc; | ||
| 2241 | } | ||
| 2242 | |||
| 2243 | HRESULT heap_create(ID3D12Device* device, D3D12_HEAP_DESC desc) { | ||
| 2244 | void* out = nullptr; | ||
| 2245 | return released(device->CreateHeap(&desc, __uuidof(ID3D12Heap), &out), &out); | ||
| 2246 | } | ||
| 2247 | |||
| 2248 | // CreateHeap1 without a protected session; E_NOINTERFACE when the device has no ID3D12Device4. | ||
| 2249 | HRESULT heap_create1(ID3D12Device* device, D3D12_HEAP_DESC desc) { | ||
| 2250 | ID3D12Device4* device4 = nullptr; | ||
| 2251 | if (FAILED(device->QueryInterface(IID_PPV_ARGS(&device4)))) return E_NOINTERFACE; | ||
| 2252 | void* out = nullptr; | ||
| 2253 | const HRESULT hr = device4->CreateHeap1(&desc, nullptr, __uuidof(ID3D12Heap), &out); | ||
| 2254 | device4->Release(); | ||
| 2255 | return released(hr, &out); | ||
| 2256 | } | ||
| 2257 | |||
| 2208 | // Map on a fresh committed resource; `range` is the read range, or null. | 2258 | // Map on a fresh committed resource; `range` is the read range, or null. |
| 2209 | HRESULT map(ID3D12Device* device, D3D12_HEAP_PROPERTIES heap, D3D12_RESOURCE_DESC desc, D3D12_RESOURCE_STATES state, | 2259 | HRESULT map(ID3D12Device* device, D3D12_HEAP_PROPERTIES heap, D3D12_RESOURCE_DESC desc, D3D12_RESOURCE_STATES state, |
| 2210 | UINT subresource, const D3D12_RANGE* range, bool want_pointer = true) { | 2260 | UINT subresource, const D3D12_RANGE* range, bool want_pointer = true) { |
| @@ -2238,6 +2288,21 @@ int compare_invalid_arguments(ID3D12Device* ours) { | |||
| 2238 | struct Case { | 2288 | struct Case { |
| 2239 | const char* name; | 2289 | const char* name; |
| 2240 | InvalidCase call; | 2290 | InvalidCase call; |
| 2291 | bool (*comparable)(ID3D12Device*) = nullptr; | ||
| 2292 | }; | ||
| 2293 | const auto device10 = [](ID3D12Device* d) { | ||
| 2294 | Ref<ID3D12Device10> newer; | ||
| 2295 | return SUCCEEDED(d->QueryInterface(IID_PPV_ARGS(&newer.p))); | ||
| 2296 | }; | ||
| 2297 | const auto not_elevated = [](ID3D12Device*) { | ||
| 2298 | HANDLE token = nullptr; | ||
| 2299 | TOKEN_ELEVATION elevation{}; | ||
| 2300 | DWORD size = 0; | ||
| 2301 | const bool elevated = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token) && | ||
| 2302 | GetTokenInformation(token, TokenElevation, &elevation, sizeof(elevation), &size) && | ||
| 2303 | elevation.TokenIsElevated; | ||
| 2304 | if (token) CloseHandle(token); | ||
| 2305 | return !elevated; | ||
| 2241 | }; | 2306 | }; |
| 2242 | static const Case cases[] = { | 2307 | static const Case cases[] = { |
| 2243 | // CreateCommittedResource: arguments. | 2308 | // CreateCommittedResource: arguments. |
| @@ -2315,7 +2380,7 @@ int compare_invalid_arguments(ID3D12Device* ours) { | |||
| 2315 | }}, | 2380 | }}, |
| 2316 | {"committed: upload buffer in COMMON", [](ID3D12Device* d) { | 2381 | {"committed: upload buffer in COMMON", [](ID3D12Device* d) { |
| 2317 | return committed(d, {D3D12_HEAP_TYPE_UPLOAD}, buffer_desc(256), D3D12_RESOURCE_STATE_COMMON); | 2382 | return committed(d, {D3D12_HEAP_TYPE_UPLOAD}, buffer_desc(256), D3D12_RESOURCE_STATE_COMMON); |
| 2318 | }}, | 2383 | }, +device10}, |
| 2319 | {"committed: upload buffer in COPY_DEST", [](ID3D12Device* d) { | 2384 | {"committed: upload buffer in COPY_DEST", [](ID3D12Device* d) { |
| 2320 | return committed(d, {D3D12_HEAP_TYPE_UPLOAD}, buffer_desc(256), D3D12_RESOURCE_STATE_COPY_DEST); | 2385 | return committed(d, {D3D12_HEAP_TYPE_UPLOAD}, buffer_desc(256), D3D12_RESOURCE_STATE_COPY_DEST); |
| 2321 | }}, | 2386 | }}, |
| @@ -2441,7 +2506,7 @@ int compare_invalid_arguments(ID3D12Device* ours) { | |||
| 2441 | {"committed: BC1 6x6 top mip", [](ID3D12Device* d) { | 2506 | {"committed: BC1 6x6 top mip", [](ID3D12Device* d) { |
| 2442 | return committed(d, {D3D12_HEAP_TYPE_DEFAULT}, | 2507 | return committed(d, {D3D12_HEAP_TYPE_DEFAULT}, |
| 2443 | texture_desc(6, 6, DXGI_FORMAT_BC1_UNORM, D3D12_RESOURCE_FLAG_NONE)); | 2508 | texture_desc(6, 6, DXGI_FORMAT_BC1_UNORM, D3D12_RESOURCE_FLAG_NONE)); |
| 2444 | }}, | 2509 | }, host_supports_unaligned_block_textures}, |
| 2445 | {"committed: render target and depth stencil", [](ID3D12Device* d) { | 2510 | {"committed: render target and depth stencil", [](ID3D12Device* d) { |
| 2446 | return committed(d, {D3D12_HEAP_TYPE_DEFAULT}, | 2511 | return committed(d, {D3D12_HEAP_TYPE_DEFAULT}, |
| 2447 | texture_desc(16, 16, DXGI_FORMAT_D32_FLOAT, | 2512 | texture_desc(16, 16, DXGI_FORMAT_D32_FLOAT, |
| @@ -2513,7 +2578,7 @@ int compare_invalid_arguments(ID3D12Device* ours) { | |||
| 2513 | }}, | 2578 | }}, |
| 2514 | {"committed: readback buffer in COMMON", [](ID3D12Device* d) { | 2579 | {"committed: readback buffer in COMMON", [](ID3D12Device* d) { |
| 2515 | return committed(d, {D3D12_HEAP_TYPE_READBACK}, buffer_desc(256), D3D12_RESOURCE_STATE_COMMON); | 2580 | return committed(d, {D3D12_HEAP_TYPE_READBACK}, buffer_desc(256), D3D12_RESOURCE_STATE_COMMON); |
| 2516 | }}, | 2581 | }, +device10}, |
| 2517 | {"committed: readback buffer with UAV", [](ID3D12Device* d) { | 2582 | {"committed: readback buffer with UAV", [](ID3D12Device* d) { |
| 2518 | auto desc = buffer_desc(256); | 2583 | auto desc = buffer_desc(256); |
| 2519 | desc.Flags = D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS; | 2584 | desc.Flags = D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS; |
| @@ -2673,7 +2738,7 @@ int compare_invalid_arguments(ID3D12Device* ours) { | |||
| 2673 | }}, | 2738 | }}, |
| 2674 | {"committed: heap flag HARDWARE_PROTECTED on a texture", [](ID3D12Device* d) { | 2739 | {"committed: heap flag HARDWARE_PROTECTED on a texture", [](ID3D12Device* d) { |
| 2675 | return with_heap_flags(d, rgba8(), D3D12_HEAP_FLAG_HARDWARE_PROTECTED); | 2740 | return with_heap_flags(d, rgba8(), D3D12_HEAP_FLAG_HARDWARE_PROTECTED); |
| 2676 | }}, | 2741 | }, +device10}, |
| 2677 | {"committed: heap flag ALLOW_WRITE_WATCH on a buffer", [](ID3D12Device* d) { | 2742 | {"committed: heap flag ALLOW_WRITE_WATCH on a buffer", [](ID3D12Device* d) { |
| 2678 | return with_heap_flags(d, buffer_desc(256), D3D12_HEAP_FLAG_ALLOW_WRITE_WATCH); | 2743 | return with_heap_flags(d, buffer_desc(256), D3D12_HEAP_FLAG_ALLOW_WRITE_WATCH); |
| 2679 | }}, | 2744 | }}, |
| @@ -2728,7 +2793,7 @@ int compare_invalid_arguments(ID3D12Device* ours) { | |||
| 2728 | auto desc = buffer_desc(256); | 2793 | auto desc = buffer_desc(256); |
| 2729 | desc.Flags = D3D12_RESOURCE_FLAGS(D3D12_RESOURCE_FLAG_RAYTRACING_ACCELERATION_STRUCTURE); | 2794 | desc.Flags = D3D12_RESOURCE_FLAGS(D3D12_RESOURCE_FLAG_RAYTRACING_ACCELERATION_STRUCTURE); |
| 2730 | return committed(d, {D3D12_HEAP_TYPE_DEFAULT}, desc); | 2795 | return committed(d, {D3D12_HEAP_TYPE_DEFAULT}, desc); |
| 2731 | }}, | 2796 | }, +device10}, |
| 2732 | {"committed: resource flag 0x200 on a buffer", [](ID3D12Device* d) { | 2797 | {"committed: resource flag 0x200 on a buffer", [](ID3D12Device* d) { |
| 2733 | auto desc = buffer_desc(256); | 2798 | auto desc = buffer_desc(256); |
| 2734 | desc.Flags = D3D12_RESOURCE_FLAGS(0x200); | 2799 | desc.Flags = D3D12_RESOURCE_FLAGS(0x200); |
| @@ -2756,15 +2821,15 @@ int compare_invalid_arguments(ID3D12Device* ours) { | |||
| 2756 | {"committed: resource flag RAYTRACING_ACCELERATION_STRUCTURE on a texture", [](ID3D12Device* d) { | 2821 | {"committed: resource flag RAYTRACING_ACCELERATION_STRUCTURE on a texture", [](ID3D12Device* d) { |
| 2757 | auto desc = rgba8(D3D12_RESOURCE_FLAG_RAYTRACING_ACCELERATION_STRUCTURE); | 2822 | auto desc = rgba8(D3D12_RESOURCE_FLAG_RAYTRACING_ACCELERATION_STRUCTURE); |
| 2758 | return committed(d, {D3D12_HEAP_TYPE_DEFAULT}, desc); | 2823 | return committed(d, {D3D12_HEAP_TYPE_DEFAULT}, desc); |
| 2759 | }}, | 2824 | }, +device10}, |
| 2760 | {"committed: resource flag 0x400 on a buffer", [](ID3D12Device* d) { | 2825 | {"committed: resource flag 0x400 on a buffer", [](ID3D12Device* d) { |
| 2761 | auto desc = buffer_desc(256); | 2826 | auto desc = buffer_desc(256); |
| 2762 | desc.Flags = D3D12_RESOURCE_FLAGS(0x400); | 2827 | desc.Flags = D3D12_RESOURCE_FLAGS(0x400); |
| 2763 | return committed(d, {D3D12_HEAP_TYPE_DEFAULT}, desc); | 2828 | return committed(d, {D3D12_HEAP_TYPE_DEFAULT}, desc); |
| 2764 | }}, | 2829 | }, +device10}, |
| 2765 | {"committed: resource flag 0x400 on a texture", [](ID3D12Device* d) { | 2830 | {"committed: resource flag 0x400 on a texture", [](ID3D12Device* d) { |
| 2766 | return committed(d, {D3D12_HEAP_TYPE_DEFAULT}, rgba8(D3D12_RESOURCE_FLAGS(0x400))); | 2831 | return committed(d, {D3D12_HEAP_TYPE_DEFAULT}, rgba8(D3D12_RESOURCE_FLAGS(0x400))); |
| 2767 | }}, | 2832 | }, +device10}, |
| 2768 | // A null output is a capability check; with invalid arguments too, the host's answer says which comes first. | 2833 | // A null output is a capability check; with invalid arguments too, the host's answer says which comes first. |
| 2769 | {"committed: heap type 99, null output", [](ID3D12Device* d) { | 2834 | {"committed: heap type 99, null output", [](ID3D12Device* d) { |
| 2770 | const H heap{D3D12_HEAP_TYPE(99)}; | 2835 | const H heap{D3D12_HEAP_TYPE(99)}; |
| @@ -2779,6 +2844,42 @@ int compare_invalid_arguments(ID3D12Device* ours) { | |||
| 2779 | return d->CreateCommittedResource(&heap, D3D12_HEAP_FLAG_NONE, &desc, D3D12_RESOURCE_STATE_COMMON, | 2844 | return d->CreateCommittedResource(&heap, D3D12_HEAP_FLAG_NONE, &desc, D3D12_RESOURCE_STATE_COMMON, |
| 2780 | nullptr, __uuidof(ID3D12Resource), nullptr); | 2845 | nullptr, __uuidof(ID3D12Resource), nullptr); |
| 2781 | }}, | 2846 | }}, |
| 2847 | // CreateHeap and CreateHeap1 (D3D-238): the four descriptions the host refused on an RX 5700 and WARP, the | ||
| 2848 | // heap-property rules CreateCommittedResource shares. A refusal needs no arena; the valid neighbours do, so | ||
| 2849 | // compare_heap_neighbours compares them on the standalone device. | ||
| 2850 | {"heap: alignment 4096", [](ID3D12Device* d) { return heap_create(d, heap_desc_of(4096)); }}, | ||
| 2851 | {"heap1: alignment 4096", [](ID3D12Device* d) { return heap_create1(d, heap_desc_of(4096)); }}, | ||
| 2852 | {"heap: custom heap, unknown page property", [](ID3D12Device* d) { | ||
| 2853 | return heap_create(d, heap_desc_of(0, {D3D12_HEAP_TYPE_CUSTOM, D3D12_CPU_PAGE_PROPERTY_UNKNOWN, | ||
| 2854 | D3D12_MEMORY_POOL_L0})); | ||
| 2855 | }}, | ||
| 2856 | {"heap1: custom heap, unknown page property", [](ID3D12Device* d) { | ||
| 2857 | return heap_create1(d, heap_desc_of(0, {D3D12_HEAP_TYPE_CUSTOM, D3D12_CPU_PAGE_PROPERTY_UNKNOWN, | ||
| 2858 | D3D12_MEMORY_POOL_L0})); | ||
| 2859 | }}, | ||
| 2860 | {"heap: all three DENY flags", [](ID3D12Device* d) { | ||
| 2861 | return heap_create(d, heap_desc_of(0, {D3D12_HEAP_TYPE_DEFAULT}, | ||
| 2862 | D3D12_HEAP_FLAG_DENY_BUFFERS | D3D12_HEAP_FLAG_DENY_RT_DS_TEXTURES | | ||
| 2863 | D3D12_HEAP_FLAG_DENY_NON_RT_DS_TEXTURES)); | ||
| 2864 | }}, | ||
| 2865 | {"heap1: all three DENY flags", [](ID3D12Device* d) { | ||
| 2866 | return heap_create1(d, heap_desc_of(0, {D3D12_HEAP_TYPE_DEFAULT}, | ||
| 2867 | D3D12_HEAP_FLAG_DENY_BUFFERS | D3D12_HEAP_FLAG_DENY_RT_DS_TEXTURES | | ||
| 2868 | D3D12_HEAP_FLAG_DENY_NON_RT_DS_TEXTURES)); | ||
| 2869 | }}, | ||
| 2870 | {"heap: type 0", [](ID3D12Device* d) { return heap_create(d, heap_desc_of(0, {D3D12_HEAP_TYPE(0)})); }}, | ||
| 2871 | {"heap1: type 0", [](ID3D12Device* d) { return heap_create1(d, heap_desc_of(0, {D3D12_HEAP_TYPE(0)})); }}, | ||
| 2872 | {"heap: custom heap, unknown pool", [](ID3D12Device* d) { | ||
| 2873 | return heap_create(d, heap_desc_of(0, {D3D12_HEAP_TYPE_CUSTOM, D3D12_CPU_PAGE_PROPERTY_WRITE_COMBINE, | ||
| 2874 | D3D12_MEMORY_POOL_UNKNOWN})); | ||
| 2875 | }}, | ||
| 2876 | {"heap: default heap with a CPU page property", [](ID3D12Device* d) { | ||
| 2877 | return heap_create(d, heap_desc_of(0, {D3D12_HEAP_TYPE_DEFAULT, D3D12_CPU_PAGE_PROPERTY_WRITE_BACK})); | ||
| 2878 | }}, | ||
| 2879 | {"heap: default heap with a memory pool", [](ID3D12Device* d) { | ||
| 2880 | return heap_create(d, heap_desc_of(0, {D3D12_HEAP_TYPE_DEFAULT, D3D12_CPU_PAGE_PROPERTY_UNKNOWN, | ||
| 2881 | D3D12_MEMORY_POOL_L0})); | ||
| 2882 | }}, | ||
| 2782 | // CreateDescriptorHeap. A null description faults in the host runtime, so it is not compared. | 2883 | // CreateDescriptorHeap. A null description faults in the host runtime, so it is not compared. |
| 2783 | {"descriptor heap: null output", [](ID3D12Device* d) { | 2884 | {"descriptor heap: null output", [](ID3D12Device* d) { |
| 2784 | const D3D12_DESCRIPTOR_HEAP_DESC desc{D3D12_DESCRIPTOR_HEAP_TYPE_RTV, 4}; | 2885 | const D3D12_DESCRIPTOR_HEAP_DESC desc{D3D12_DESCRIPTOR_HEAP_TYPE_RTV, 4}; |
| @@ -2817,7 +2918,7 @@ int compare_invalid_arguments(ID3D12Device* ours) { | |||
| 2817 | {"descriptor heap: shader-visible 2049 samplers", [](ID3D12Device* d) { | 2918 | {"descriptor heap: shader-visible 2049 samplers", [](ID3D12Device* d) { |
| 2818 | return descriptor_heap(d, {D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER, 2049, | 2919 | return descriptor_heap(d, {D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER, 2049, |
| 2819 | D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE}); | 2920 | D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE}); |
| 2820 | }}, | 2921 | }, +device10}, |
| 2821 | {"descriptor heap: shader-visible 2048 samplers", [](ID3D12Device* d) { | 2922 | {"descriptor heap: shader-visible 2048 samplers", [](ID3D12Device* d) { |
| 2822 | return descriptor_heap(d, {D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER, 2048, | 2923 | return descriptor_heap(d, {D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER, 2048, |
| 2823 | D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE}); | 2924 | D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE}); |
| @@ -2862,7 +2963,7 @@ int compare_invalid_arguments(ID3D12Device* ours) { | |||
| 2862 | }}, | 2963 | }}, |
| 2863 | {"command queue: global realtime priority", [](ID3D12Device* d) { | 2964 | {"command queue: global realtime priority", [](ID3D12Device* d) { |
| 2864 | return command_queue(d, {D3D12_COMMAND_LIST_TYPE_DIRECT, D3D12_COMMAND_QUEUE_PRIORITY_GLOBAL_REALTIME}); | 2965 | return command_queue(d, {D3D12_COMMAND_LIST_TYPE_DIRECT, D3D12_COMMAND_QUEUE_PRIORITY_GLOBAL_REALTIME}); |
| 2865 | }}, | 2966 | }, +not_elevated}, |
| 2866 | {"command queue: compute", [](ID3D12Device* d) { return command_queue(d, {D3D12_COMMAND_LIST_TYPE_COMPUTE}); }}, | 2967 | {"command queue: compute", [](ID3D12Device* d) { return command_queue(d, {D3D12_COMMAND_LIST_TYPE_COMPUTE}); }}, |
| 2867 | {"command queue: copy", [](ID3D12Device* d) { return command_queue(d, {D3D12_COMMAND_LIST_TYPE_COPY}); }}, | 2968 | {"command queue: copy", [](ID3D12Device* d) { return command_queue(d, {D3D12_COMMAND_LIST_TYPE_COPY}); }}, |
| 2868 | {"command queue: high priority", [](ID3D12Device* d) { | 2969 | {"command queue: high priority", [](ID3D12Device* d) { |
| @@ -2952,6 +3053,11 @@ int compare_invalid_arguments(ID3D12Device* ours) { | |||
| 2952 | const HRESULT a = call_guarded(c.call, ours), b = call_guarded(c.call, host.p); | 3053 | const HRESULT a = call_guarded(c.call, ours), b = call_guarded(c.call, host.p); |
| 2953 | if (verbose) std::printf(" ours 0x%08lx host 0x%08lx\n", a, b); | 3054 | if (verbose) std::printf(" ours 0x%08lx host 0x%08lx\n", a, b); |
| 2954 | if (a == b) continue; | 3055 | if (a == b) continue; |
| 3056 | if (c.comparable && !c.comparable(host.p)) { | ||
| 3057 | std::printf("invalid arguments %s: not comparable on this host (ours 0x%08lx, host 0x%08lx)\n", c.name, | ||
| 3058 | a, b); | ||
| 3059 | continue; | ||
| 3060 | } | ||
| 2955 | ++mismatches; | 3061 | ++mismatches; |
| 2956 | std::fprintf(stderr, "invalid arguments %s: ours 0x%08lx, host 0x%08lx\n", c.name, a, b); | 3062 | std::fprintf(stderr, "invalid arguments %s: ours 0x%08lx, host 0x%08lx\n", c.name, a, b); |
| 2957 | } | 3063 | } |
| @@ -3009,6 +3115,59 @@ int compare_invalid_arguments(ID3D12Device* ours) { | |||
| 3009 | return mismatches; | 3115 | return mismatches; |
| 3010 | } | 3116 | } |
| 3011 | 3117 | ||
| 3118 | // D3D-238: the valid neighbours of the CreateHeap/CreateHeap1 refusals in compare_invalid_arguments, compared | ||
| 3119 | // with the host on a device that has the GPU address arena (without it the layer answers every heap E_NOTIMPL). | ||
| 3120 | int compare_heap_neighbours(ID3D12Device* ours) { | ||
| 3121 | Ref<ID3D12Device> host; | ||
| 3122 | if (!create_host_device(host)) return -1; | ||
| 3123 | struct Case { | ||
| 3124 | const char* name; | ||
| 3125 | InvalidCase call; | ||
| 3126 | }; | ||
| 3127 | static const Case cases[] = { | ||
| 3128 | {"heap: alignment 0", [](ID3D12Device* d) { return heap_create(d, heap_desc_of(0)); }}, | ||
| 3129 | {"heap: alignment 64 KiB", [](ID3D12Device* d) { | ||
| 3130 | return heap_create(d, heap_desc_of(D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT)); | ||
| 3131 | }}, | ||
| 3132 | {"heap: alignment 4 MiB", [](ID3D12Device* d) { | ||
| 3133 | return heap_create(d, heap_desc_of(D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT, | ||
| 3134 | {D3D12_HEAP_TYPE_DEFAULT}, D3D12_HEAP_FLAG_NONE, | ||
| 3135 | D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT)); | ||
| 3136 | }}, | ||
| 3137 | {"heap1: alignment 4 MiB", [](ID3D12Device* d) { | ||
| 3138 | return heap_create1(d, heap_desc_of(D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT, | ||
| 3139 | {D3D12_HEAP_TYPE_DEFAULT}, D3D12_HEAP_FLAG_NONE, | ||
| 3140 | D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT)); | ||
| 3141 | }}, | ||
| 3142 | {"heap: size 1000", [](ID3D12Device* d) { | ||
| 3143 | return heap_create(d, heap_desc_of(0, {D3D12_HEAP_TYPE_DEFAULT}, D3D12_HEAP_FLAG_NONE, 1000)); | ||
| 3144 | }}, | ||
| 3145 | {"heap: upload", [](ID3D12Device* d) { return heap_create(d, heap_desc_of(0, {D3D12_HEAP_TYPE_UPLOAD})); }}, | ||
| 3146 | {"heap: readback", [](ID3D12Device* d) { | ||
| 3147 | return heap_create(d, heap_desc_of(0, {D3D12_HEAP_TYPE_READBACK})); | ||
| 3148 | }}, | ||
| 3149 | {"heap: custom write-combine L0", [](ID3D12Device* d) { | ||
| 3150 | return heap_create(d, heap_desc_of(0, {D3D12_HEAP_TYPE_CUSTOM, D3D12_CPU_PAGE_PROPERTY_WRITE_COMBINE, | ||
| 3151 | D3D12_MEMORY_POOL_L0})); | ||
| 3152 | }}, | ||
| 3153 | {"heap1: custom write-combine L0", [](ID3D12Device* d) { | ||
| 3154 | return heap_create1(d, heap_desc_of(0, {D3D12_HEAP_TYPE_CUSTOM, D3D12_CPU_PAGE_PROPERTY_WRITE_COMBINE, | ||
| 3155 | D3D12_MEMORY_POOL_L0})); | ||
| 3156 | }}, | ||
| 3157 | {"heap: ALLOW_ONLY_BUFFERS (two DENY flags)", [](ID3D12Device* d) { | ||
| 3158 | return heap_create(d, heap_desc_of(0, {D3D12_HEAP_TYPE_DEFAULT}, D3D12_HEAP_FLAG_ALLOW_ONLY_BUFFERS)); | ||
| 3159 | }}, | ||
| 3160 | }; | ||
| 3161 | int mismatches = 0; | ||
| 3162 | for (const Case& c : cases) { | ||
| 3163 | const HRESULT a = call_guarded(c.call, ours), b = call_guarded(c.call, host.p); | ||
| 3164 | if (a == b) continue; | ||
| 3165 | ++mismatches; | ||
| 3166 | std::fprintf(stderr, "invalid arguments %s: ours 0x%08lx, host 0x%08lx\n", c.name, a, b); | ||
| 3167 | } | ||
| 3168 | return mismatches; | ||
| 3169 | } | ||
| 3170 | |||
| 3012 | } // namespace | 3171 | } // namespace |
| 3013 | 3172 | ||
| 3014 | int main() { | 3173 | int main() { |
| @@ -3016,6 +3175,18 @@ int main() { | |||
| 3016 | const auto status = d.initialize(); | 3175 | const auto status = d.initialize(); |
| 3017 | if (status == vktest::DeviceStatus::unavailable) return 77; | 3176 | if (status == vktest::DeviceStatus::unavailable) return 77; |
| 3018 | if (status == vktest::DeviceStatus::failed) return 1; | 3177 | if (status == vktest::DeviceStatus::failed) return 1; |
| 3178 | { | ||
| 3179 | // The host comparisons (create_host_device, the copies) run on the layer's own adapter, not D3D12's default | ||
| 3180 | // one, which on a PC with two GPUs can be the other GPU (copycmp::layer_adapter). | ||
| 3181 | VkPhysicalDeviceIDProperties id{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES}; | ||
| 3182 | VkPhysicalDeviceProperties2 properties{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, &id}; | ||
| 3183 | d.instance_fn<PFN_vkGetPhysicalDeviceProperties2>("vkGetPhysicalDeviceProperties2")(d.physical, &properties); | ||
| 3184 | if (id.deviceLUIDValid) { | ||
| 3185 | LUID luid{}; | ||
| 3186 | std::memcpy(&luid, id.deviceLUID, sizeof(luid)); | ||
| 3187 | copycmp::layer_adapter() = luid; | ||
| 3188 | } | ||
| 3189 | } | ||
| 3019 | EXPECT(d.depth_format_usable(VK_FORMAT_D32_SFLOAT_S8_UINT)); | 3190 | EXPECT(d.depth_format_usable(VK_FORMAT_D32_SFLOAT_S8_UINT)); |
| 3020 | VkSampleCountFlags depth_sample_counts = 0, color_sample_counts = 0; | 3191 | VkSampleCountFlags depth_sample_counts = 0, color_sample_counts = 0; |
| 3021 | { | 3192 | { |
| @@ -3422,6 +3593,68 @@ int main() { | |||
| 3422 | std::printf("invalid arguments: no host D3D12 device to compare with, skipped\n"); | 3593 | std::printf("invalid arguments: no host D3D12 device to compare with, skipped\n"); |
| 3423 | EXPECT(argument_mismatches <= 0); | 3594 | EXPECT(argument_mismatches <= 0); |
| 3424 | 3595 | ||
| 3596 | // D3D-236: CreateCommandQueue with D3D12_COMMAND_QUEUE_PRIORITY_GLOBAL_REALTIME requires | ||
| 3597 | // SeIncreaseBasePriorityPrivilege enabled in the token, matching the Windows D3D12 runtime. | ||
| 3598 | { | ||
| 3599 | const D3D12_COMMAND_QUEUE_DESC rt_desc{ | ||
| 3600 | D3D12_COMMAND_LIST_TYPE_DIRECT, D3D12_COMMAND_QUEUE_PRIORITY_GLOBAL_REALTIME, | ||
| 3601 | D3D12_COMMAND_QUEUE_FLAG_NONE, 0}; | ||
| 3602 | struct RestoreOverride { | ||
| 3603 | ~RestoreOverride() { rt::d3d12::set_global_realtime_privilege_override_for_test(-1); } | ||
| 3604 | } restore_override; | ||
| 3605 | |||
| 3606 | rt::d3d12::set_global_realtime_privilege_override_for_test(0); | ||
| 3607 | EXPECT(!rt::d3d12::has_global_realtime_privilege()); | ||
| 3608 | Ref<ID3D12CommandQueue> denied_q; | ||
| 3609 | EXPECT(device->CreateCommandQueue(&rt_desc, IID_PPV_ARGS(&denied_q.p)) == DXGI_ERROR_ACCESS_DENIED); | ||
| 3610 | EXPECT(!denied_q.p); | ||
| 3611 | EXPECT(device->CreateCommandQueue(&rt_desc, __uuidof(ID3D12CommandQueue), nullptr) == | ||
| 3612 | DXGI_ERROR_ACCESS_DENIED); | ||
| 3613 | |||
| 3614 | rt::d3d12::set_global_realtime_privilege_override_for_test(1); | ||
| 3615 | EXPECT(rt::d3d12::has_global_realtime_privilege()); | ||
| 3616 | EXPECT(device->CreateCommandQueue(&rt_desc, __uuidof(ID3D12CommandQueue), nullptr) == E_UNEXPECTED); | ||
| 3617 | Ref<ID3D12CommandQueue> granted_q; | ||
| 3618 | EXPECT(SUCCEEDED(device->CreateCommandQueue(&rt_desc, IID_PPV_ARGS(&granted_q.p))) && granted_q.p); | ||
| 3619 | if (granted_q.p) { | ||
| 3620 | EXPECT(granted_q->GetDesc().Priority == D3D12_COMMAND_QUEUE_PRIORITY_GLOBAL_REALTIME); | ||
| 3621 | } | ||
| 3622 | granted_q.reset(); | ||
| 3623 | rt::d3d12::set_global_realtime_privilege_override_for_test(-1); | ||
| 3624 | |||
| 3625 | // When the process token holds SeIncreaseBasePriorityPrivilege (e.g. an elevated session), toggle the | ||
| 3626 | // real token privilege and verify both states against the host D3D12 runtime. | ||
| 3627 | HANDLE token = nullptr; | ||
| 3628 | LUID luid{}; | ||
| 3629 | if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &token)) { | ||
| 3630 | if (LookupPrivilegeValueW(nullptr, L"SeIncreaseBasePriorityPrivilege", &luid)) { | ||
| 3631 | TOKEN_PRIVILEGES tp{}, prev{}; | ||
| 3632 | DWORD prev_len = 0; | ||
| 3633 | tp.PrivilegeCount = 1; | ||
| 3634 | tp.Privileges[0].Luid = luid; | ||
| 3635 | tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; | ||
| 3636 | if (AdjustTokenPrivileges(token, FALSE, &tp, sizeof(prev), &prev, &prev_len) && | ||
| 3637 | GetLastError() == ERROR_SUCCESS) { | ||
| 3638 | EXPECT(rt::d3d12::has_global_realtime_privilege()); | ||
| 3639 | EXPECT(command_queue(device.p, rt_desc) == S_OK); | ||
| 3640 | Ref<ID3D12Device> host; | ||
| 3641 | if (create_host_device(host)) { | ||
| 3642 | EXPECT(command_queue(host.p, rt_desc) == S_OK); | ||
| 3643 | } | ||
| 3644 | tp.Privileges[0].Attributes = 0; | ||
| 3645 | if (AdjustTokenPrivileges(token, FALSE, &tp, 0, nullptr, nullptr) && | ||
| 3646 | GetLastError() == ERROR_SUCCESS) { | ||
| 3647 | EXPECT(!rt::d3d12::has_global_realtime_privilege()); | ||
| 3648 | EXPECT(command_queue(device.p, rt_desc) == DXGI_ERROR_ACCESS_DENIED); | ||
| 3649 | if (host.p) EXPECT(command_queue(host.p, rt_desc) == DXGI_ERROR_ACCESS_DENIED); | ||
| 3650 | } | ||
| 3651 | AdjustTokenPrivileges(token, FALSE, &prev, 0, nullptr, nullptr); | ||
| 3652 | } | ||
| 3653 | } | ||
| 3654 | CloseHandle(token); | ||
| 3655 | } | ||
| 3656 | } | ||
| 3657 | |||
| 3425 | const int depth_quality_mismatches = compare_depth_multisample_quality_levels(device.p, depth_sample_counts); | 3658 | const int depth_quality_mismatches = compare_depth_multisample_quality_levels(device.p, depth_sample_counts); |
| 3426 | if (depth_quality_mismatches < 0) | 3659 | if (depth_quality_mismatches < 0) |
| 3427 | std::printf("Depth/stencil MSAA quality queries: no host D3D12 device to compare with, skipped\n"); | 3660 | std::printf("Depth/stencil MSAA quality queries: no host D3D12 device to compare with, skipped\n"); |
| @@ -4741,6 +4974,44 @@ int main() { | |||
| 4741 | EXPECT(SUCCEEDED(zeroes->Map(0, nullptr, &zero_bytes))); | 4974 | EXPECT(SUCCEEDED(zeroes->Map(0, nullptr, &zero_bytes))); |
| 4742 | report("placed buffer", 0, static_cast<std::uint8_t*>(zero_bytes), std::array<std::uint8_t, 64>{}.data(), 64); | 4975 | report("placed buffer", 0, static_cast<std::uint8_t*>(zero_bytes), std::array<std::uint8_t, 64>{}.data(), 64); |
| 4743 | zeroes->Unmap(0, nullptr); | 4976 | zeroes->Unmap(0, nullptr); |
| 4977 | |||
| 4978 | // Placed buffers carry their console VA in VulkanContext (so VA-resolved commands like WriteBufferImmediate | ||
| 4979 | // find them) and placed readback buffers mark host_readable (so the submission flushes GPU writes to host). | ||
| 4980 | { | ||
| 4981 | D3D12_HEAP_DESC rb_heap_desc{}; | ||
| 4982 | rb_heap_desc.Properties.Type = D3D12_HEAP_TYPE_READBACK; | ||
| 4983 | rb_heap_desc.SizeInBytes = 65536; | ||
| 4984 | rb_heap_desc.Alignment = D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT; | ||
| 4985 | Ref<ID3D12Heap> rb_heap; | ||
| 4986 | Ref<ID3D12Resource> placed_rb; | ||
| 4987 | EXPECT(SUCCEEDED(standalone->CreateHeap(&rb_heap_desc, IID_PPV_ARGS(&rb_heap.p)))); | ||
| 4988 | EXPECT(SUCCEEDED(standalone->CreatePlacedResource(rb_heap.p, 0, &placed_buffer, | ||
| 4989 | D3D12_RESOURCE_STATE_COPY_DEST, nullptr, | ||
| 4990 | IID_PPV_ARGS(&placed_rb.p)))); | ||
| 4991 | Ref<ID3D12GraphicsCommandList2> placed_list2; | ||
| 4992 | EXPECT(SUCCEEDED(placed_list->QueryInterface(IID_PPV_ARGS(&placed_list2.p)))); | ||
| 4993 | EXPECT(SUCCEEDED(placed_allocator->Reset()) && SUCCEEDED(placed_list->Reset(placed_allocator.p, nullptr))); | ||
| 4994 | const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER wp{placed_va + 16, 0xCAFEBABEu}; | ||
| 4995 | const D3D12_WRITEBUFFERIMMEDIATE_MODE wm = D3D12_WRITEBUFFERIMMEDIATE_MODE_DEFAULT; | ||
| 4996 | placed_list2->WriteBufferImmediate(1, &wp, &wm); | ||
| 4997 | D3D12_RESOURCE_BARRIER b{}; | ||
| 4998 | b.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION; | ||
| 4999 | b.Transition = {placed_a.p, D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES, | ||
| 5000 | D3D12_RESOURCE_STATE_COPY_DEST, D3D12_RESOURCE_STATE_COPY_SOURCE}; | ||
| 5001 | placed_list->ResourceBarrier(1, &b); | ||
| 5002 | placed_list->CopyBufferRegion(placed_rb.p, 0, placed_a.p, 0, 64); | ||
| 5003 | EXPECT(SUCCEEDED(placed_list->Close())); | ||
| 5004 | queue->ExecuteCommandLists(1, placed_lists); | ||
| 5005 | EXPECT(rt::d3d12::last_execute_result(queue.p) == leonida::ReplayResult::success); | ||
| 5006 | EXPECT(SUCCEEDED(queue->Signal(fence.p, 7)) && SUCCEEDED(fence->SetEventOnCompletion(7, nullptr))); | ||
| 5007 | void* rb_bytes = nullptr; | ||
| 5008 | EXPECT(SUCCEEDED(placed_rb->Map(0, nullptr, &rb_bytes))); | ||
| 5009 | std::uint32_t word = 0; | ||
| 5010 | std::memcpy(&word, static_cast<const std::uint8_t*>(rb_bytes) + 16, sizeof(word)); | ||
| 5011 | EXPECT(word == 0xCAFEBABEu); | ||
| 5012 | placed_rb->Unmap(0, nullptr); | ||
| 5013 | } | ||
| 5014 | |||
| 4744 | // The heap owns the range: releasing it puts the next heap of that size back at the same place. | 5015 | // The heap owns the range: releasing it puts the next heap of that size back at the same place. |
| 4745 | placed_image.reset(); | 5016 | placed_image.reset(); |
| 4746 | placed_b.reset(); | 5017 | placed_b.reset(); |
| @@ -4762,6 +5033,52 @@ int main() { | |||
| 4762 | upload_heap_desc.Properties.Type = D3D12_HEAP_TYPE_UPLOAD; | 5033 | upload_heap_desc.Properties.Type = D3D12_HEAP_TYPE_UPLOAD; |
| 4763 | EXPECT(SUCCEEDED(standalone->CreateHeap(&upload_heap_desc, IID_PPV_ARGS(&upload_placed_heap.p)))); | 5034 | EXPECT(SUCCEEDED(standalone->CreateHeap(&upload_heap_desc, IID_PPV_ARGS(&upload_placed_heap.p)))); |
| 4764 | 5035 | ||
| 5036 | // D3D-238: heap descriptions the host refuses (RX 5700 and WARP), from CreateHeap and CreateHeap1 alike, and | ||
| 5037 | // their valid neighbours. compare_invalid_arguments and compare_heap_neighbours check them against a host. | ||
| 5038 | { | ||
| 5039 | const D3D12_HEAP_FLAGS deny_all = D3D12_HEAP_FLAG_DENY_BUFFERS | D3D12_HEAP_FLAG_DENY_RT_DS_TEXTURES | | ||
| 5040 | D3D12_HEAP_FLAG_DENY_NON_RT_DS_TEXTURES; | ||
| 5041 | const D3D12_HEAP_DESC refused_heaps[] = { | ||
| 5042 | heap_desc_of(4096), | ||
| 5043 | heap_desc_of(0, {D3D12_HEAP_TYPE_CUSTOM, D3D12_CPU_PAGE_PROPERTY_UNKNOWN, D3D12_MEMORY_POOL_L0}), | ||
| 5044 | heap_desc_of(0, {D3D12_HEAP_TYPE_DEFAULT}, deny_all), | ||
| 5045 | heap_desc_of(0, {D3D12_HEAP_TYPE(0)}), | ||
| 5046 | heap_desc_of(0, {D3D12_HEAP_TYPE_CUSTOM, D3D12_CPU_PAGE_PROPERTY_WRITE_COMBINE, | ||
| 5047 | D3D12_MEMORY_POOL_UNKNOWN}), | ||
| 5048 | heap_desc_of(0, {D3D12_HEAP_TYPE_DEFAULT, D3D12_CPU_PAGE_PROPERTY_WRITE_BACK}), | ||
| 5049 | heap_desc_of(0, {D3D12_HEAP_TYPE_DEFAULT}, D3D12_HEAP_FLAG_NONE, 0), | ||
| 5050 | }; | ||
| 5051 | for (const D3D12_HEAP_DESC& hd : refused_heaps) { | ||
| 5052 | EXPECT(heap_create(standalone.p, hd) == E_INVALIDARG); | ||
| 5053 | EXPECT(heap_create1(standalone.p, hd) == E_INVALIDARG); | ||
| 5054 | } | ||
| 5055 | const D3D12_HEAP_DESC accepted_heaps[] = { | ||
| 5056 | heap_desc_of(0), | ||
| 5057 | heap_desc_of(D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT), | ||
| 5058 | heap_desc_of(D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT, {D3D12_HEAP_TYPE_DEFAULT}, | ||
| 5059 | D3D12_HEAP_FLAG_NONE, D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT), | ||
| 5060 | heap_desc_of(0, {D3D12_HEAP_TYPE_DEFAULT}, D3D12_HEAP_FLAG_NONE, 1000), | ||
| 5061 | heap_desc_of(0, {D3D12_HEAP_TYPE_UPLOAD}), | ||
| 5062 | heap_desc_of(0, {D3D12_HEAP_TYPE_READBACK}), | ||
| 5063 | heap_desc_of(0, {D3D12_HEAP_TYPE_CUSTOM, D3D12_CPU_PAGE_PROPERTY_WRITE_COMBINE, D3D12_MEMORY_POOL_L0}), | ||
| 5064 | heap_desc_of(0, {D3D12_HEAP_TYPE_DEFAULT}, D3D12_HEAP_FLAG_ALLOW_ONLY_BUFFERS), | ||
| 5065 | heap_desc_of(0, {D3D12_HEAP_TYPE_DEFAULT}, | ||
| 5066 | D3D12_HEAP_FLAG_DENY_BUFFERS | D3D12_HEAP_FLAG_DENY_NON_RT_DS_TEXTURES), | ||
| 5067 | }; | ||
| 5068 | for (const D3D12_HEAP_DESC& hd : accepted_heaps) { | ||
| 5069 | EXPECT(heap_create(standalone.p, hd) == S_OK); | ||
| 5070 | EXPECT(heap_create1(standalone.p, hd) == S_OK); | ||
| 5071 | } | ||
| 5072 | Ref<ID3D12Device4> device4; | ||
| 5073 | Ref<ID3D12Heap> unused; | ||
| 5074 | EXPECT(SUCCEEDED(standalone->QueryInterface(IID_PPV_ARGS(&device4.p)))); | ||
| 5075 | EXPECT(device4->CreateHeap1(&placed_heap_desc, nullptr, IID_PPV_ARGS(&unused.p)) == S_OK && unused.p); | ||
| 5076 | const int heap_mismatches = compare_heap_neighbours(standalone.p); | ||
| 5077 | if (heap_mismatches < 0) | ||
| 5078 | std::printf("CreateHeap valid neighbours: no host D3D12 device to compare with, skipped\n"); | ||
| 5079 | EXPECT(heap_mismatches <= 0); | ||
| 5080 | } | ||
| 5081 | |||
| 4765 | auto tiled_2d = [&](UINT w, UINT h, DXGI_FORMAT fmt, UINT16 mips, D3D12_RESOURCE_FLAGS flags, | 5082 | auto tiled_2d = [&](UINT w, UINT h, DXGI_FORMAT fmt, UINT16 mips, D3D12_RESOURCE_FLAGS flags, |
| 4766 | UINT64 align = 0) { | 5083 | UINT64 align = 0) { |
| 4767 | D3D12_RESOURCE_DESC d = texture_desc(w, h, fmt, flags, mips); | 5084 | D3D12_RESOURCE_DESC d = texture_desc(w, h, fmt, flags, mips); |
| @@ -4846,13 +5163,6 @@ int main() { | |||
| 4846 | EXPECT(!fail.p); | 5163 | EXPECT(!fail.p); |
| 4847 | } | 5164 | } |
| 4848 | { | 5165 | { |
| 4849 | const D3D12_RESOURCE_DESC valid_4x = tiled_2d_msaa(4, D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET); | ||
| 4850 | Ref<ID3D12Resource> fail; | ||
| 4851 | EXPECT(standalone->CreatePlacedResource(tiled_heap.p, 0, &valid_4x, D3D12_RESOURCE_STATE_COMMON, nullptr, | ||
| 4852 | IID_PPV_ARGS(&fail.p)) == E_NOTIMPL); | ||
| 4853 | EXPECT(!fail.p); | ||
| 4854 | } | ||
| 4855 | { | ||
| 4856 | Ref<ID3D12Resource> fail; | 5166 | Ref<ID3D12Resource> fail; |
| 4857 | EXPECT(standalone->CreatePlacedResource(upload_placed_heap.p, 0, &tiled_rt_desc, | 5167 | EXPECT(standalone->CreatePlacedResource(upload_placed_heap.p, 0, &tiled_rt_desc, |
| 4858 | D3D12_RESOURCE_STATE_COMMON, nullptr, | 5168 | D3D12_RESOURCE_STATE_COMMON, nullptr, |
| @@ -4900,7 +5210,7 @@ int main() { | |||
| 4900 | ID3D12CommandList* tiled_lists[] = {tiled_list.p}; | 5210 | ID3D12CommandList* tiled_lists[] = {tiled_list.p}; |
| 4901 | queue->ExecuteCommandLists(1, tiled_lists); | 5211 | queue->ExecuteCommandLists(1, tiled_lists); |
| 4902 | EXPECT(rt::d3d12::last_execute_result(queue.p) == leonida::ReplayResult::success); | 5212 | EXPECT(rt::d3d12::last_execute_result(queue.p) == leonida::ReplayResult::success); |
| 4903 | EXPECT(SUCCEEDED(queue->Signal(fence.p, 7)) && SUCCEEDED(fence->SetEventOnCompletion(7, nullptr))); | 5213 | EXPECT(SUCCEEDED(queue->Signal(fence.p, 8)) && SUCCEEDED(fence->SetEventOnCompletion(8, nullptr))); |
| 4904 | void* tiled_bytes = nullptr; | 5214 | void* tiled_bytes = nullptr; |
| 4905 | EXPECT(SUCCEEDED(tiled_rb->Map(0, nullptr, &tiled_bytes))); | 5215 | EXPECT(SUCCEEDED(tiled_rb->Map(0, nullptr, &tiled_bytes))); |
| 4906 | const std::uint8_t want_rgba[4] = {64, 128, 191, 255}; | 5216 | const std::uint8_t want_rgba[4] = {64, 128, 191, 255}; |
| @@ -4922,15 +5232,15 @@ int main() { | |||
| 4922 | tiled_3d_desc, | 5232 | tiled_3d_desc, |
| 4923 | }; | 5233 | }; |
| 4924 | for (int idx = 0; idx < int(std::size(host_cases)); ++idx) { | 5234 | for (int idx = 0; idx < int(std::size(host_cases)); ++idx) { |
| 4925 | const D3D12_RESOURCE_DESC& d = host_cases[idx]; | 5235 | const D3D12_RESOURCE_DESC& host_desc = host_cases[idx]; |
| 4926 | if (d.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D && | 5236 | if (host_desc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D && |
| 4927 | host_opts.TiledResourcesTier < D3D12_TILED_RESOURCES_TIER_3) | 5237 | host_opts.TiledResourcesTier < D3D12_TILED_RESOURCES_TIER_3) |
| 4928 | continue; | 5238 | continue; |
| 4929 | Ref<ID3D12Resource> our_r, host_r; | 5239 | Ref<ID3D12Resource> our_r, host_r; |
| 4930 | const HRESULT our_hr = standalone->CreatePlacedResource( | 5240 | const HRESULT our_hr = standalone->CreatePlacedResource( |
| 4931 | tiled_heap.p, 0, &d, D3D12_RESOURCE_STATE_COMMON, nullptr, IID_PPV_ARGS(&our_r.p)); | 5241 | tiled_heap.p, 0, &host_desc, D3D12_RESOURCE_STATE_COMMON, nullptr, IID_PPV_ARGS(&our_r.p)); |
| 4932 | const HRESULT host_hr = host_dev->CreatePlacedResource( | 5242 | const HRESULT host_hr = host_dev->CreatePlacedResource( |
| 4933 | host_heap.p, 0, &d, D3D12_RESOURCE_STATE_COMMON, nullptr, IID_PPV_ARGS(&host_r.p)); | 5243 | host_heap.p, 0, &host_desc, D3D12_RESOURCE_STATE_COMMON, nullptr, IID_PPV_ARGS(&host_r.p)); |
| 4934 | if (FAILED(host_hr)) continue; | 5244 | if (FAILED(host_hr)) continue; |
| 4935 | EXPECT(SUCCEEDED(our_hr)); | 5245 | EXPECT(SUCCEEDED(our_hr)); |
| 4936 | EXPECT(our_r->GetDesc().Layout == host_r->GetDesc().Layout); | 5246 | EXPECT(our_r->GetDesc().Layout == host_r->GetDesc().Layout); |
| @@ -4948,6 +5258,259 @@ int main() { | |||
| 4948 | } | 5258 | } |
| 4949 | } | 5259 | } |
| 4950 | } | 5260 | } |
| 5261 | |||
| 5262 | // D3D-222: multisampled placed textures (UNKNOWN and 4x tiled). | ||
| 5263 | D3D12_HEAP_DESC msaa_heap_desc{}; | ||
| 5264 | msaa_heap_desc.Properties.Type = D3D12_HEAP_TYPE_DEFAULT; | ||
| 5265 | msaa_heap_desc.SizeInBytes = 16 * 1024 * 1024; | ||
| 5266 | msaa_heap_desc.Alignment = D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT; | ||
| 5267 | Ref<ID3D12Heap> msaa_heap; | ||
| 5268 | EXPECT(SUCCEEDED(standalone->CreateHeap(&msaa_heap_desc, IID_PPV_ARGS(&msaa_heap.p)))); | ||
| 5269 | D3D12_HEAP_DESC deny_rt_desc = tiled_heap_desc; | ||
| 5270 | deny_rt_desc.Flags = D3D12_HEAP_FLAG_ALLOW_ONLY_NON_RT_DS_TEXTURES; | ||
| 5271 | Ref<ID3D12Heap> deny_rt_heap; | ||
| 5272 | EXPECT(SUCCEEDED(standalone->CreateHeap(&deny_rt_desc, IID_PPV_ARGS(&deny_rt_heap.p)))); | ||
| 5273 | |||
| 5274 | auto msaa_desc = [&](UINT w, UINT h, UINT samples, UINT64 align, D3D12_TEXTURE_LAYOUT layout, | ||
| 5275 | D3D12_RESOURCE_FLAGS flags, DXGI_FORMAT fmt = DXGI_FORMAT_R8G8B8A8_UNORM, | ||
| 5276 | UINT16 mips = 1) { | ||
| 5277 | D3D12_RESOURCE_DESC d = texture_desc(w, h, fmt, flags, mips); | ||
| 5278 | d.Alignment = align; | ||
| 5279 | d.SampleDesc.Count = samples; | ||
| 5280 | d.Layout = layout; | ||
| 5281 | return d; | ||
| 5282 | }; | ||
| 5283 | const D3D12_RESOURCE_DESC msaa_unk_rt_desc = | ||
| 5284 | msaa_desc(256, 256, 4, 0, D3D12_TEXTURE_LAYOUT_UNKNOWN, D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET); | ||
| 5285 | const D3D12_RESOURCE_DESC msaa_unk_small_desc = msaa_desc( | ||
| 5286 | 256, 256, 4, D3D12_SMALL_MSAA_RESOURCE_PLACEMENT_ALIGNMENT, D3D12_TEXTURE_LAYOUT_UNKNOWN, | ||
| 5287 | D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET); | ||
| 5288 | const D3D12_RESOURCE_DESC msaa_unk_ds_desc = | ||
| 5289 | msaa_desc(256, 256, 4, 0, D3D12_TEXTURE_LAYOUT_UNKNOWN, D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL, | ||
| 5290 | DXGI_FORMAT_D32_FLOAT); | ||
| 5291 | const D3D12_RESOURCE_DESC msaa_tiled_rt_desc = tiled_2d_msaa(4, D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET); | ||
| 5292 | D3D12_RESOURCE_DESC msaa_xbox_rt_desc = msaa_tiled_rt_desc; | ||
| 5293 | msaa_xbox_rt_desc.Layout = static_cast<D3D12_TEXTURE_LAYOUT>(0x101); | ||
| 5294 | |||
| 5295 | Ref<ID3D12Resource> msaa_unk_rt, msaa_unk_small, msaa_unk_ds, msaa_tiled_rt, msaa_xbox_rt, msaa_cast_rt; | ||
| 5296 | EXPECT(SUCCEEDED(standalone->CreatePlacedResource(msaa_heap.p, D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT, | ||
| 5297 | &msaa_unk_rt_desc, D3D12_RESOURCE_STATE_COMMON, nullptr, | ||
| 5298 | IID_PPV_ARGS(&msaa_unk_rt.p)))); | ||
| 5299 | EXPECT(msaa_unk_rt->GetGPUVirtualAddress() == 0); | ||
| 5300 | EXPECT(msaa_unk_rt->GetDesc().Alignment == D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT); | ||
| 5301 | EXPECT(msaa_unk_rt->GetDesc().SampleDesc.Count == 4); | ||
| 5302 | EXPECT(SUCCEEDED(standalone->CreatePlacedResource(tiled_heap.p, 65536, &msaa_unk_small_desc, | ||
| 5303 | D3D12_RESOURCE_STATE_COMMON, nullptr, | ||
| 5304 | IID_PPV_ARGS(&msaa_unk_small.p)))); | ||
| 5305 | EXPECT(msaa_unk_small->GetDesc().Alignment == D3D12_SMALL_MSAA_RESOURCE_PLACEMENT_ALIGNMENT); | ||
| 5306 | EXPECT(SUCCEEDED(standalone->CreatePlacedResource(msaa_heap.p, 8 * 1024 * 1024, &msaa_unk_ds_desc, | ||
| 5307 | D3D12_RESOURCE_STATE_COMMON, nullptr, | ||
| 5308 | IID_PPV_ARGS(&msaa_unk_ds.p)))); | ||
| 5309 | EXPECT(SUCCEEDED(standalone->CreatePlacedResource(tiled_heap.p, 65536, &msaa_tiled_rt_desc, | ||
| 5310 | D3D12_RESOURCE_STATE_COMMON, nullptr, | ||
| 5311 | IID_PPV_ARGS(&msaa_tiled_rt.p)))); | ||
| 5312 | EXPECT(msaa_tiled_rt->GetDesc().Alignment == D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT); | ||
| 5313 | UINT msaa_tiles = 0; | ||
| 5314 | D3D12_TILE_SHAPE msaa_shape{}; | ||
| 5315 | standalone->GetResourceTiling(msaa_tiled_rt.p, &msaa_tiles, nullptr, &msaa_shape, nullptr, 0, nullptr); | ||
| 5316 | EXPECT(msaa_tiles == 16 && msaa_shape.WidthInTexels == 64 && msaa_shape.HeightInTexels == 64); | ||
| 5317 | EXPECT(SUCCEEDED(standalone->CreatePlacedResource(tiled_heap.p, 65536, &msaa_xbox_rt_desc, | ||
| 5318 | D3D12_RESOURCE_STATE_COMMON, nullptr, | ||
| 5319 | IID_PPV_ARGS(&msaa_xbox_rt.p)))); | ||
| 5320 | EXPECT(msaa_xbox_rt->GetDesc().Alignment == D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT); | ||
| 5321 | EXPECT(static_cast<UINT>(msaa_xbox_rt->GetDesc().Layout) == 0x101); | ||
| 5322 | |||
| 5323 | { | ||
| 5324 | Ref<ID3D12Device10> standalone10; | ||
| 5325 | EXPECT(SUCCEEDED(standalone->QueryInterface(IID_PPV_ARGS(&standalone10.p)))); | ||
| 5326 | D3D12_RESOURCE_DESC1 cast_msaa{}; | ||
| 5327 | cast_msaa.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D; | ||
| 5328 | cast_msaa.Width = 64; | ||
| 5329 | cast_msaa.Height = 64; | ||
| 5330 | cast_msaa.DepthOrArraySize = 1; | ||
| 5331 | cast_msaa.MipLevels = 1; | ||
| 5332 | cast_msaa.Format = DXGI_FORMAT_R8G8B8A8_TYPELESS; | ||
| 5333 | cast_msaa.SampleDesc.Count = 4; | ||
| 5334 | cast_msaa.Flags = D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET; | ||
| 5335 | const DXGI_FORMAT cast_list[] = {DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB}; | ||
| 5336 | EXPECT(SUCCEEDED(standalone10->CreatePlacedResource2( | ||
| 5337 | msaa_heap.p, 0, &cast_msaa, D3D12_BARRIER_LAYOUT_COMMON, nullptr, 2, cast_list, | ||
| 5338 | IID_PPV_ARGS(&msaa_cast_rt.p)))); | ||
| 5339 | } | ||
| 5340 | |||
| 5341 | // Refusals matching host D3D12 for MSAA placed resources. | ||
| 5342 | { | ||
| 5343 | struct BadMsaaCase { | ||
| 5344 | ID3D12Heap* heap; | ||
| 5345 | UINT64 offset; | ||
| 5346 | D3D12_RESOURCE_DESC desc; | ||
| 5347 | }; | ||
| 5348 | D3D12_RESOURCE_DESC msaa_3d = | ||
| 5349 | msaa_desc(16, 16, 4, 0, D3D12_TEXTURE_LAYOUT_UNKNOWN, D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET); | ||
| 5350 | msaa_3d.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE3D; | ||
| 5351 | msaa_3d.DepthOrArraySize = 8; | ||
| 5352 | const BadMsaaCase bad_msaa[] = { | ||
| 5353 | // 4 MiB-aligned UNKNOWN MSAA fails on a 64 KiB heap (even at offset 0) and at misaligned offsets. | ||
| 5354 | {tiled_heap.p, 0, msaa_unk_rt_desc}, | ||
| 5355 | {msaa_heap.p, 65536, msaa_unk_rt_desc}, | ||
| 5356 | {msaa_heap.p, msaa_heap_desc.SizeInBytes - 65536, msaa_unk_small_desc}, | ||
| 5357 | {upload_placed_heap.p, 0, msaa_unk_small_desc}, | ||
| 5358 | {deny_rt_heap.p, 0, msaa_unk_small_desc}, | ||
| 5359 | {deny_rt_heap.p, 0, tiled_rt_desc}, | ||
| 5360 | {msaa_heap.p, 0, | ||
| 5361 | msaa_desc(256, 256, 4, 0, D3D12_TEXTURE_LAYOUT_UNKNOWN, D3D12_RESOURCE_FLAG_NONE)}, | ||
| 5362 | {msaa_heap.p, 0, | ||
| 5363 | msaa_desc(256, 256, 4, 0, D3D12_TEXTURE_LAYOUT_UNKNOWN, | ||
| 5364 | D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET | D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL)}, | ||
| 5365 | {msaa_heap.p, 0, | ||
| 5366 | msaa_desc(64, 64, 4, 0, D3D12_TEXTURE_LAYOUT_UNKNOWN, D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET, | ||
| 5367 | DXGI_FORMAT_R8G8B8A8_UNORM, 0)}, | ||
| 5368 | {msaa_heap.p, 0, msaa_3d}, | ||
| 5369 | }; | ||
| 5370 | for (const BadMsaaCase& bad : bad_msaa) { | ||
| 5371 | Ref<ID3D12Resource> fail; | ||
| 5372 | EXPECT(standalone->CreatePlacedResource(bad.heap, bad.offset, &bad.desc, D3D12_RESOURCE_STATE_COMMON, | ||
| 5373 | nullptr, IID_PPV_ARGS(&fail.p)) == E_INVALIDARG); | ||
| 5374 | EXPECT(!fail.p); | ||
| 5375 | } | ||
| 5376 | D3D12_HEAP_DESC only_rt_desc = tiled_heap_desc; | ||
| 5377 | only_rt_desc.Flags = D3D12_HEAP_FLAG_ALLOW_ONLY_RT_DS_TEXTURES; | ||
| 5378 | Ref<ID3D12Heap> only_rt_heap; | ||
| 5379 | EXPECT(SUCCEEDED(standalone->CreateHeap(&only_rt_desc, IID_PPV_ARGS(&only_rt_heap.p)))); | ||
| 5380 | for (const D3D12_RESOURCE_DESC& bad_only_rt : | ||
| 5381 | {texture_desc(64, 64, DXGI_FORMAT_R8G8B8A8_UNORM, D3D12_RESOURCE_FLAG_NONE, 1), | ||
| 5382 | buffer_desc(4096)}) { | ||
| 5383 | Ref<ID3D12Resource> fail; | ||
| 5384 | EXPECT(standalone->CreatePlacedResource(only_rt_heap.p, 0, &bad_only_rt, D3D12_RESOURCE_STATE_COMMON, | ||
| 5385 | nullptr, IID_PPV_ARGS(&fail.p)) == E_INVALIDARG); | ||
| 5386 | EXPECT(!fail.p); | ||
| 5387 | } | ||
| 5388 | } | ||
| 5389 | |||
| 5390 | // Clear placed 4x MSAA RTVs (UNKNOWN + tiled) and DSV, resolve, and read back to verify GPU execution. | ||
| 5391 | { | ||
| 5392 | const D3D12_RESOURCE_DESC resolved_desc = | ||
| 5393 | texture_desc(256, 256, DXGI_FORMAT_R8G8B8A8_UNORM, D3D12_RESOURCE_FLAG_NONE, 1); | ||
| 5394 | Ref<ID3D12Resource> msaa_resolved_unk, msaa_resolved_tiled; | ||
| 5395 | D3D12_HEAP_PROPERTIES def_hp{D3D12_HEAP_TYPE_DEFAULT}; | ||
| 5396 | EXPECT(SUCCEEDED(standalone->CreateCommittedResource(&def_hp, D3D12_HEAP_FLAG_NONE, &resolved_desc, | ||
| 5397 | D3D12_RESOURCE_STATE_RESOLVE_DEST, nullptr, | ||
| 5398 | IID_PPV_ARGS(&msaa_resolved_unk.p)))); | ||
| 5399 | EXPECT(SUCCEEDED(standalone->CreateCommittedResource(&def_hp, D3D12_HEAP_FLAG_NONE, &resolved_desc, | ||
| 5400 | D3D12_RESOURCE_STATE_RESOLVE_DEST, nullptr, | ||
| 5401 | IID_PPV_ARGS(&msaa_resolved_tiled.p)))); | ||
| 5402 | |||
| 5403 | D3D12_DESCRIPTOR_HEAP_DESC msaa_rtv_hd{D3D12_DESCRIPTOR_HEAP_TYPE_RTV, 2, D3D12_DESCRIPTOR_HEAP_FLAG_NONE, 0}; | ||
| 5404 | D3D12_DESCRIPTOR_HEAP_DESC msaa_dsv_hd{D3D12_DESCRIPTOR_HEAP_TYPE_DSV, 1, D3D12_DESCRIPTOR_HEAP_FLAG_NONE, 0}; | ||
| 5405 | Ref<ID3D12DescriptorHeap> msaa_rtv_heap, msaa_dsv_heap; | ||
| 5406 | EXPECT(SUCCEEDED(standalone->CreateDescriptorHeap(&msaa_rtv_hd, IID_PPV_ARGS(&msaa_rtv_heap.p)))); | ||
| 5407 | EXPECT(SUCCEEDED(standalone->CreateDescriptorHeap(&msaa_dsv_hd, IID_PPV_ARGS(&msaa_dsv_heap.p)))); | ||
| 5408 | const UINT rtv_step = standalone->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_RTV); | ||
| 5409 | const D3D12_CPU_DESCRIPTOR_HANDLE rtv0 = msaa_rtv_heap->GetCPUDescriptorHandleForHeapStart(); | ||
| 5410 | const D3D12_CPU_DESCRIPTOR_HANDLE rtv1{rtv0.ptr + rtv_step}; | ||
| 5411 | standalone->CreateRenderTargetView(msaa_unk_rt.p, nullptr, rtv0); | ||
| 5412 | standalone->CreateRenderTargetView(msaa_tiled_rt.p, nullptr, rtv1); | ||
| 5413 | standalone->CreateDepthStencilView(msaa_unk_ds.p, nullptr, msaa_dsv_heap->GetCPUDescriptorHandleForHeapStart()); | ||
| 5414 | |||
| 5415 | EXPECT(SUCCEEDED(tiled_alloc->Reset()) && SUCCEEDED(tiled_list->Reset(tiled_alloc.p, nullptr))); | ||
| 5416 | D3D12_RESOURCE_BARRIER barriers[] = { | ||
| 5417 | transition(msaa_unk_rt.p, D3D12_RESOURCE_STATE_COMMON, D3D12_RESOURCE_STATE_RENDER_TARGET), | ||
| 5418 | transition(msaa_tiled_rt.p, D3D12_RESOURCE_STATE_COMMON, D3D12_RESOURCE_STATE_RENDER_TARGET), | ||
| 5419 | transition(msaa_unk_ds.p, D3D12_RESOURCE_STATE_COMMON, D3D12_RESOURCE_STATE_DEPTH_WRITE), | ||
| 5420 | }; | ||
| 5421 | tiled_list->ResourceBarrier(3, barriers); | ||
| 5422 | tiled_list->ClearRenderTargetView(rtv0, tiled_color, 0, nullptr); | ||
| 5423 | tiled_list->ClearRenderTargetView(rtv1, tiled_color, 0, nullptr); | ||
| 5424 | tiled_list->ClearDepthStencilView(msaa_dsv_heap->GetCPUDescriptorHandleForHeapStart(), | ||
| 5425 | D3D12_CLEAR_FLAG_DEPTH, 0.5f, 0, 0, nullptr); | ||
| 5426 | D3D12_RESOURCE_BARRIER to_resolve[] = { | ||
| 5427 | transition(msaa_unk_rt.p, D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_RESOLVE_SOURCE), | ||
| 5428 | transition(msaa_tiled_rt.p, D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_RESOLVE_SOURCE), | ||
| 5429 | }; | ||
| 5430 | tiled_list->ResourceBarrier(2, to_resolve); | ||
| 5431 | tiled_list->ResolveSubresource(msaa_resolved_unk.p, 0, msaa_unk_rt.p, 0, DXGI_FORMAT_R8G8B8A8_UNORM); | ||
| 5432 | tiled_list->ResolveSubresource(msaa_resolved_tiled.p, 0, msaa_tiled_rt.p, 0, DXGI_FORMAT_R8G8B8A8_UNORM); | ||
| 5433 | D3D12_RESOURCE_BARRIER to_copy[] = { | ||
| 5434 | transition(msaa_resolved_unk.p, D3D12_RESOURCE_STATE_RESOLVE_DEST, D3D12_RESOURCE_STATE_COPY_SOURCE), | ||
| 5435 | transition(msaa_resolved_tiled.p, D3D12_RESOURCE_STATE_RESOLVE_DEST, D3D12_RESOURCE_STATE_COPY_SOURCE), | ||
| 5436 | }; | ||
| 5437 | tiled_list->ResourceBarrier(2, to_copy); | ||
| 5438 | Ref<ID3D12Resource> msaa_rb; | ||
| 5439 | const D3D12_RESOURCE_DESC msaa_rb_desc = buffer_desc(1024); | ||
| 5440 | EXPECT(SUCCEEDED(standalone->CreateCommittedResource(&rb_props, D3D12_HEAP_FLAG_NONE, &msaa_rb_desc, | ||
| 5441 | D3D12_RESOURCE_STATE_COPY_DEST, nullptr, | ||
| 5442 | IID_PPV_ARGS(&msaa_rb.p)))); | ||
| 5443 | D3D12_PLACED_SUBRESOURCE_FOOTPRINT fp_unk{}, fp_tiled{}; | ||
| 5444 | fp_unk.Offset = 0; | ||
| 5445 | fp_unk.Footprint = {DXGI_FORMAT_R8G8B8A8_UNORM, 1, 1, 1, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT}; | ||
| 5446 | fp_tiled = fp_unk; | ||
| 5447 | fp_tiled.Offset = D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT; | ||
| 5448 | const D3D12_TEXTURE_COPY_LOCATION dst_unk = footprint(msaa_rb.p, fp_unk); | ||
| 5449 | const D3D12_TEXTURE_COPY_LOCATION src_unk = subresource(msaa_resolved_unk.p, 0); | ||
| 5450 | const D3D12_TEXTURE_COPY_LOCATION dst_tiled = footprint(msaa_rb.p, fp_tiled); | ||
| 5451 | const D3D12_TEXTURE_COPY_LOCATION src_tiled = subresource(msaa_resolved_tiled.p, 0); | ||
| 5452 | tiled_list->CopyTextureRegion(&dst_unk, 0, 0, 0, &src_unk, &box); | ||
| 5453 | tiled_list->CopyTextureRegion(&dst_tiled, 0, 0, 0, &src_tiled, &box); | ||
| 5454 | EXPECT(SUCCEEDED(tiled_list->Close())); | ||
| 5455 | queue->ExecuteCommandLists(1, tiled_lists); | ||
| 5456 | EXPECT(rt::d3d12::last_execute_result(queue.p) == leonida::ReplayResult::success); | ||
| 5457 | EXPECT(SUCCEEDED(queue->Signal(fence.p, 9)) && SUCCEEDED(fence->SetEventOnCompletion(9, nullptr))); | ||
| 5458 | void* msaa_bytes = nullptr; | ||
| 5459 | EXPECT(SUCCEEDED(msaa_rb->Map(0, nullptr, &msaa_bytes))); | ||
| 5460 | const auto* out_bytes = static_cast<const std::uint8_t*>(msaa_bytes); | ||
| 5461 | report("placed MSAA UNKNOWN RTV resolve", 0, out_bytes, want_rgba, 4); | ||
| 5462 | report("placed MSAA tiled RTV resolve", 0, out_bytes + D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT, want_rgba, 4); | ||
| 5463 | EXPECT(std::memcmp(out_bytes, want_rgba, 4) == 0); | ||
| 5464 | EXPECT(std::memcmp(out_bytes + D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT, want_rgba, 4) == 0); | ||
| 5465 | msaa_rb->Unmap(0, nullptr); | ||
| 5466 | } | ||
| 5467 | |||
| 5468 | // Host parity for MSAA placed acceptance/refusals, layout, alignment, heap flags and tiled 4x shape. | ||
| 5469 | if (host_dev.p) { | ||
| 5470 | Ref<ID3D12Heap> host_heap64, host_heap4m; | ||
| 5471 | if (SUCCEEDED(host_dev->CreateHeap(&tiled_heap_desc, IID_PPV_ARGS(&host_heap64.p))) && | ||
| 5472 | SUCCEEDED(host_dev->CreateHeap(&msaa_heap_desc, IID_PPV_ARGS(&host_heap4m.p)))) { | ||
| 5473 | struct MsaaParityCase { | ||
| 5474 | ID3D12Heap* our_heap; | ||
| 5475 | ID3D12Heap* host_heap; | ||
| 5476 | UINT64 offset; | ||
| 5477 | D3D12_RESOURCE_DESC desc; | ||
| 5478 | }; | ||
| 5479 | const MsaaParityCase parity[] = { | ||
| 5480 | {tiled_heap.p, host_heap64.p, 0, msaa_unk_rt_desc}, | ||
| 5481 | {msaa_heap.p, host_heap4m.p, 65536, msaa_unk_rt_desc}, | ||
| 5482 | {msaa_heap.p, host_heap4m.p, 0, msaa_unk_rt_desc}, | ||
| 5483 | {tiled_heap.p, host_heap64.p, 65536, msaa_unk_small_desc}, | ||
| 5484 | {tiled_heap.p, host_heap64.p, 65536, msaa_tiled_rt_desc}, | ||
| 5485 | }; | ||
| 5486 | for (const MsaaParityCase& mc : parity) { | ||
| 5487 | Ref<ID3D12Resource> our_r, host_r; | ||
| 5488 | const HRESULT our_hr = standalone->CreatePlacedResource( | ||
| 5489 | mc.our_heap, mc.offset, &mc.desc, D3D12_RESOURCE_STATE_COMMON, nullptr, IID_PPV_ARGS(&our_r.p)); | ||
| 5490 | const HRESULT host_hr = host_dev->CreatePlacedResource( | ||
| 5491 | mc.host_heap, mc.offset, &mc.desc, D3D12_RESOURCE_STATE_COMMON, nullptr, IID_PPV_ARGS(&host_r.p)); | ||
| 5492 | EXPECT(SUCCEEDED(our_hr) == SUCCEEDED(host_hr)); | ||
| 5493 | if (FAILED(host_hr)) { | ||
| 5494 | EXPECT(our_hr == host_hr); | ||
| 5495 | continue; | ||
| 5496 | } | ||
| 5497 | EXPECT(our_r->GetDesc().Layout == host_r->GetDesc().Layout); | ||
| 5498 | EXPECT(our_r->GetDesc().Alignment == host_r->GetDesc().Alignment); | ||
| 5499 | EXPECT(our_r->GetDesc().SampleDesc.Count == host_r->GetDesc().SampleDesc.Count); | ||
| 5500 | D3D12_HEAP_PROPERTIES ohp{}, hhp{}; | ||
| 5501 | EXPECT(SUCCEEDED(our_r->GetHeapProperties(&ohp, nullptr)) && | ||
| 5502 | SUCCEEDED(host_r->GetHeapProperties(&hhp, nullptr))); | ||
| 5503 | EXPECT(ohp.Type == hhp.Type); | ||
| 5504 | if (mc.desc.Layout == D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE) { | ||
| 5505 | D3D12_TILE_SHAPE os{}, hs{}; | ||
| 5506 | standalone->GetResourceTiling(our_r.p, nullptr, nullptr, &os, nullptr, 0, nullptr); | ||
| 5507 | host_dev->GetResourceTiling(host_r.p, nullptr, nullptr, &hs, nullptr, 0, nullptr); | ||
| 5508 | EXPECT(os.WidthInTexels == hs.WidthInTexels && os.HeightInTexels == hs.HeightInTexels && | ||
| 5509 | os.DepthInTexels == hs.DepthInTexels); | ||
| 5510 | } | ||
| 5511 | } | ||
| 5512 | } | ||
| 5513 | } | ||
| 4951 | } | 5514 | } |
| 4952 | 5515 | ||
| 4953 | // D3D-90, the placed half of castable formats: CreatePlacedResource2 takes NumCastableFormats exactly as | 5516 | // D3D-90, the placed half of castable formats: CreatePlacedResource2 takes NumCastableFormats exactly as |
| @@ -5179,6 +5742,15 @@ int main() { | |||
| 5179 | EXPECT(words[0] == 0 && words[1] == 0 && words[2] == 0 && words[3] == 0); | 5742 | EXPECT(words[0] == 0 && words[1] == 0 && words[2] == 0 && words[3] == 0); |
| 5180 | } | 5743 | } |
| 5181 | 5744 | ||
| 5745 | // The tolerance host_side applies, pinned here so every GPU checks it: its accept side only runs where the | ||
| 5746 | // host rounds differently (Intel's SRGB clear), so a change to it would otherwise stay green elsewhere. | ||
| 5747 | // One code either side of a near-tie is accepted; two codes, or a code past 0.6 ULP, are not. | ||
| 5748 | EXPECT(within_06_ulp(187, 188, ideal_srgb(0.5) * 255.0) && within_06_ulp(127, 128, 127.5)); | ||
| 5749 | EXPECT(!within_06_ulp(186, 188, ideal_srgb(0.5) * 255.0) && !within_06_ulp(126, 128, 127.5)); | ||
| 5750 | EXPECT(!within_06_ulp(224, 225, ideal_srgb(0.75) * 255.0) && | ||
| 5751 | !within_06_ulp(136, 137, ideal_srgb(0.25) * 255.0)); | ||
| 5752 | EXPECT(!within_06_ulp(254, 255, 255.0)); | ||
| 5753 | |||
| 5182 | // The host PC runtime's bytes and refusals: the default adapter when it can cast, WARP otherwise. | 5754 | // The host PC runtime's bytes and refusals: the default adapter when it can cast, WARP otherwise. |
| 5183 | bool compared = false; | 5755 | bool compared = false; |
| 5184 | const char* source = "no host"; | 5756 | const char* source = "no host"; |
| @@ -5188,33 +5760,44 @@ int main() { | |||
| 5188 | if (!placed_cast_scenario(device10, false, host.data())) return false; | 5760 | if (!placed_cast_scenario(device10, false, host.data())) return false; |
| 5189 | if (!placed_cast_refusals(device10, host_refusals)) return false; | 5761 | if (!placed_cast_refusals(device10, host_refusals)) return false; |
| 5190 | unsigned differences = 0; | 5762 | unsigned differences = 0; |
| 5191 | // D3D12 does not pin float -> UNORM at a tie: the D3D11.3 functional spec (3.2.3.6 FLOAT -> UNORM) | 5763 | // D3D12 does not pin float -> UNORM or float -> SRGB to one code: the D3D11.3 functional spec |
| 5192 | // computes c * (2^n - 1) + 0.5 and drops the fraction, but permits a tolerance of 0.6 ULP on the integer | 5764 | // (3.2.3.6 FLOAT -> UNORM, 3.2.3.8 FLOAT -> SRGB) permits a tolerance of 0.6 ULP on the integer side, so |
| 5193 | // side, so a value exactly halfway between two codes (0.5 * 255 = 127.5) may map to either. WARP and AMD | 5765 | // a value near halfway between two codes may map to either. The plain clear's 0.5 * 255 = 127.5 is a |
| 5194 | // give the upper code; NVIDIA's D3D12 driver and its Vulkan driver the lower (RTX 3080 616.64, RTX 3090 | 5766 | // tie: WARP and AMD give the upper code, NVIDIA's D3D12 driver and its Vulkan driver the lower (RTX 3080 |
| 5195 | // 610.88 and RTX 5070 Laptop 617.42). On the layer's own adapter (same LUID) the comparison stays exact; | 5767 | // 616.64, RTX 3090 610.88 and RTX 5070 Laptop 617.42). The SRGB-cast clear's 0.5 encodes to 187.516: |
| 5196 | // against another adapter or WARP the plain clear accepts either code on a tie channel. | 5768 | // WARP and NVIDIA's Vulkan driver give 188, Intel's Vulkan driver 187 (UHD 770 101.7092), both within |
| 5769 | // 0.6 ULP. On the layer's own adapter (same LUID) the comparison stays exact; against another adapter | ||
| 5770 | // or WARP a byte may differ when both sides are within 0.6 ULP of the ideal value. | ||
| 5197 | const FLOAT clear_value[4] = {0.25f, 0.5f, 0.75f, 1.0f}; // placed_cast_scenario's clear colour | 5771 | const FLOAT clear_value[4] = {0.25f, 0.5f, 0.75f, 1.0f}; // placed_cast_scenario's clear colour |
| 5198 | unsigned tie_bytes_other_way = 0; | 5772 | const auto within_tolerance = [&](std::uint8_t ours_byte, std::uint8_t host_byte, double ideal) { |
| 5773 | return !same_adapter && within_06_ulp(ours_byte, host_byte, ideal); | ||
| 5774 | }; | ||
| 5775 | unsigned plain_within = 0, srgb_within = 0; | ||
| 5199 | for (UINT row = 0; row < 4; ++row) | 5776 | for (UINT row = 0; row < 4; ++row) |
| 5200 | for (UINT i = 0; i < 16; ++i) { | 5777 | for (UINT i = 0; i < 16; ++i) { |
| 5201 | const UINT a = row * 256 + i, b = 1024 + row * 256 + i; | 5778 | const UINT a = row * 256 + i, b = 1024 + row * 256 + i; |
| 5202 | const double scaled = double(clear_value[i % 4]) * 255.0; | 5779 | const double c = clear_value[i % 4]; |
| 5203 | const bool tie = !same_adapter && scaled - std::floor(scaled) == 0.5; | 5780 | const double plain_ideal = c * 255.0; |
| 5204 | if (tie && std::abs(int(ours[b]) - int(host[b])) == 1) { | 5781 | const double srgb_ideal = (i % 4 == 3 ? c : ideal_srgb(c)) * 255.0; // alpha stays linear |
| 5205 | ++tie_bytes_other_way; | 5782 | if (ours[b] != host[b]) { |
| 5206 | } else if (ours[b] != host[b] && differences++ < 8) { | 5783 | if (within_tolerance(ours[b], host[b], plain_ideal)) |
| 5207 | std::fprintf(stderr, "placed plain clear row %u byte %u: ours %02x, host %02x\n", row, i, | 5784 | ++plain_within; |
| 5208 | ours[b], host[b]); | 5785 | else if (differences++ < 8) |
| 5786 | std::fprintf(stderr, "placed plain clear row %u byte %u: ours %02x, host %02x\n", row, i, | ||
| 5787 | ours[b], host[b]); | ||
| 5788 | } | ||
| 5789 | if (ours[a] != host[a]) { | ||
| 5790 | if (within_tolerance(ours[a], host[a], srgb_ideal)) | ||
| 5791 | ++srgb_within; | ||
| 5792 | else if (differences++ < 8) | ||
| 5793 | std::fprintf(stderr, "placed SRGB-cast clear row %u byte %u: ours %02x, host %02x\n", | ||
| 5794 | row, i, ours[a], host[a]); | ||
| 5209 | } | 5795 | } |
| 5210 | if (ours[a] != host[a] && differences++ < 8) | ||
| 5211 | std::fprintf(stderr, "placed SRGB-cast clear row %u byte %u: ours %02x, host %02x\n", row, | ||
| 5212 | i, ours[a], host[a]); | ||
| 5213 | } | 5796 | } |
| 5214 | if (tie_bytes_other_way) | 5797 | if (plain_within || srgb_within) |
| 5215 | std::printf("placed plain clear: the host rounds the exact .5 tie the other way in %u bytes (within " | 5798 | std::printf("placed clears: %u plain and %u SRGB-cast bytes differ from the host by one code, both " |
| 5216 | "the 0.6 ULP tolerance of D3D11.3 spec 3.2.3.6)\n", | 5799 | "within the 0.6 ULP tolerance of D3D11.3 spec 3.2.3.6 and 3.2.3.8\n", |
| 5217 | tie_bytes_other_way); | 5800 | plain_within, srgb_within); |
| 5218 | for (UINT i = 0; i < 3; ++i) | 5801 | for (UINT i = 0; i < 3; ++i) |
| 5219 | if (our_refusals[i] != host_refusals[i]) { | 5802 | if (our_refusals[i] != host_refusals[i]) { |
| 5220 | ++differences; | 5803 | ++differences; |
diff --git a/runtime/test/d3d12_xdxr_rt_test.cpp b/runtime/test/d3d12_xdxr_rt_test.cpp index 9499dbe0d..51f357fc1 100644 --- a/runtime/test/d3d12_xdxr_rt_test.cpp +++ b/runtime/test/d3d12_xdxr_rt_test.cpp | |||
| @@ -2,7 +2,10 @@ | |||
| 2 | // 4.8, src/xdxr_build.h), the layout the game's translated traversal shaders read. A BLAS of two geometries (an | 2 | // 4.8, src/xdxr_build.h), the layout the game's translated traversal shaders read. A BLAS of two geometries (an |
| 3 | // unindexed triangle soup, and an R16-indexed grid with a 16-byte stride and a 3x4 transform) and a TLAS of three | 3 | // unindexed triangle soup, and an R16-indexed grid with a 16-byte stride and a 3x4 transform) and a TLAS of three |
| 4 | // instances are built through the D3D12 API, sized by GetRaytracingAccelerationStructurePrebuildInfo, copied to | 4 | // instances are built through the D3D12 API, sized by GetRaytracingAccelerationStructurePrebuildInfo, copied to |
| 5 | // readback buffers and written to <out dir> as <case>.bin + <case>.json at their console GPU virtual addresses. | 5 | // readback buffers and written to <out dir>; the BLAS is then updated in place (PERFORM_UPDATE) after its soup moves, |
| 6 | // and written again as d3d12_blas_update; then its postbuild COMPACTED_SIZE and a TLAS rebuild's CURRENT_SIZE are | ||
| 7 | // checked against the prebuild sizes, and the BLAS is compacted (CopyRaytracingAccelerationStructure COMPACT) into a | ||
| 8 | // buffer of exactly that size, written as d3d12_blas_compacted as <case>.bin + <case>.json at their console GPU virtual addresses. | ||
| 6 | // `python -I tools/xdxr_bvh.py check-build <out dir>` validates them and traces rays against brute force (ctest: | 9 | // `python -I tools/xdxr_bvh.py check-build <out dir>` validates them and traces rays against brute force (ctest: |
| 7 | // d3d12_xdxr_rt + d3d12_xdxr_rt_check). Exit 77 without a Vulkan device, or with LEONIDA_RT_AS=khr. No game files. | 10 | // d3d12_xdxr_rt + d3d12_xdxr_rt_check). Exit 77 without a Vulkan device, or with LEONIDA_RT_AS=khr. No game files. |
| 8 | #include "../shims/d3d12_com.h" | 11 | #include "../shims/d3d12_com.h" |
| @@ -153,6 +156,7 @@ int main(int argc, char** argv) { | |||
| 153 | 156 | ||
| 154 | D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS blas_inputs{}; | 157 | D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS blas_inputs{}; |
| 155 | blas_inputs.Type = D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL; | 158 | blas_inputs.Type = D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL; |
| 159 | blas_inputs.Flags = D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_ALLOW_UPDATE; // updated below | ||
| 156 | blas_inputs.DescsLayout = D3D12_ELEMENTS_LAYOUT_ARRAY; | 160 | blas_inputs.DescsLayout = D3D12_ELEMENTS_LAYOUT_ARRAY; |
| 157 | blas_inputs.NumDescs = 2; | 161 | blas_inputs.NumDescs = 2; |
| 158 | blas_inputs.pGeometryDescs = geometries; | 162 | blas_inputs.pGeometryDescs = geometries; |
| @@ -239,7 +243,7 @@ int main(int argc, char** argv) { | |||
| 239 | ID3D12CommandList* lists[] = {list.p}; | 243 | ID3D12CommandList* lists[] = {list.p}; |
| 240 | queue->ExecuteCommandLists(1, lists); | 244 | queue->ExecuteCommandLists(1, lists); |
| 241 | if (FAILED(queue->Signal(fence.p, 1))) return fail("Signal"); | 245 | if (FAILED(queue->Signal(fence.p, 1))) return fail("Signal"); |
| 242 | HANDLE event = CreateEventW(nullptr, FALSE, FALSE, nullptr); | 246 | HANDLE event = CreateEventW(nullptr, FALSE, FALSE, nullptr); // reused for the update below |
| 243 | const bool done = event && SUCCEEDED(fence->SetEventOnCompletion(1, event)) && | 247 | const bool done = event && SUCCEEDED(fence->SetEventOnCompletion(1, event)) && |
| 244 | WaitForSingleObject(event, 10000) == WAIT_OBJECT_0; | 248 | WaitForSingleObject(event, 10000) == WAIT_OBJECT_0; |
| 245 | if (event) CloseHandle(event); | 249 | if (event) CloseHandle(event); |
| @@ -258,31 +262,35 @@ int main(int argc, char** argv) { | |||
| 258 | rb->Unmap(0, nullptr); | 262 | rb->Unmap(0, nullptr); |
| 259 | return ok; | 263 | return ok; |
| 260 | }; | 264 | }; |
| 261 | std::string tris = "["; | 265 | // The BLAS's triangles as the reference sees them, for the soup's current positions. |
| 262 | bool first = true; | 266 | auto triangles_json = [&](const std::vector<float>& soup_now) { |
| 263 | auto add_tri = [&](const float v[3][3], int geometry, UINT primitive) { | 267 | std::string tris = "["; |
| 264 | tris += first ? "\n [" : ",\n ["; | 268 | bool first = true; |
| 265 | first = false; | 269 | auto add_tri = [&](const float v[3][3], int geometry, UINT primitive) { |
| 266 | for (int k = 0; k < 3; ++k) | 270 | tris += first ? "\n [" : ",\n ["; |
| 267 | tris += (k ? ", [" : "[") + num(v[k][0]) + ", " + num(v[k][1]) + ", " + num(v[k][2]) + "]"; | 271 | first = false; |
| 268 | tris += ", " + std::to_string(geometry) + ", " + std::to_string(primitive) + "]"; | 272 | for (int k = 0; k < 3; ++k) |
| 269 | }; | 273 | tris += (k ? ", [" : "[") + num(v[k][0]) + ", " + num(v[k][1]) + ", " + num(v[k][2]) + "]"; |
| 270 | for (UINT t = 0; t < soup_tris; ++t) { | 274 | tris += ", " + std::to_string(geometry) + ", " + std::to_string(primitive) + "]"; |
| 271 | float v[3][3]; | 275 | }; |
| 272 | for (int k = 0; k < 9; ++k) v[k / 3][k % 3] = soup[9 * t + k]; | 276 | for (UINT t = 0; t < soup_tris; ++t) { |
| 273 | add_tri(v, 0, t); | 277 | float v[3][3]; |
| 274 | } | 278 | for (int k = 0; k < 9; ++k) v[k / 3][k % 3] = soup_now[9 * t + k]; |
| 275 | for (UINT t = 0; t < indices.size() / 3; ++t) { | 279 | add_tri(v, 0, t); |
| 276 | float v[3][3]; | ||
| 277 | for (int k = 0; k < 3; ++k) { | ||
| 278 | const float* p = &grid[4 * indices[3 * t + k]]; | ||
| 279 | for (int r = 0; r < 3; ++r) | ||
| 280 | v[k][r] = transform[4 * r] * p[0] + transform[4 * r + 1] * p[1] + transform[4 * r + 2] * p[2] + | ||
| 281 | transform[4 * r + 3]; | ||
| 282 | } | 280 | } |
| 283 | add_tri(v, 1, t); | 281 | for (UINT t = 0; t < indices.size() / 3; ++t) { |
| 284 | } | 282 | float v[3][3]; |
| 285 | tris += "]"; | 283 | for (int k = 0; k < 3; ++k) { |
| 284 | const float* p = &grid[4 * indices[3 * t + k]]; | ||
| 285 | for (int r = 0; r < 3; ++r) | ||
| 286 | v[k][r] = transform[4 * r] * p[0] + transform[4 * r + 1] * p[1] + transform[4 * r + 2] * p[2] + | ||
| 287 | transform[4 * r + 3]; | ||
| 288 | } | ||
| 289 | add_tri(v, 1, t); | ||
| 290 | } | ||
| 291 | return tris + "]"; | ||
| 292 | }; | ||
| 293 | const std::string tris = triangles_json(soup); | ||
| 286 | if (!dump(blas_rb.p, blas_info.ResultDataMaxSizeInBytes, "d3d12_blas", | 294 | if (!dump(blas_rb.p, blas_info.ResultDataMaxSizeInBytes, "d3d12_blas", |
| 287 | "{\"kind\": \"blas\", \"address\": " + std::to_string(blas->GetGPUVirtualAddress()) + | 295 | "{\"kind\": \"blas\", \"address\": " + std::to_string(blas->GetGPUVirtualAddress()) + |
| 288 | ", \"triangles\": " + tris + "}\n")) | 296 | ", \"triangles\": " + tris + "}\n")) |
| @@ -298,6 +306,103 @@ int main(int argc, char** argv) { | |||
| 298 | "{\"kind\": \"tlas\", \"address\": " + std::to_string(tlas->GetGPUVirtualAddress()) + | 306 | "{\"kind\": \"tlas\", \"address\": " + std::to_string(tlas->GetGPUVirtualAddress()) + |
| 299 | ", \"bias\": 0, \"blas\": [\"d3d12_blas\"], \"instances\": " + inst + "}\n")) | 307 | ", \"bias\": 0, \"blas\": [\"d3d12_blas\"], \"instances\": " + inst + "}\n")) |
| 300 | return fail("TLAS readback"); | 308 | return fail("TLAS readback"); |
| 309 | |||
| 310 | // ---- PERFORM_UPDATE in place: the soup moves (every vertex), the grid stays; the BLAS is refitted ---- | ||
| 311 | std::vector<float> moved = soup; | ||
| 312 | std::uniform_real_distribution<float> nudge(-1.0f, 1.0f); | ||
| 313 | for (std::size_t v = 0; v < moved.size(); v += 3) { | ||
| 314 | moved[v] = moved[v] * 1.3f + nudge(rng); | ||
| 315 | moved[v + 1] = moved[v + 1] * 0.7f + nudge(rng); | ||
| 316 | moved[v + 2] += nudge(rng); | ||
| 317 | } | ||
| 318 | if (FAILED(upload->Map(0, nullptr, reinterpret_cast<void**>(&mapped)))) return fail("Map upload for the update"); | ||
| 319 | std::memcpy(mapped + (soup_va - upload->GetGPUVirtualAddress()), moved.data(), std::size_t(soup_bytes)); | ||
| 320 | upload->Unmap(0, nullptr); | ||
| 321 | if (FAILED(allocator->Reset()) || FAILED(list->Reset(allocator.p, nullptr))) return fail("Reset for the update"); | ||
| 322 | build.Inputs = blas_inputs; | ||
| 323 | build.Inputs.Flags |= D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_PERFORM_UPDATE; | ||
| 324 | build.DestAccelerationStructureData = blas->GetGPUVirtualAddress(); | ||
| 325 | build.SourceAccelerationStructureData = blas->GetGPUVirtualAddress(); | ||
| 326 | list->BuildRaytracingAccelerationStructure(&build, 0, nullptr); | ||
| 327 | list->ResourceBarrier(1, &barrier); | ||
| 328 | list->CopyBufferRegion(blas_rb.p, 0, blas.p, 0, blas_info.ResultDataMaxSizeInBytes); | ||
| 329 | if (FAILED(hr = list->Close())) return fail("Close (update)", hr); | ||
| 330 | queue->ExecuteCommandLists(1, lists); | ||
| 331 | if (FAILED(queue->Signal(fence.p, 2))) return fail("Signal (update)"); | ||
| 332 | event = CreateEventW(nullptr, FALSE, FALSE, nullptr); | ||
| 333 | const bool updated = event && SUCCEEDED(fence->SetEventOnCompletion(2, event)) && | ||
| 334 | WaitForSingleObject(event, 10000) == WAIT_OBJECT_0; | ||
| 335 | if (event) CloseHandle(event); | ||
| 336 | if (!updated) return fail("the update did not complete"); | ||
| 337 | if (!dump(blas_rb.p, blas_info.ResultDataMaxSizeInBytes, "d3d12_blas_update", | ||
| 338 | "{\"kind\": \"blas\", \"address\": " + std::to_string(blas->GetGPUVirtualAddress()) + | ||
| 339 | ", \"triangles\": " + triangles_json(moved) + "}\n")) | ||
| 340 | return fail("BLAS readback after the update"); | ||
| 341 | |||
| 342 | // ---- postbuild info and compaction: EmitRaytracingAccelerationStructurePostbuildInfo for both structures, a | ||
| 343 | // TLAS rebuild with a CURRENT_SIZE postbuild desc, then COMPACT the BLAS into a buffer of exactly its size ---- | ||
| 344 | auto submit = [&](UINT64 value) { | ||
| 345 | if (FAILED(list->Close())) return false; | ||
| 346 | queue->ExecuteCommandLists(1, lists); | ||
| 347 | if (FAILED(queue->Signal(fence.p, value))) return false; | ||
| 348 | HANDLE e = CreateEventW(nullptr, FALSE, FALSE, nullptr); | ||
| 349 | const bool ok = e && SUCCEEDED(fence->SetEventOnCompletion(value, e)) && | ||
| 350 | WaitForSingleObject(e, 10000) == WAIT_OBJECT_0; | ||
| 351 | if (e) CloseHandle(e); | ||
| 352 | return ok; | ||
| 353 | }; | ||
| 354 | Ref<ID3D12Resource> info, info_rb; | ||
| 355 | if (FAILED(hr = buffer(device.p, D3D12_HEAP_TYPE_DEFAULT, 24, D3D12_RESOURCE_STATE_UNORDERED_ACCESS, uav, info.put())) || | ||
| 356 | FAILED(hr = buffer(device.p, D3D12_HEAP_TYPE_READBACK, 24, D3D12_RESOURCE_STATE_COPY_DEST, | ||
| 357 | D3D12_RESOURCE_FLAG_NONE, info_rb.put()))) | ||
| 358 | return fail("postbuild buffers", hr); | ||
| 359 | if (FAILED(allocator->Reset()) || FAILED(list->Reset(allocator.p, nullptr))) return fail("Reset for postbuild"); | ||
| 360 | D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC compacted_desc{ | ||
| 361 | info->GetGPUVirtualAddress(), D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_COMPACTED_SIZE}; | ||
| 362 | const D3D12_GPU_VIRTUAL_ADDRESS both[2] = {blas->GetGPUVirtualAddress(), tlas->GetGPUVirtualAddress()}; | ||
| 363 | list->EmitRaytracingAccelerationStructurePostbuildInfo(&compacted_desc, 2, both); | ||
| 364 | D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC current_desc{ | ||
| 365 | info->GetGPUVirtualAddress() + 16, D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_CURRENT_SIZE}; | ||
| 366 | build = {}; | ||
| 367 | build.Inputs = tlas_inputs; | ||
| 368 | build.DestAccelerationStructureData = tlas->GetGPUVirtualAddress(); | ||
| 369 | build.ScratchAccelerationStructureData = scratch->GetGPUVirtualAddress(); | ||
| 370 | list->BuildRaytracingAccelerationStructure(&build, 1, ¤t_desc); | ||
| 371 | list->ResourceBarrier(1, &barrier); | ||
| 372 | list->CopyBufferRegion(info_rb.p, 0, info.p, 0, 24); | ||
| 373 | if (!submit(3)) return fail("postbuild submission"); | ||
| 374 | UINT64 sizes[3] = {}; | ||
| 375 | { | ||
| 376 | void* p = nullptr; | ||
| 377 | if (FAILED(info_rb->Map(0, nullptr, &p))) return fail("Map postbuild"); | ||
| 378 | std::memcpy(sizes, p, sizeof sizes); | ||
| 379 | info_rb->Unmap(0, nullptr); | ||
| 380 | } | ||
| 381 | // the builds are exactly their prebuild size, so the compacted size is that size | ||
| 382 | if (sizes[0] != blas_info.ResultDataMaxSizeInBytes || sizes[1] != tlas_info.ResultDataMaxSizeInBytes || | ||
| 383 | sizes[2] != tlas_info.ResultDataMaxSizeInBytes) { | ||
| 384 | std::fprintf(stderr, "postbuild sizes %llu %llu %llu, prebuild %llu %llu\n", | ||
| 385 | static_cast<unsigned long long>(sizes[0]), static_cast<unsigned long long>(sizes[1]), | ||
| 386 | static_cast<unsigned long long>(sizes[2]), | ||
| 387 | static_cast<unsigned long long>(blas_info.ResultDataMaxSizeInBytes), | ||
| 388 | static_cast<unsigned long long>(tlas_info.ResultDataMaxSizeInBytes)); | ||
| 389 | return fail("postbuild sizes"); | ||
| 390 | } | ||
| 391 | Ref<ID3D12Resource> compacted, compacted_rb; | ||
| 392 | if (FAILED(hr = buffer(device.p, D3D12_HEAP_TYPE_DEFAULT, sizes[0], as_state, uav, compacted.put())) || | ||
| 393 | FAILED(hr = buffer(device.p, D3D12_HEAP_TYPE_READBACK, sizes[0], D3D12_RESOURCE_STATE_COPY_DEST, | ||
| 394 | D3D12_RESOURCE_FLAG_NONE, compacted_rb.put()))) | ||
| 395 | return fail("compacted buffers", hr); | ||
| 396 | if (FAILED(allocator->Reset()) || FAILED(list->Reset(allocator.p, nullptr))) return fail("Reset for compaction"); | ||
| 397 | list->CopyRaytracingAccelerationStructure(compacted->GetGPUVirtualAddress(), blas->GetGPUVirtualAddress(), | ||
| 398 | D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_COMPACT); | ||
| 399 | list->ResourceBarrier(1, &barrier); | ||
| 400 | list->CopyBufferRegion(compacted_rb.p, 0, compacted.p, 0, sizes[0]); | ||
| 401 | if (!submit(4)) return fail("compaction submission"); | ||
| 402 | if (!dump(compacted_rb.p, sizes[0], "d3d12_blas_compacted", | ||
| 403 | "{\"kind\": \"blas\", \"address\": " + std::to_string(compacted->GetGPUVirtualAddress()) + | ||
| 404 | ", \"triangles\": " + triangles_json(moved) + "}\n")) | ||
| 405 | return fail("compacted BLAS readback"); | ||
| 301 | std::printf("d3d12_xdxr_rt: BLAS %llu bytes (prebuild %llu), TLAS (prebuild %llu), written to %s\n", | 406 | std::printf("d3d12_xdxr_rt: BLAS %llu bytes (prebuild %llu), TLAS (prebuild %llu), written to %s\n", |
| 302 | static_cast<unsigned long long>(blas_info.ResultDataMaxSizeInBytes), | 407 | static_cast<unsigned long long>(blas_info.ResultDataMaxSizeInBytes), |
| 303 | static_cast<unsigned long long>(blas_info.ResultDataMaxSizeInBytes), | 408 | static_cast<unsigned long long>(blas_info.ResultDataMaxSizeInBytes), |
diff --git a/runtime/test/descriptor_table_test.cpp b/runtime/test/descriptor_table_test.cpp index a24a9c6e2..26fb39083 100644 --- a/runtime/test/descriptor_table_test.cpp +++ b/runtime/test/descriptor_table_test.cpp | |||
| @@ -233,7 +233,7 @@ int test_clear_resets_table() { | |||
| 233 | return 0; | 233 | return 0; |
| 234 | } | 234 | } |
| 235 | 235 | ||
| 236 | int test_erase_and_cluster_compact() { | 236 | int test_erase_and_reinsert() { |
| 237 | DescriptorTable table(16); | 237 | DescriptorTable table(16); |
| 238 | 238 | ||
| 239 | const std::uint32_t k1[8] = {1, 10, 100, 1000, 2, 20, 200, 2000}; | 239 | const std::uint32_t k1[8] = {1, 10, 100, 1000, 2, 20, 200, 2000}; |
| @@ -310,12 +310,12 @@ int test_change_tracking() { | |||
| 310 | EXPECT(!changes.all && changes.slots.size() == 1 && changes.slots.front() == slot); | 310 | EXPECT(!changes.all && changes.slots.size() == 1 && changes.slots.front() == slot); |
| 311 | EXPECT(table.read_slot(slot, read) && read[8] == 43); | 311 | EXPECT(table.read_slot(slot, read) && read[8] == 43); |
| 312 | 312 | ||
| 313 | // Erasing marks the slot it was in and the ones the cluster compaction moved. | 313 | // Erasing marks only the slot it was in: no other entry moves. |
| 314 | EXPECT(table.insert(k2, 7)); | 314 | EXPECT(table.insert(k2, 7)); |
| 315 | table.take_changes(); | 315 | table.take_changes(); |
| 316 | EXPECT(table.erase(k1)); | 316 | EXPECT(table.erase(k1)); |
| 317 | changes = table.take_changes(); | 317 | changes = table.take_changes(); |
| 318 | EXPECT(!changes.all && !changes.slots.empty() && changes.slots.front() == slot); | 318 | EXPECT(!changes.all && changes.slots.size() == 1 && changes.slots.front() == slot); |
| 319 | 319 | ||
| 320 | // Growth changes the mask, so everything re-uploads. | 320 | // Growth changes the mask, so everything re-uploads. |
| 321 | const std::size_t before = table.capacity(); | 321 | const std::size_t before = table.capacity(); |
| @@ -366,6 +366,48 @@ int test_relocation_marks_both_slots() { | |||
| 366 | return 0; | 366 | return 0; |
| 367 | } | 367 | } |
| 368 | 368 | ||
| 369 | // Shaders keep probing the GPU copy of the table while an erase is uploaded without waiting for idle | ||
| 370 | // (BindlessSet::flush_needs_idle), so an erase must leave every other key's slot exactly as it was. | ||
| 371 | int test_erase_moves_no_other_entry() { | ||
| 372 | DescriptorTable table(64); | ||
| 373 | const std::uint32_t slots = std::uint32_t(table.capacity()); | ||
| 374 | // Five keys with one home: they fill five consecutive slots, the cluster the old erase compacted. | ||
| 375 | std::array<DescriptorKey, 5> keys{}; | ||
| 376 | for (std::uint32_t i = 0; i < keys.size(); ++i) { | ||
| 377 | auto& key = keys[i]; | ||
| 378 | key[0] = i + 1; | ||
| 379 | while ((hash_descriptor_key(key) & (slots - 1)) != slots - 2) ++key[7]; // the cluster wraps the end | ||
| 380 | EXPECT(table.insert_or_update(key.data(), 200 + i) == DescriptorTable::InsertResult::added); | ||
| 381 | } | ||
| 382 | table.take_changes(); | ||
| 383 | const auto before = table.build_gpu_buffer(); | ||
| 384 | |||
| 385 | EXPECT(table.erase(keys[1].data())); | ||
| 386 | const DescriptorTable::Changes changes = table.take_changes(); | ||
| 387 | EXPECT(!changes.all && changes.slots.size() == 1); | ||
| 388 | const std::uint32_t hole = changes.slots.front(); | ||
| 389 | const auto after = table.build_gpu_buffer(); | ||
| 390 | for (std::uint32_t s = 0; s < slots; ++s) { | ||
| 391 | const bool same = std::memcmp(&before[1 + s * 10], &after[1 + s * 10], 10 * sizeof(std::uint32_t)) == 0; | ||
| 392 | EXPECT(same == (s != hole)); | ||
| 393 | } | ||
| 394 | for (std::uint32_t w = 0; w < 10; ++w) EXPECT(after[1 + hole * 10 + w] == 0); // an empty slot: a miss | ||
| 395 | for (std::uint32_t i = 0; i < keys.size(); ++i) EXPECT(table.lookup(keys[i]) == (i == 1 ? 0u : 200 + i)); | ||
| 396 | |||
| 397 | // Keys past the hole are still found after more erases, and a new key of the same home reuses the hole. | ||
| 398 | EXPECT(table.erase(keys[0].data())); | ||
| 399 | EXPECT(table.lookup(keys[4]) == 204 && table.lookup(keys[3]) == 203); | ||
| 400 | DescriptorKey extra = keys[0]; | ||
| 401 | extra[0] = 100; | ||
| 402 | while ((hash_descriptor_key(extra) & (slots - 1)) != slots - 2) ++extra[7]; | ||
| 403 | table.take_changes(); | ||
| 404 | EXPECT(table.insert_or_update(extra.data(), 300) == DescriptorTable::InsertResult::added); | ||
| 405 | const DescriptorTable::Changes reuse = table.take_changes(); | ||
| 406 | EXPECT(reuse.slots.size() == 1 && reuse.slots.front() == slots - 2); // the first hole of the probe window | ||
| 407 | EXPECT(table.lookup(extra) == 300 && table.size() == 4); | ||
| 408 | return 0; | ||
| 409 | } | ||
| 410 | |||
| 369 | int main() { | 411 | int main() { |
| 370 | EXPECT(test_fnv1a_hash_matches_contract() == 0); | 412 | EXPECT(test_fnv1a_hash_matches_contract() == 0); |
| 371 | EXPECT(test_ssharp_key_padding() == 0); | 413 | EXPECT(test_ssharp_key_padding() == 0); |
| @@ -376,9 +418,10 @@ int main() { | |||
| 376 | EXPECT(test_gpu_buffer_serialization() == 0); | 418 | EXPECT(test_gpu_buffer_serialization() == 0); |
| 377 | EXPECT(test_change_tracking() == 0); | 419 | EXPECT(test_change_tracking() == 0); |
| 378 | EXPECT(test_relocation_marks_both_slots() == 0); | 420 | EXPECT(test_relocation_marks_both_slots() == 0); |
| 421 | EXPECT(test_erase_moves_no_other_entry() == 0); | ||
| 379 | EXPECT(test_multithreaded_insert_and_lookup() == 0); | 422 | EXPECT(test_multithreaded_insert_and_lookup() == 0); |
| 380 | EXPECT(test_clear_resets_table() == 0); | 423 | EXPECT(test_clear_resets_table() == 0); |
| 381 | EXPECT(test_erase_and_cluster_compact() == 0); | 424 | EXPECT(test_erase_and_reinsert() == 0); |
| 382 | 425 | ||
| 383 | std::printf("descriptor_table_test: all tests passed (0 failures)\n"); | 426 | std::printf("descriptor_table_test: all tests passed (0 failures)\n"); |
| 384 | return 0; | 427 | return 0; |
diff --git a/runtime/test/device_proxy_test.cpp b/runtime/test/device_proxy_test.cpp index e414f155b..70cae9a89 100644 --- a/runtime/test/device_proxy_test.cpp +++ b/runtime/test/device_proxy_test.cpp | |||
| @@ -151,19 +151,19 @@ int main() { | |||
| 151 | unsigned slots = rt::d3d12_xs::device_proxy_slot_count(device.Get()); | 151 | unsigned slots = rt::d3d12_xs::device_proxy_slot_count(device.Get()); |
| 152 | std::printf("proxy forwards %u PC vtable slots (ID3D12Device..Device14 max is 83)\n", slots); | 152 | std::printf("proxy forwards %u PC vtable slots (ID3D12Device..Device14 max is 83)\n", slots); |
| 153 | check(slots >= 44, "proxy forwards at least the base ID3D12Device vtable"); | 153 | check(slots >= 44, "proxy forwards at least the base ID3D12Device vtable"); |
| 154 | check(!rt::d3d12_xs::device_slot_overridden(9), "device slot 9 is forwarded (PC CreateCommandAllocator)"); | 154 | check(rt::d3d12_xs::device_slot_overridden(9), "device slot 9 is CreateCommandAllocator (allocator proxies)"); |
| 155 | check(!rt::d3d12_xs::device_slot_overridden(10), "device slot 10 is forwarded (PC CreateGraphicsPipelineState)"); | 155 | check(!rt::d3d12_xs::device_slot_overridden(10), "device slot 10 is forwarded (PC CreateGraphicsPipelineState)"); |
| 156 | check(rt::d3d12_xs::device_slot_overridden(14), "device slot 14 is the descriptor-heap override"); | 156 | check(rt::d3d12_xs::device_slot_overridden(14), "device slot 14 is the descriptor-heap override"); |
| 157 | check(rt::d3d12_xs::device_slot_overridden(62), "device slot 62 is the compute-PSO override"); | 157 | check(rt::d3d12_xs::device_slot_overridden(62), "device slot 62 is the compute-PSO override"); |
| 158 | check(rt::d3d12_xs::device_slot_overridden(76), "device slot 76 is the resource override"); | 158 | check(rt::d3d12_xs::device_slot_overridden(76), "device slot 76 is the resource override"); |
| 159 | check(rt::d3d12_xs::device_slot_overridden(67), | 159 | check(rt::d3d12_xs::device_slot_overridden(67), |
| 160 | "device slot 67 is refused (console DeserializeComputePipelineStateX, " | 160 | "device slot 67 is the DeserializeComputePipelineStateX override (console native-code compute pipeline, not PC CreateProtectedResourceSession1)"); |
| 161 | "not PC CreateProtectedResourceSession1)"); | ||
| 162 | 161 | ||
| 163 | void** proxy_vtbl = *reinterpret_cast<void***>(device.Get()); | 162 | void** proxy_vtbl = *reinterpret_cast<void***>(device.Get()); |
| 164 | void** real_vtbl = real ? *reinterpret_cast<void***>(real) : nullptr; | 163 | void** real_vtbl = real ? *reinterpret_cast<void***>(real) : nullptr; |
| 165 | check(proxy_vtbl != nullptr && proxy_vtbl[14] != real_vtbl[14], "slot 14 thunk differs from the PC entry"); | 164 | check(proxy_vtbl != nullptr && proxy_vtbl[14] != real_vtbl[14], "slot 14 thunk differs from the PC entry"); |
| 166 | if (slots > 62) check(proxy_vtbl[62] != real_vtbl[62], "slot 62 thunk differs from PC CreateStateObject"); | 165 | if (slots > 62) check(proxy_vtbl[62] != real_vtbl[62], "slot 62 thunk differs from PC CreateStateObject"); |
| 166 | if (slots > 67) check(proxy_vtbl[67] != real_vtbl[67], "slot 67 thunk differs from PC CreateProtectedResourceSession1"); | ||
| 167 | if (slots > 76) check(proxy_vtbl[76] != real_vtbl[76], "slot 76 thunk differs from PC CreateCommittedResource3"); | 167 | if (slots > 76) check(proxy_vtbl[76] != real_vtbl[76], "slot 76 thunk differs from PC CreateCommittedResource3"); |
| 168 | 168 | ||
| 169 | rt::d3d12_xs::reset_device_proxy_stats(); | 169 | rt::d3d12_xs::reset_device_proxy_stats(); |
| @@ -278,6 +278,8 @@ int main() { | |||
| 278 | ComPtr<ID3D12CommandAllocator> allocator; | 278 | ComPtr<ID3D12CommandAllocator> allocator; |
| 279 | hr = device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(allocator.GetAddressOf())); | 279 | hr = device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(allocator.GetAddressOf())); |
| 280 | check(SUCCEEDED(hr) && allocator != nullptr, "device slot 9 forwards CreateCommandAllocator"); | 280 | check(SUCCEEDED(hr) && allocator != nullptr, "device slot 9 forwards CreateCommandAllocator"); |
| 281 | // A PC runtime allocator is not wrapped: the PC runtime's lists could not resolve an allocator proxy. | ||
| 282 | check(!rt::d3d12_xs::is_allocator_proxy(allocator.Get()), "slot 9 hands out the PC allocator unwrapped"); | ||
| 281 | check(rt::d3d12_xs::device_slot_hits(9) == 1, "slot 9 hit counter is 1"); | 283 | check(rt::d3d12_xs::device_slot_hits(9) == 1, "slot 9 hit counter is 1"); |
| 282 | 284 | ||
| 283 | // Slot 76: buffer resource with the measured Xbox layout word 0x101; PC committed resources take ROW_MAJOR. | 285 | // Slot 76: buffer resource with the measured Xbox layout word 0x101; PC committed resources take ROW_MAJOR. |
| @@ -342,6 +344,31 @@ int main() { | |||
| 342 | check(SUCCEEDED(hr) && pso != nullptr, "slot 62 creates a compute PSO via CreateComputePipelineState"); | 344 | check(SUCCEEDED(hr) && pso != nullptr, "slot 62 creates a compute PSO via CreateComputePipelineState"); |
| 343 | check(rt::d3d12_xs::device_slot_hits(62) == 1, "slot 62 hit counter is 1"); | 345 | check(rt::d3d12_xs::device_slot_hits(62) == 1, "slot 62 hit counter is 1"); |
| 344 | check(rt::d3d12_xs::device_slot_first_call_seen(62), "slot 62 first-call flag is set"); | 346 | check(rt::d3d12_xs::device_slot_first_call_seen(62), "slot 62 first-call flag is set"); |
| 347 | |||
| 348 | // Slot 67: Xbox native compute pipeline creation. Maps the console descriptor (+0x00 root signature, | ||
| 349 | // +0x28 kind 6 code blob, +0x30 code size) to D3D12_COMPUTE_PIPELINE_STATE_DESC and calls CreateComputePipelineState. | ||
| 350 | struct XboxNativeComputeDesc { | ||
| 351 | ID3D12RootSignature* root_signature; | ||
| 352 | const void* kind0; | ||
| 353 | std::uint64_t kind0_size; | ||
| 354 | const void* kind1; | ||
| 355 | std::uint64_t kind1_size; | ||
| 356 | const void* kind6; | ||
| 357 | std::uint64_t kind6_size; | ||
| 358 | const void* kind7; | ||
| 359 | std::uint64_t kind7_size; | ||
| 360 | } xbox_desc{}; | ||
| 361 | xbox_desc.root_signature = root_signature.Get(); | ||
| 362 | xbox_desc.kind6 = bytecode->GetBufferPointer(); | ||
| 363 | xbox_desc.kind6_size = bytecode->GetBufferSize(); | ||
| 364 | |||
| 365 | using XboxCreateNativeComputePsoFn = HRESULT(WINAPI*)(void*, const void*, const IID*, void**); | ||
| 366 | auto create_native_pso = reinterpret_cast<XboxCreateNativeComputePsoFn>(proxy_vtbl[67]); | ||
| 367 | ComPtr<ID3D12PipelineState> pso67; | ||
| 368 | hr = create_native_pso(device.Get(), &xbox_desc, &iid_pso, reinterpret_cast<void**>(pso67.GetAddressOf())); | ||
| 369 | check(SUCCEEDED(hr) && pso67 != nullptr, "slot 67 creates a compute PSO via CreateComputePipelineState"); | ||
| 370 | check(rt::d3d12_xs::device_slot_hits(67) == 1, "slot 67 hit counter is 1"); | ||
| 371 | check(rt::d3d12_xs::device_slot_first_call_seen(67), "slot 67 first-call flag is set"); | ||
| 345 | } | 372 | } |
| 346 | 373 | ||
| 347 | // _COM_Outptr_ (d3d12.h): a failed create leaves NULL in the output. WARP accepts invalid heap descriptions, | 374 | // _COM_Outptr_ (d3d12.h): a failed create leaves NULL in the output. WARP accepts invalid heap descriptions, |
| @@ -357,6 +384,14 @@ int main() { | |||
| 357 | D3D12_COMPUTE_PIPELINE_STATE_DESC empty_pso{}; | 384 | D3D12_COMPUTE_PIPELINE_STATE_DESC empty_pso{}; |
| 358 | hr = reinterpret_cast<Slot62Fn>(proxy_vtbl[62])(device.Get(), &empty_pso, 0, 0, nullptr, &proxy_out); | 385 | hr = reinterpret_cast<Slot62Fn>(proxy_vtbl[62])(device.Get(), &empty_pso, 0, 0, nullptr, &proxy_out); |
| 359 | check(FAILED(hr) && proxy_out == nullptr, "slot 62 nulls its output for a null IID"); | 386 | check(FAILED(hr) && proxy_out == nullptr, "slot 62 nulls its output for a null IID"); |
| 387 | using Slot67Fn = HRESULT(WINAPI*)(void*, const void*, const IID*, void**); | ||
| 388 | proxy_out = reinterpret_cast<void*>(0x1111); | ||
| 389 | const IID iid_pso = __uuidof(ID3D12PipelineState); | ||
| 390 | hr = reinterpret_cast<Slot67Fn>(proxy_vtbl[67])(device.Get(), nullptr, &iid_pso, &proxy_out); | ||
| 391 | check(FAILED(hr) && proxy_out == nullptr, "slot 67 nulls its output for a null description"); | ||
| 392 | proxy_out = reinterpret_cast<void*>(0x1111); | ||
| 393 | hr = reinterpret_cast<Slot67Fn>(proxy_vtbl[67])(device.Get(), &root_desc, nullptr, &proxy_out); | ||
| 394 | check(FAILED(hr) && proxy_out == nullptr, "slot 67 nulls its output for a null IID"); | ||
| 360 | using Slot76Fn = HRESULT(WINAPI*)(void*, const D3D12_HEAP_PROPERTIES*, D3D12_HEAP_FLAGS, | 395 | using Slot76Fn = HRESULT(WINAPI*)(void*, const D3D12_HEAP_PROPERTIES*, D3D12_HEAP_FLAGS, |
| 361 | const D3D12_RESOURCE_DESC*, D3D12_RESOURCE_STATES, | 396 | const D3D12_RESOURCE_DESC*, D3D12_RESOURCE_STATES, |
| 362 | const D3D12_CLEAR_VALUE*, const IID*, void**); | 397 | const D3D12_CLEAR_VALUE*, const IID*, void**); |
diff --git a/runtime/test/dxgi_swapchain_test.cpp b/runtime/test/dxgi_swapchain_test.cpp index 3b23b3579..c22397d90 100644 --- a/runtime/test/dxgi_swapchain_test.cpp +++ b/runtime/test/dxgi_swapchain_test.cpp | |||
| @@ -276,6 +276,18 @@ int main() { | |||
| 276 | scd.BufferCount = 2; | 276 | scd.BufferCount = 2; |
| 277 | scd.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD; | 277 | scd.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD; |
| 278 | 278 | ||
| 279 | for (const UINT count : {0u, 1u, DXGI_MAX_SWAP_CHAIN_BUFFERS + 1u}) { | ||
| 280 | DXGI_SWAP_CHAIN_DESC1 invalid = scd; | ||
| 281 | invalid.BufferCount = count; | ||
| 282 | IDXGISwapChain1* rejected = nullptr; | ||
| 283 | const HRESULT hr = factory->CreateSwapChainForHwnd(queue, hwnd, &invalid, nullptr, nullptr, &rejected); | ||
| 284 | if (rejected) { | ||
| 285 | rejected->Release(); | ||
| 286 | return fail("CreateSwapChainForHwnd returned a swapchain for an invalid buffer count"); | ||
| 287 | } | ||
| 288 | if (hr != DXGI_ERROR_INVALID_CALL) return fail("CreateSwapChainForHwnd invalid buffer count HRESULT"); | ||
| 289 | } | ||
| 290 | |||
| 279 | IDXGISwapChain1* sc1 = nullptr; | 291 | IDXGISwapChain1* sc1 = nullptr; |
| 280 | if (FAILED(factory->CreateSwapChainForHwnd(queue, hwnd, &scd, nullptr, nullptr, &sc1)) || !sc1) | 292 | if (FAILED(factory->CreateSwapChainForHwnd(queue, hwnd, &scd, nullptr, nullptr, &sc1)) || !sc1) |
| 281 | return fail("CreateSwapChainForHwnd"); | 293 | return fail("CreateSwapChainForHwnd"); |
| @@ -421,12 +433,34 @@ int main() { | |||
| 421 | return 0; | 433 | return 0; |
| 422 | }; | 434 | }; |
| 423 | 435 | ||
| 436 | // Invalid counts must leave the initial back buffers usable for the first frame. | ||
| 437 | { | ||
| 438 | DXGI_SWAP_CHAIN_DESC1 before_resize{}; | ||
| 439 | if (FAILED(sc->GetDesc1(&before_resize))) return fail("GetDesc1 before invalid resizes"); | ||
| 440 | const std::vector<UINT> node_masks(DXGI_MAX_SWAP_CHAIN_BUFFERS + 1, 1); | ||
| 441 | const std::vector<IUnknown*> present_queues(DXGI_MAX_SWAP_CHAIN_BUFFERS + 1, queue); | ||
| 442 | for (const UINT count : {1u, DXGI_MAX_SWAP_CHAIN_BUFFERS + 1u}) { | ||
| 443 | if (sc->ResizeBuffers(count, 64, 64, DXGI_FORMAT_UNKNOWN, 0) != E_INVALIDARG) | ||
| 444 | return fail("ResizeBuffers invalid buffer count HRESULT"); | ||
| 445 | if (sc->ResizeBuffers1(count, 64, 64, DXGI_FORMAT_UNKNOWN, 0, node_masks.data(), present_queues.data()) != | ||
| 446 | E_INVALIDARG) | ||
| 447 | return fail("ResizeBuffers1 invalid buffer count HRESULT"); | ||
| 448 | } | ||
| 449 | DXGI_SWAP_CHAIN_DESC1 after_resize{}; | ||
| 450 | if (FAILED(sc->GetDesc1(&after_resize)) || after_resize.BufferCount != before_resize.BufferCount || | ||
| 451 | after_resize.Width != before_resize.Width || after_resize.Height != before_resize.Height) | ||
| 452 | return fail("Invalid resize changed swapchain buffers"); | ||
| 453 | } | ||
| 454 | |||
| 424 | // Frame 1: 128x128 clear to (64, 128, 255, 255), read back all 16,384 pixels, Present. | 455 | // Frame 1: 128x128 clear to (64, 128, 255, 255), read back all 16,384 pixels, Present. |
| 425 | const float blue_ish[4] = {64.0f / 255.0f, 128.0f / 255.0f, 1.0f, 1.0f}; | 456 | const float blue_ish[4] = {64.0f / 255.0f, 128.0f / 255.0f, 1.0f, 1.0f}; |
| 426 | if (run_clear_readback_present(128, 128, blue_ish, 64, 128, 255) != 0) return 1; | 457 | if (run_clear_readback_present(128, 128, blue_ish, 64, 128, 255) != 0) return 1; |
| 427 | 458 | ||
| 428 | // Frame 2: ResizeBuffers to explicit 37x19 on the unchanged 128x128 HWND, clear to green, read back all 703 pixels, Present. | 459 | // Frame 2: ResizeBuffers to explicit 37x19 on the unchanged 128x128 HWND, clear to green, read back all 703 pixels, Present. |
| 429 | if (FAILED(sc->ResizeBuffers(2, 37, 19, DXGI_FORMAT_UNKNOWN, 0))) return fail("ResizeBuffers"); | 460 | if (FAILED(sc->ResizeBuffers(2, 37, 19, DXGI_FORMAT_UNKNOWN, 0))) return fail("ResizeBuffers"); |
| 461 | DXGI_SWAP_CHAIN_DESC1 preserved_format{}; | ||
| 462 | if (FAILED(sc->GetDesc1(&preserved_format)) || preserved_format.Format != scd.Format) | ||
| 463 | return fail("ResizeBuffers with DXGI_FORMAT_UNKNOWN changed the format"); | ||
| 430 | const float green[4] = {0.0f, 1.0f, 0.0f, 1.0f}; | 464 | const float green[4] = {0.0f, 1.0f, 0.0f, 1.0f}; |
| 431 | if (run_clear_readback_present(37, 19, green, 0, 255, 0) != 0) return 1; | 465 | if (run_clear_readback_present(37, 19, green, 0, 255, 0) != 0) return 1; |
| 432 | 466 | ||
| @@ -587,9 +621,28 @@ int main() { | |||
| 587 | return fail("GetRotation(nullptr) should return E_INVALIDARG"); | 621 | return fail("GetRotation(nullptr) should return E_INVALIDARG"); |
| 588 | } | 622 | } |
| 589 | 623 | ||
| 590 | // Unsupported swapchain format must fail explicitly instead of silently downgrading to BGRA8. | 624 | constexpr DXGI_FORMAT invalid_formats[] = { |
| 591 | if (sc->ResizeBuffers(2, 37, 19, DXGI_FORMAT_R32_UINT, 0) != DXGI_ERROR_UNSUPPORTED) | 625 | DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_B8G8R8A8_UNORM_SRGB, |
| 592 | return fail("ResizeBuffers should reject unsupported format DXGI_FORMAT_R32_UINT"); | 626 | DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R32_UINT, |
| 627 | }; | ||
| 628 | { | ||
| 629 | DXGI_SWAP_CHAIN_DESC1 before{}, after{}; | ||
| 630 | if (FAILED(sc->GetDesc1(&before))) return fail("GetDesc1 before invalid formats"); | ||
| 631 | const UINT node_masks[2] = {1, 1}; | ||
| 632 | IUnknown* const present_queues[2] = {queue, queue}; | ||
| 633 | for (DXGI_FORMAT format : invalid_formats) { | ||
| 634 | if (sc->ResizeBuffers(2, 64, 64, format, 0) != E_INVALIDARG || | ||
| 635 | sc->ResizeBuffers1(2, 64, 64, format, 0, node_masks, present_queues) != E_INVALIDARG) | ||
| 636 | return fail("ResizeBuffers and ResizeBuffers1 should reject invalid flip-model formats"); | ||
| 637 | } | ||
| 638 | if (FAILED(sc->GetDesc1(&after)) || after.Format != before.Format || after.BufferCount != before.BufferCount || | ||
| 639 | after.Width != before.Width || after.Height != before.Height) | ||
| 640 | return fail("Invalid format changed the existing swapchain"); | ||
| 641 | ID3D12Resource* buffer = nullptr; | ||
| 642 | if (FAILED(sc->GetBuffer(sc->GetCurrentBackBufferIndex(), IID_PPV_ARGS(&buffer))) || !buffer) | ||
| 643 | return fail("GetBuffer after invalid swapchain formats"); | ||
| 644 | buffer->Release(); | ||
| 645 | } | ||
| 593 | 646 | ||
| 594 | // Measured on host DXGI (RTX 5070 and WARP): DXGI_PRESENT_TEST returns S_OK without presenting, so the back | 647 | // Measured on host DXGI (RTX 5070 and WARP): DXGI_PRESENT_TEST returns S_OK without presenting, so the back |
| 595 | // buffer index and last present count stay; a sync interval above 4 is DXGI_ERROR_INVALID_CALL and presents nothing. | 648 | // buffer index and last present count stay; a sync interval above 4 is DXGI_ERROR_INVALID_CALL and presents nothing. |
| @@ -747,6 +800,8 @@ int main() { | |||
| 747 | // Zero width or height means the window's client area, in ResizeBuffers (the usual WM_SIZE call) and at | 800 | // Zero width or height means the window's client area, in ResizeBuffers (the usual WM_SIZE call) and at |
| 748 | // creation; host DXGI: ResizeBuffers(0, 0, 0) after resizing the window gives the new client size. | 801 | // creation; host DXGI: ResizeBuffers(0, 0, 0) after resizing the window gives the new client size. |
| 749 | { | 802 | { |
| 803 | DXGI_SWAP_CHAIN_DESC1 before_zero{}; | ||
| 804 | if (FAILED(sc->GetDesc1(&before_zero))) return fail("GetDesc1 before zero-count resize"); | ||
| 750 | RECT wr{0, 0, 300, 200}; | 805 | RECT wr{0, 0, 300, 200}; |
| 751 | AdjustWindowRect(&wr, WS_OVERLAPPEDWINDOW, FALSE); | 806 | AdjustWindowRect(&wr, WS_OVERLAPPEDWINDOW, FALSE); |
| 752 | SetWindowPos(hwnd, nullptr, 0, 0, wr.right - wr.left, wr.bottom - wr.top, SWP_NOMOVE | SWP_NOZORDER); | 807 | SetWindowPos(hwnd, nullptr, 0, 0, wr.right - wr.left, wr.bottom - wr.top, SWP_NOMOVE | SWP_NOZORDER); |
| @@ -754,7 +809,8 @@ int main() { | |||
| 754 | GetClientRect(hwnd, &cr); | 809 | GetClientRect(hwnd, &cr); |
| 755 | if (FAILED(sc->ResizeBuffers(0, 0, 0, DXGI_FORMAT_UNKNOWN, 0))) return fail("ResizeBuffers(0, 0, 0)"); | 810 | if (FAILED(sc->ResizeBuffers(0, 0, 0, DXGI_FORMAT_UNKNOWN, 0))) return fail("ResizeBuffers(0, 0, 0)"); |
| 756 | DXGI_SWAP_CHAIN_DESC1 d{}; | 811 | DXGI_SWAP_CHAIN_DESC1 d{}; |
| 757 | sc->GetDesc1(&d); | 812 | if (FAILED(sc->GetDesc1(&d)) || d.BufferCount != before_zero.BufferCount) |
| 813 | return fail("ResizeBuffers(0, 0, 0) changed the buffer count"); | ||
| 758 | if (d.Width != UINT(cr.right) || d.Height != UINT(cr.bottom)) { | 814 | if (d.Width != UINT(cr.right) || d.Height != UINT(cr.bottom)) { |
| 759 | std::fprintf(stderr, "FAIL: ResizeBuffers(0, 0, 0) gave %ux%u, client area is %ldx%ld\n", d.Width, d.Height, | 815 | std::fprintf(stderr, "FAIL: ResizeBuffers(0, 0, 0) gave %ux%u, client area is %ldx%ld\n", d.Width, d.Height, |
| 760 | cr.right, cr.bottom); | 816 | cr.right, cr.bottom); |
| @@ -764,6 +820,21 @@ int main() { | |||
| 764 | HWND hwnd2 = create_test_window(200, 150); | 820 | HWND hwnd2 = create_test_window(200, 150); |
| 765 | if (!hwnd2) return fail("CreateWindowExW (second)"); | 821 | if (!hwnd2) return fail("CreateWindowExW (second)"); |
| 766 | GetClientRect(hwnd2, &cr); | 822 | GetClientRect(hwnd2, &cr); |
| 823 | const auto rejects_creation_format = [&](DXGI_FORMAT format) { | ||
| 824 | DXGI_SWAP_CHAIN_DESC1 invalid = scd; | ||
| 825 | invalid.Format = format; | ||
| 826 | IDXGISwapChain1* rejected = nullptr; | ||
| 827 | const HRESULT hr = factory->CreateSwapChainForHwnd(queue, hwnd2, &invalid, nullptr, nullptr, &rejected); | ||
| 828 | if (rejected) { | ||
| 829 | rejected->Release(); | ||
| 830 | return false; | ||
| 831 | } | ||
| 832 | return hr == DXGI_ERROR_INVALID_CALL; | ||
| 833 | }; | ||
| 834 | if (!rejects_creation_format(DXGI_FORMAT_UNKNOWN)) | ||
| 835 | return fail("CreateSwapChainForHwnd accepted DXGI_FORMAT_UNKNOWN"); | ||
| 836 | for (DXGI_FORMAT format : invalid_formats) | ||
| 837 | if (!rejects_creation_format(format)) return fail("CreateSwapChainForHwnd invalid flip-model format"); | ||
| 767 | DXGI_SWAP_CHAIN_DESC1 zd = scd; | 838 | DXGI_SWAP_CHAIN_DESC1 zd = scd; |
| 768 | zd.Width = 0; | 839 | zd.Width = 0; |
| 769 | zd.Height = 0; | 840 | zd.Height = 0; |
| @@ -794,11 +865,31 @@ int main() { | |||
| 794 | return fail("CheckFeatureSupport should reject null data or wrong size with E_INVALIDARG"); | 865 | return fail("CheckFeatureSupport should reject null data or wrong size with E_INVALIDARG"); |
| 795 | factory5->Release(); | 866 | factory5->Release(); |
| 796 | 867 | ||
| 868 | constexpr UINT tearing_flag = DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING; | ||
| 869 | constexpr UINT waitable_flag = DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT; | ||
| 870 | constexpr UINT both_flags = tearing_flag | waitable_flag; | ||
| 871 | const UINT node_masks[2] = {1, 1}; | ||
| 872 | IUnknown* const present_queues[2] = {queue, queue}; | ||
| 873 | const auto rejects_flag_change = [&](IDXGISwapChain3* chain, UINT flags) { | ||
| 874 | DXGI_SWAP_CHAIN_DESC1 before{}, after{}; | ||
| 875 | if (FAILED(chain->GetDesc1(&before))) return false; | ||
| 876 | const UINT width = before.Width + 1; | ||
| 877 | return chain->ResizeBuffers(0, width, before.Height, DXGI_FORMAT_UNKNOWN, flags) == E_INVALIDARG && | ||
| 878 | chain->ResizeBuffers1(2, width, before.Height, DXGI_FORMAT_UNKNOWN, flags, | ||
| 879 | node_masks, present_queues) == E_INVALIDARG && | ||
| 880 | SUCCEEDED(chain->GetDesc1(&after)) && after.Flags == before.Flags && | ||
| 881 | after.BufferCount == before.BufferCount && after.Width == before.Width && | ||
| 882 | after.Height == before.Height; | ||
| 883 | }; | ||
| 884 | |||
| 797 | // Non-waitable, non-tearing swapchain: GetFrameLatencyWaitableObject is null and ALLOW_TEARING is rejected. | 885 | // Non-waitable, non-tearing swapchain: GetFrameLatencyWaitableObject is null and ALLOW_TEARING is rejected. |
| 886 | for (UINT flags : {waitable_flag, tearing_flag, both_flags}) | ||
| 887 | if (!rejects_flag_change(sc, flags)) return fail("Resize accepted adding a creation-only flag"); | ||
| 798 | if (sc->GetFrameLatencyWaitableObject() != nullptr) | 888 | if (sc->GetFrameLatencyWaitableObject() != nullptr) |
| 799 | return fail("Non-waitable swapchain should return nullptr from GetFrameLatencyWaitableObject"); | 889 | return fail("Non-waitable swapchain should return nullptr from GetFrameLatencyWaitableObject"); |
| 800 | if (sc->Present(0, DXGI_PRESENT_ALLOW_TEARING) != DXGI_ERROR_INVALID_CALL) | 890 | if (sc->Present(0, DXGI_PRESENT_ALLOW_TEARING) != DXGI_ERROR_INVALID_CALL) |
| 801 | return fail("Present(ALLOW_TEARING) on non-tearing swapchain should return DXGI_ERROR_INVALID_CALL"); | 891 | return fail("Present(ALLOW_TEARING) on non-tearing swapchain should return DXGI_ERROR_INVALID_CALL"); |
| 892 | if (FAILED(sc->Present(0, 0))) return fail("Present after rejected resize on a plain swapchain"); | ||
| 802 | 893 | ||
| 803 | HWND hwnd3 = create_test_window(128, 96); | 894 | HWND hwnd3 = create_test_window(128, 96); |
| 804 | if (!hwnd3) return fail("CreateWindowExW (third)"); | 895 | if (!hwnd3) return fail("CreateWindowExW (third)"); |
| @@ -806,7 +897,7 @@ int main() { | |||
| 806 | wdesc.Width = 128; | 897 | wdesc.Width = 128; |
| 807 | wdesc.Height = 96; | 898 | wdesc.Height = 96; |
| 808 | wdesc.Format = DXGI_FORMAT_R10G10B10A2_UNORM; // also tests presenting an untouched offscreen backbuffer | 899 | wdesc.Format = DXGI_FORMAT_R10G10B10A2_UNORM; // also tests presenting an untouched offscreen backbuffer |
| 809 | wdesc.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING | DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT; | 900 | wdesc.Flags = both_flags; |
| 810 | IDXGISwapChain1* wsc1 = nullptr; | 901 | IDXGISwapChain1* wsc1 = nullptr; |
| 811 | if (FAILED(factory->CreateSwapChainForHwnd(queue, hwnd3, &wdesc, nullptr, nullptr, &wsc1)) || !wsc1) | 902 | if (FAILED(factory->CreateSwapChainForHwnd(queue, hwnd3, &wdesc, nullptr, nullptr, &wsc1)) || !wsc1) |
| 812 | return fail("CreateSwapChainForHwnd (tearing + waitable)"); | 903 | return fail("CreateSwapChainForHwnd (tearing + waitable)"); |
| @@ -814,6 +905,8 @@ int main() { | |||
| 814 | if (FAILED(wsc1->QueryInterface(IID_PPV_ARGS(&wsc))) || !wsc) return fail("QI IDXGISwapChain3 (waitable)"); | 905 | if (FAILED(wsc1->QueryInterface(IID_PPV_ARGS(&wsc))) || !wsc) return fail("QI IDXGISwapChain3 (waitable)"); |
| 815 | wsc1->Release(); | 906 | wsc1->Release(); |
| 816 | 907 | ||
| 908 | for (UINT flags : {0u, waitable_flag, tearing_flag}) | ||
| 909 | if (!rejects_flag_change(wsc, flags)) return fail("Resize accepted removing a creation-only flag"); | ||
| 817 | DXGI_SWAP_CHAIN_DESC1 got_desc{}; | 910 | DXGI_SWAP_CHAIN_DESC1 got_desc{}; |
| 818 | if (FAILED(wsc->GetDesc1(&got_desc)) || got_desc.Flags != wdesc.Flags) | 911 | if (FAILED(wsc->GetDesc1(&got_desc)) || got_desc.Flags != wdesc.Flags) |
| 819 | return fail("Waitable swapchain GetDesc1 did not preserve Flags"); | 912 | return fail("Waitable swapchain GetDesc1 did not preserve Flags"); |
| @@ -836,11 +929,131 @@ int main() { | |||
| 836 | if (!check_statistics_disjoint(wsc)) return fail("first statistics query after Present should be disjoint"); | 929 | if (!check_statistics_disjoint(wsc)) return fail("first statistics query after Present should be disjoint"); |
| 837 | if (WaitForSingleObject(waitable, 5000) != WAIT_OBJECT_0) | 930 | if (WaitForSingleObject(waitable, 5000) != WAIT_OBJECT_0) |
| 838 | return fail("Post-Present WaitForSingleObject on waitable swapchain failed"); | 931 | return fail("Post-Present WaitForSingleObject on waitable swapchain failed"); |
| 932 | if (FAILED(wsc->ResizeBuffers(0, wdesc.Width + 1, wdesc.Height, DXGI_FORMAT_UNKNOWN, both_flags)) || | ||
| 933 | FAILED(wsc->GetDesc1(&got_desc)) || got_desc.Width != wdesc.Width + 1 || got_desc.Flags != both_flags) | ||
| 934 | return fail("ResizeBuffers with matching creation flags failed"); | ||
| 935 | if (FAILED(wsc->Present(0, DXGI_PRESENT_ALLOW_TEARING)) || | ||
| 936 | WaitForSingleObject(waitable, 5000) != WAIT_OBJECT_0) | ||
| 937 | return fail("Present or wait after resizing the waitable swapchain failed"); | ||
| 839 | CloseHandle(waitable); | 938 | CloseHandle(waitable); |
| 840 | wsc->Release(); | 939 | wsc->Release(); |
| 841 | DestroyWindow(hwnd3); | 940 | DestroyWindow(hwnd3); |
| 842 | } | 941 | } |
| 843 | 942 | ||
| 943 | // CreateSwapChainForCoreWindow & Occlusion status registration | ||
| 944 | { | ||
| 945 | // 1. Parameter validation | ||
| 946 | IDXGISwapChain1* sc_dummy = nullptr; | ||
| 947 | if (factory->CreateSwapChainForCoreWindow(queue, nullptr, &scd, nullptr, &sc_dummy) != E_INVALIDARG) | ||
| 948 | return fail("CreateSwapChainForCoreWindow(null window) should return E_INVALIDARG"); | ||
| 949 | if (factory->CreateSwapChainForCoreWindow(nullptr, queue, &scd, nullptr, &sc_dummy) != E_INVALIDARG) | ||
| 950 | return fail("CreateSwapChainForCoreWindow(null device) should return E_INVALIDARG"); | ||
| 951 | if (factory->CreateSwapChainForCoreWindow(queue, queue, nullptr, nullptr, &sc_dummy) != E_INVALIDARG) | ||
| 952 | return fail("CreateSwapChainForCoreWindow(null desc) should return E_INVALIDARG"); | ||
| 953 | if (factory->CreateSwapChainForCoreWindow(queue, queue, &scd, nullptr, nullptr) != E_POINTER) | ||
| 954 | return fail("CreateSwapChainForCoreWindow(null out) should return E_POINTER"); | ||
| 955 | |||
| 956 | // Non-CoreWindow IUnknown | ||
| 957 | if (factory->CreateSwapChainForCoreWindow(queue, queue, &scd, nullptr, &sc_dummy) != DXGI_ERROR_INVALID_CALL) | ||
| 958 | return fail("CreateSwapChainForCoreWindow with non-CoreWindow should return DXGI_ERROR_INVALID_CALL"); | ||
| 959 | |||
| 960 | // 2. Mock ICoreWindow with ICoreWindowInterop | ||
| 961 | static constexpr GUID kIID_ICoreWindowInterop = { | ||
| 962 | 0x45D64A29, 0xA63E, 0x4CB6, {0xB4, 0x98, 0x57, 0x81, 0xD2, 0x98, 0xCB, 0x4F}}; | ||
| 963 | struct MockCoreWindow final : public IUnknown { | ||
| 964 | HWND window_handle = nullptr; | ||
| 965 | std::atomic<ULONG> refs{1}; | ||
| 966 | |||
| 967 | HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** out) override { | ||
| 968 | if (!out) return E_POINTER; | ||
| 969 | if (riid == IID_IUnknown || riid == kIID_ICoreWindowInterop) { | ||
| 970 | *out = this; | ||
| 971 | AddRef(); | ||
| 972 | return S_OK; | ||
| 973 | } | ||
| 974 | *out = nullptr; | ||
| 975 | return E_NOINTERFACE; | ||
| 976 | } | ||
| 977 | ULONG STDMETHODCALLTYPE AddRef() override { return ++refs; } | ||
| 978 | ULONG STDMETHODCALLTYPE Release() override { | ||
| 979 | ULONG r = --refs; | ||
| 980 | if (!r) delete this; | ||
| 981 | return r; | ||
| 982 | } | ||
| 983 | virtual HRESULT STDMETHODCALLTYPE get_WindowHandle(HWND* hwnd) { | ||
| 984 | if (!hwnd) return E_POINTER; | ||
| 985 | *hwnd = window_handle; | ||
| 986 | return S_OK; | ||
| 987 | } | ||
| 988 | virtual HRESULT STDMETHODCALLTYPE put_MessageHandled(unsigned char) { return S_OK; } | ||
| 989 | }; | ||
| 990 | |||
| 991 | auto* mock_cw = new MockCoreWindow(); | ||
| 992 | // Null HWND in interop | ||
| 993 | if (factory->CreateSwapChainForCoreWindow(queue, mock_cw, &scd, nullptr, &sc_dummy) != DXGI_ERROR_INVALID_CALL) { | ||
| 994 | mock_cw->Release(); | ||
| 995 | return fail("CreateSwapChainForCoreWindow with null HWND should return DXGI_ERROR_INVALID_CALL"); | ||
| 996 | } | ||
| 997 | |||
| 998 | // Valid HWND in mock CoreWindow | ||
| 999 | HWND hwnd4 = create_test_window(160, 120); | ||
| 1000 | if (!hwnd4) { | ||
| 1001 | mock_cw->Release(); | ||
| 1002 | return fail("CreateWindowExW (fourth)"); | ||
| 1003 | } | ||
| 1004 | mock_cw->window_handle = hwnd4; | ||
| 1005 | IDXGISwapChain1* cw_sc1 = nullptr; | ||
| 1006 | if (FAILED(factory->CreateSwapChainForCoreWindow(queue, mock_cw, &scd, nullptr, &cw_sc1)) || !cw_sc1) { | ||
| 1007 | mock_cw->Release(); | ||
| 1008 | DestroyWindow(hwnd4); | ||
| 1009 | return fail("CreateSwapChainForCoreWindow with valid MockCoreWindow failed"); | ||
| 1010 | } | ||
| 1011 | IDXGISwapChain3* cw_sc = nullptr; | ||
| 1012 | if (FAILED(cw_sc1->QueryInterface(IID_PPV_ARGS(&cw_sc))) || !cw_sc) { | ||
| 1013 | cw_sc1->Release(); | ||
| 1014 | mock_cw->Release(); | ||
| 1015 | DestroyWindow(hwnd4); | ||
| 1016 | return fail("QI IDXGISwapChain3 on CoreWindow swapchain failed"); | ||
| 1017 | } | ||
| 1018 | cw_sc1->Release(); | ||
| 1019 | DXGI_SWAP_CHAIN_DESC1 cw_desc{}; | ||
| 1020 | if (FAILED(cw_sc->GetDesc1(&cw_desc)) || cw_desc.Width != scd.Width || cw_desc.Height != scd.Height) { | ||
| 1021 | cw_sc->Release(); | ||
| 1022 | mock_cw->Release(); | ||
| 1023 | DestroyWindow(hwnd4); | ||
| 1024 | return fail("GetDesc1 on CoreWindow swapchain mismatch"); | ||
| 1025 | } | ||
| 1026 | if (FAILED(cw_sc->Present(0, 0))) { | ||
| 1027 | cw_sc->Release(); | ||
| 1028 | mock_cw->Release(); | ||
| 1029 | DestroyWindow(hwnd4); | ||
| 1030 | return fail("Present on CoreWindow swapchain failed"); | ||
| 1031 | } | ||
| 1032 | cw_sc->Release(); | ||
| 1033 | mock_cw->Release(); | ||
| 1034 | DestroyWindow(hwnd4); | ||
| 1035 | |||
| 1036 | // 3. Occlusion status registration | ||
| 1037 | DWORD cookie1 = 0, cookie2 = 0; | ||
| 1038 | if (factory->RegisterOcclusionStatusWindow(nullptr, WM_USER, &cookie1) != DXGI_ERROR_INVALID_CALL) | ||
| 1039 | return fail("RegisterOcclusionStatusWindow(null hwnd) should return DXGI_ERROR_INVALID_CALL"); | ||
| 1040 | if (factory->RegisterOcclusionStatusWindow(hwnd, WM_USER, nullptr) != DXGI_ERROR_INVALID_CALL) | ||
| 1041 | return fail("RegisterOcclusionStatusWindow(null cookie) should return DXGI_ERROR_INVALID_CALL"); | ||
| 1042 | if (FAILED(factory->RegisterOcclusionStatusWindow(hwnd, WM_USER, &cookie1)) || cookie1 == 0) | ||
| 1043 | return fail("RegisterOcclusionStatusWindow failed"); | ||
| 1044 | |||
| 1045 | HANDLE ev = CreateEventW(nullptr, FALSE, FALSE, nullptr); | ||
| 1046 | if (factory->RegisterOcclusionStatusEvent(nullptr, &cookie2) != DXGI_ERROR_INVALID_CALL) | ||
| 1047 | return fail("RegisterOcclusionStatusEvent(null event) should return DXGI_ERROR_INVALID_CALL"); | ||
| 1048 | if (factory->RegisterOcclusionStatusEvent(ev, nullptr) != DXGI_ERROR_INVALID_CALL) | ||
| 1049 | return fail("RegisterOcclusionStatusEvent(null cookie) should return DXGI_ERROR_INVALID_CALL"); | ||
| 1050 | if (FAILED(factory->RegisterOcclusionStatusEvent(ev, &cookie2)) || cookie2 == 0 || cookie2 == cookie1) | ||
| 1051 | return fail("RegisterOcclusionStatusEvent failed or duplicated cookie"); | ||
| 1052 | factory->UnregisterOcclusionStatus(cookie1); | ||
| 1053 | factory->UnregisterOcclusionStatus(cookie2); | ||
| 1054 | CloseHandle(ev); | ||
| 1055 | } | ||
| 1056 | |||
| 844 | rtv_heap->Release(); | 1057 | rtv_heap->Release(); |
| 845 | sc->Release(); | 1058 | sc->Release(); |
| 846 | fence->Release(); | 1059 | fence->Release(); |
| @@ -860,7 +1073,7 @@ int main() { | |||
| 860 | return 1; | 1073 | return 1; |
| 861 | } | 1074 | } |
| 862 | std::printf("device: %s (validation %s)\n", chosen.deviceName, val_active ? "on" : "off"); | 1075 | std::printf("device: %s (validation %s)\n", chosen.deviceName, val_active ? "on" : "off"); |
| 863 | std::printf("dxgi_swapchain_test: PASS (CreateSwapChainForHwnd, GetBuffer+GetDesc, clear+readback, Present, " | 1076 | std::printf("dxgi_swapchain_test: PASS (CreateSwapChainForHwnd, CreateSwapChainForCoreWindow, occlusion status, " |
| 864 | "ResizeBuffers; 0 validation errors)\n"); | 1077 | "GetBuffer+GetDesc, clear+readback, Present, ResizeBuffers; 0 validation errors)\n"); |
| 865 | return 0; | 1078 | return 0; |
| 866 | } | 1079 | } |
diff --git a/runtime/test/file_system_test.cpp b/runtime/test/file_system_test.cpp index c33098d2a..1fcaf6710 100644 --- a/runtime/test/file_system_test.cpp +++ b/runtime/test/file_system_test.cpp | |||
| @@ -99,7 +99,7 @@ int main() { | |||
| 99 | write_path(package / "data" / "hello.txt", "package"); | 99 | write_path(package / "data" / "hello.txt", "package"); |
| 100 | write_path(package / "data" / "dup.txt", "package"); | 100 | write_path(package / "data" / "dup.txt", "package"); |
| 101 | write_path(package / "data" / "bye.txt", "package"); | 101 | write_path(package / "data" / "bye.txt", "package"); |
| 102 | std::filesystem::create_directories(package / "data" / "sub"); | 102 | write_path(package / "data" / "sub" / "nested.txt", "nested"); |
| 103 | 103 | ||
| 104 | rt::fs::configure(package, overlay); | 104 | rt::fs::configure(package, overlay); |
| 105 | check(rt::fs::game_dir() == package, "configure() sets the game folder"); | 105 | check(rt::fs::game_dir() == package, "configure() sets the game folder"); |
| @@ -249,6 +249,15 @@ int main() { | |||
| 249 | SetLastError(0); | 249 | SetLastError(0); |
| 250 | check(delete_w(L"GAME:\\nope\\missing.txt") == FALSE && GetLastError() == ERROR_FILE_NOT_FOUND, | 250 | check(delete_w(L"GAME:\\nope\\missing.txt") == FALSE && GetLastError() == ERROR_FILE_NOT_FOUND, |
| 251 | "deleting a file that never existed reports ERROR_FILE_NOT_FOUND"); | 251 | "deleting a file that never existed reports ERROR_FILE_NOT_FOUND"); |
| 252 | |||
| 253 | // Deleting a nested package file creates parent directories inside .gta6rt-deleted/; those marker parent | ||
| 254 | // directories must not hide the corresponding ancestor directories in the package. | ||
| 255 | check(delete_w(L"GAME:\\data\\sub\\nested.txt") != FALSE, "DeleteFileW accepts a nested package file"); | ||
| 256 | const DWORD sub_attrs = attributes_w(L"GAME:\\data\\sub"); | ||
| 257 | check(sub_attrs != INVALID_FILE_ATTRIBUTES && (sub_attrs & FILE_ATTRIBUTE_DIRECTORY) != 0, | ||
| 258 | "deleting a nested package file does not hide its parent folder"); | ||
| 259 | check(contains(list(first_w, next_w, find_close, L"GAME:\\data\\*"), L"sub"), | ||
| 260 | "the parent folder stays listed after deleting a nested package file"); | ||
| 252 | } | 261 | } |
| 253 | 262 | ||
| 254 | // Nothing leaves the package and the overlay. | 263 | // Nothing leaves the package and the overlay. |
diff --git a/runtime/test/fixtures/tiny_gdk_load.cpp b/runtime/test/fixtures/tiny_gdk_load.cpp index 780b10edb..291d3a5d7 100644 --- a/runtime/test/fixtures/tiny_gdk_load.cpp +++ b/runtime/test/fixtures/tiny_gdk_load.cpp | |||
| @@ -51,10 +51,27 @@ int main() { | |||
| 51 | HRESULT hr = init(0, 0, 0x02, &options); | 51 | HRESULT hr = init(0, 0, 0x02, &options); |
| 52 | if (hr != S_OK) return fail("InitializeApiImplEx2", static_cast<unsigned long>(hr)); | 52 | if (hr != S_OK) return fail("InitializeApiImplEx2", static_cast<unsigned long>(hr)); |
| 53 | 53 | ||
| 54 | // XThreadingImpl, the first class XCurl.dll references (docs/runtime_imports.md); not provided offline yet. | 54 | // XThreadingImpl, the first class XCurl.dll references (docs/runtime_imports.md), used as its thunks do: the |
| 55 | // class id as both ids, a slot with `this` first, then Release (slot 2). Slot 12 is XTaskQueueCreate, 17 | ||
| 56 | // XTaskQueueCloseHandle. | ||
| 55 | const GUID threading = {0x073b7dcb, 0x1fcf, 0x4030, {0x94, 0xbe, 0xe3, 0xc9, 0xeb, 0x62, 0x34, 0x28}}; | 57 | const GUID threading = {0x073b7dcb, 0x1fcf, 0x4030, {0x94, 0xbe, 0xe3, 0xc9, 0xeb, 0x62, 0x34, 0x28}}; |
| 58 | void* obj = nullptr; | ||
| 59 | hr = query(&threading, threading, &obj); | ||
| 60 | if (hr != S_OK || !obj) return fail("QueryApiImpl hands out XThreadingImpl", static_cast<unsigned long>(hr)); | ||
| 61 | void* const* vtable = *static_cast<void* const* const*>(obj); | ||
| 62 | using Create = HRESULT(STDMETHODCALLTYPE*)(void*, UINT32, UINT32, void**); | ||
| 63 | using Close = void(STDMETHODCALLTYPE*)(void*, void*); | ||
| 64 | using Release = ULONG(STDMETHODCALLTYPE*)(void*); | ||
| 65 | void* queue = nullptr; | ||
| 66 | hr = reinterpret_cast<Create>(vtable[12])(obj, 0, 0, &queue); // XTaskQueueDispatchMode::Manual twice | ||
| 67 | if (hr != S_OK || !queue) return fail("XThreadingImpl slot 12 (XTaskQueueCreate)", static_cast<unsigned long>(hr)); | ||
| 68 | reinterpret_cast<Close>(vtable[17])(obj, queue); | ||
| 69 | reinterpret_cast<Release>(vtable[2])(obj); | ||
| 70 | |||
| 71 | // A class not served yet (XNetworkingImpl) is refused, with the out pointer cleared. | ||
| 72 | const GUID networking = {0x37e56907, 0x2f10, 0x41e8, {0xb7, 0x2f, 0x36, 0xed, 0xb1, 0x85, 0x33, 0x1a}}; | ||
| 56 | void* out = reinterpret_cast<void*>(1); | 73 | void* out = reinterpret_cast<void*>(1); |
| 57 | hr = query(&threading, threading, &out); | 74 | hr = query(&networking, networking, &out); |
| 58 | if (hr != static_cast<HRESULT>(0x80070032) || out != nullptr) | 75 | if (hr != static_cast<HRESULT>(0x80070032) || out != nullptr) |
| 59 | return fail("QueryApiImpl refuses an unprovided class and clears its out pointer", static_cast<unsigned long>(hr)); | 76 | return fail("QueryApiImpl refuses an unprovided class and clears its out pointer", static_cast<unsigned long>(hr)); |
| 60 | hr = uninit(); | 77 | hr = uninit(); |
diff --git a/runtime/test/fsr_dispatch_test.cpp b/runtime/test/fsr_dispatch_test.cpp index 7affaee7a..9a66071ac 100644 --- a/runtime/test/fsr_dispatch_test.cpp +++ b/runtime/test/fsr_dispatch_test.cpp | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | // driver refuses one of its textures (DXGI_FORMAT_R9G9B9E5_SHAREDEXP with ALLOW_UNORDERED_ACCESS); on WARP the | 28 | // driver refuses one of its textures (DXGI_FORMAT_R9G9B9E5_SHAREDEXP with ALLOW_UNORDERED_ACCESS); on WARP the |
| 29 | // context is created as is. The other backend ids are controls: they end in FFX_API_RETURN_ERROR before the device | 29 | // context is created as is. The other backend ids are controls: they end in FFX_API_RETURN_ERROR before the device |
| 30 | // is touched. In step 7 the dispatch is recorded up to the DLL's compute pipeline, which a PC device cannot create | 30 | // is touched. In step 7 the dispatch is recorded up to the DLL's compute pipeline, which a PC device cannot create |
| 31 | // (slot 67 is console-only and refused; slot 62's code is not a PC shader). The INFO lines are the measurement; the | 31 | // (slot 67 and 62 codes are not PC shaders). The INFO lines are the measurement; the |
| 32 | // PASS/FAIL checks only cover what is known to work. | 32 | // PASS/FAIL checks only cover what is known to work. |
| 33 | #include <windows.h> | 33 | #include <windows.h> |
| 34 | 34 | ||
| @@ -958,7 +958,7 @@ int main() { | |||
| 958 | note(" device slot 62 (compute pipeline from a D3D12_COMPUTE_PIPELINE_STATE_DESC) called " + | 958 | note(" device slot 62 (compute pipeline from a D3D12_COMPUTE_PIPELINE_STATE_DESC) called " + |
| 959 | std::to_string(g_slot62_calls) + "x, last HRESULT " + hex(static_cast<uint32_t>(g_slot62_hr))); | 959 | std::to_string(g_slot62_calls) + "x, last HRESULT " + hex(static_cast<uint32_t>(g_slot62_hr))); |
| 960 | if (g_formatted) note(" the DLL formatted HRESULT " + hex(g_first_formatted)); | 960 | if (g_formatted) note(" the DLL formatted HRESULT " + hex(g_first_formatted)); |
| 961 | // On a PC device both pipeline paths fail (67 is refused, 62's code is not a PC shader); on the | 961 | // On a PC device both pipeline paths fail (neither slot 67's nor 62's code is a PC shader); on the |
| 962 | // Vulkan device CreateRootSignature (slot 16) is not implemented yet. Either way the dispatch goes | 962 | // Vulkan device CreateRootSignature (slot 16) is not implemented yet. Either way the dispatch goes |
| 963 | // on with a null pipeline and faults when it records it (RVA 0x65ff reads the pipeline's +0x10, | 963 | // on with a null pipeline and faults when it records it (RVA 0x65ff reads the pipeline's +0x10, |
| 964 | // the same pointer it passes to SetPipelineState): a documented stop, not a test failure. | 964 | // the same pointer it passes to SetPipelineState): a documented stop, not a test failure. |
diff --git a/runtime/test/glsl/cs_user_data.comp b/runtime/test/glsl/cs_user_data.comp index a932cc086..82779ccb1 100644 --- a/runtime/test/glsl/cs_user_data.comp +++ b/runtime/test/glsl/cs_user_data.comp | |||
| @@ -36,8 +36,20 @@ Words at(uvec2 va) { | |||
| 36 | void main() { | 36 | void main() { |
| 37 | const uint i = gl_GlobalInvocationID.x; | 37 | const uint i = gl_GlobalInvocationID.x; |
| 38 | Words table = at(uvec2(pc.s[4], pc.s[5])); | 38 | Words table = at(uvec2(pc.s[4], pc.s[5])); |
| 39 | Words result = at(uvec2(pc.s[2], pc.s[3])); | ||
| 40 | if (pc.s[1] == 0u) { | ||
| 41 | // CBV V# mode: table holds a 16-byte GFX10 raw buffer descriptor written by CreateConstantBufferView. | ||
| 42 | const uint num_records = table.w[2]; | ||
| 43 | const uint byte_off = pc.s[0] + i * 4u; | ||
| 44 | if (byte_off + 4u <= num_records) { | ||
| 45 | Words cbv = at(uvec2(table.w[0], table.w[1] & 0xFFFFu)); | ||
| 46 | result.w[i] = cbv.w[byte_off >> 2u]; | ||
| 47 | } else { | ||
| 48 | result.w[i] = 0u; | ||
| 49 | } | ||
| 50 | return; | ||
| 51 | } | ||
| 39 | Words constants = at(uvec2(table.w[0], table.w[1])); | 52 | Words constants = at(uvec2(table.w[0], table.w[1])); |
| 40 | Words code = at(pc.code_base); | 53 | Words code = at(pc.code_base); |
| 41 | Words result = at(uvec2(pc.s[2], pc.s[3])); | ||
| 42 | result.w[i] = pc.s[0] + pc.s[1] * i + constants.w[i % 4] + code.w[1]; | 54 | result.w[i] = pc.s[0] + pc.s[1] * i + constants.w[i % 4] + code.w[1]; |
| 43 | } | 55 | } |
diff --git a/runtime/test/process_cmdline_test.cpp b/runtime/test/process_cmdline_test.cpp index 4c78835bb..8f35a8ef7 100644 --- a/runtime/test/process_cmdline_test.cpp +++ b/runtime/test/process_cmdline_test.cpp | |||
| @@ -1,10 +1,14 @@ | |||
| 1 | // The process shim's command line round-trips: what GetCommandLineW says must parse with CommandLineToArgvW (the | 1 | // The process shim's command line round-trips: what GetCommandLineW says must parse with CommandLineToArgvW (the |
| 2 | // documented rules the CRT's argv parser shares) back to the __wargv the shim hands out, and __wargv must hold what | 2 | // documented rules the CRT's argv parser shares) back to the __wargv the shim hands out, and __wargv must hold what |
| 3 | // main.cpp passed, whatever the system code page (RT-84). No game files. | 3 | // main.cpp passed, whatever the system code page (RT-84). The WinMain line (lpCmdLine) is the game's too, and the |
| 4 | // command line and ExitProcess are served under kernelbase.dll and the API-set names as well as kernel32.dll. | ||
| 5 | // No game files. | ||
| 4 | #include <windows.h> | 6 | #include <windows.h> |
| 5 | #include <shellapi.h> | 7 | #include <shellapi.h> |
| 6 | 8 | ||
| 7 | #include <cstdio> | 9 | #include <cstdio> |
| 10 | #include <cstring> | ||
| 11 | #include <cwchar> | ||
| 8 | #include <string> | 12 | #include <string> |
| 9 | #include <vector> | 13 | #include <vector> |
| 10 | 14 | ||
| @@ -54,6 +58,60 @@ void check_non_ascii(const std::wstring& want, const char* what) { | |||
| 54 | ++failures; | 58 | ++failures; |
| 55 | } | 59 | } |
| 56 | } | 60 | } |
| 61 | |||
| 62 | // An executable can import GetCommandLineA/W and ExitProcess from kernel32.dll, kernelbase.dll or the API set its | ||
| 63 | // umbrella library names, and the loader matches the DLL name exactly: every name must hand out the same shim. | ||
| 64 | void check_import_names() { | ||
| 65 | for (const char* dll : {"kernelbase.dll", "api-ms-win-core-processenvironment-l1-1-0.dll"}) | ||
| 66 | for (const char* name : {"GetCommandLineA", "GetCommandLineW"}) { | ||
| 67 | void* fn = rt::shims::find(dll, name); | ||
| 68 | if (!fn || fn != rt::shims::find("kernel32.dll", name)) { | ||
| 69 | std::fprintf(stderr, "FAIL %s!%s is not the kernel32.dll shim\n", dll, name); | ||
| 70 | ++failures; | ||
| 71 | } | ||
| 72 | } | ||
| 73 | for (const char* dll : {"kernelbase.dll", "api-ms-win-core-processthreads-l1-1-0.dll"}) { | ||
| 74 | void* fn = rt::shims::find(dll, "ExitProcess"); | ||
| 75 | if (!fn || fn != rt::shims::find("kernel32.dll", "ExitProcess")) { | ||
| 76 | std::fprintf(stderr, "FAIL %s!ExitProcess is not the kernel32.dll shim\n", dll); | ||
| 77 | ++failures; | ||
| 78 | } | ||
| 79 | } | ||
| 80 | for (const char* dll : {"api-ms-win-crt-runtime-l1-1-0.dll", "ucrtbase.dll", "ucrtbased.dll"}) | ||
| 81 | for (const char* name : {"_get_narrow_winmain_command_line", "_get_wide_winmain_command_line"}) | ||
| 82 | if (!rt::shims::find(dll, name)) { | ||
| 83 | std::fprintf(stderr, "FAIL %s!%s is not shimmed\n", dll, name); | ||
| 84 | ++failures; | ||
| 85 | } | ||
| 86 | } | ||
| 87 | |||
| 88 | // lpCmdLine as the CRT's WinMain startup gets it from _get_wide/_get_narrow_winmain_command_line: the game's command | ||
| 89 | // line after the program name and the blanks that follow it (the narrow one in the ANSI code page). | ||
| 90 | void check_winmain(const std::wstring& program, const std::vector<std::wstring>& args, const wchar_t* want, | ||
| 91 | const char* what) { | ||
| 92 | rt::process::set_command_line(program, args); | ||
| 93 | using Wide = wchar_t*(__cdecl*)(); | ||
| 94 | using Narrow = char*(__cdecl*)(); | ||
| 95 | for (const char* dll : {"api-ms-win-crt-runtime-l1-1-0.dll", "ucrtbase.dll"}) { | ||
| 96 | const auto wide_fn = reinterpret_cast<Wide>(rt::shims::find(dll, "_get_wide_winmain_command_line")); | ||
| 97 | const auto narrow_fn = reinterpret_cast<Narrow>(rt::shims::find(dll, "_get_narrow_winmain_command_line")); | ||
| 98 | if (!wide_fn || !narrow_fn) continue; // check_import_names has reported the missing shim | ||
| 99 | const wchar_t* wide = wide_fn(); | ||
| 100 | const char* line = narrow_fn(); | ||
| 101 | char expected[256] = {}; | ||
| 102 | WideCharToMultiByte(CP_ACP, 0, want, -1, expected, sizeof(expected), nullptr, nullptr); | ||
| 103 | if (!wide || std::wcscmp(wide, want) != 0) { | ||
| 104 | std::fwprintf(stderr, L"FAIL %hs (%hs): the wide WinMain line is [%ls], want [%ls]\n", what, dll, | ||
| 105 | wide ? wide : L"(null)", want); | ||
| 106 | ++failures; | ||
| 107 | } | ||
| 108 | if (!line || std::strcmp(line, expected) != 0) { | ||
| 109 | std::fprintf(stderr, "FAIL %s (%s): the narrow WinMain line is [%s], want [%s]\n", what, dll, | ||
| 110 | line ? line : "(null)", expected); | ||
| 111 | ++failures; | ||
| 112 | } | ||
| 113 | } | ||
| 114 | } | ||
| 57 | } // namespace | 115 | } // namespace |
| 58 | 116 | ||
| 59 | int main() { | 117 | int main() { |
| @@ -67,8 +125,16 @@ int main() { | |||
| 67 | // Greek, Cyrillic and CJK together: no single-byte code page holds all of them, so this covers every PC. | 125 | // Greek, Cyrillic and CJK together: no single-byte code page holds all of them, so this covers every PC. |
| 68 | check_non_ascii(L"\u0394\u0416\u6F22 x", "an argument outside any single-byte code page"); | 126 | check_non_ascii(L"\u0394\u0416\u6F22 x", "an argument outside any single-byte code page"); |
| 69 | 127 | ||
| 128 | check_import_names(); | ||
| 129 | check_winmain(L"game.exe", {L"-foo", L"with space"}, L"-foo \"with space\"", "arguments after a plain name"); | ||
| 130 | check_winmain(L"C:\\My Games\\game.exe", {L"-x"}, L"-x", "a quoted program name with a space"); | ||
| 131 | check_winmain(L"game.exe", {}, L"", "no arguments"); | ||
| 132 | // A byte above 0x7f in the narrow program name is part of the name, not the end of it. | ||
| 133 | check_winmain(L"caf\u00e9.exe", {L"-x"}, L"-x", "a non-ASCII program name"); | ||
| 134 | |||
| 70 | if (failures) return 1; | 135 | if (failures) return 1; |
| 71 | std::printf("process_cmdline: GetCommandLineW parses back to __wargv, non-ASCII arguments intact (code page %u)\n", | 136 | std::printf("process_cmdline: GetCommandLineW parses back to __wargv, non-ASCII arguments intact (code page %u); " |
| 137 | "the WinMain line and the kernelbase/API-set names are the game's\n", | ||
| 72 | GetACP()); | 138 | GetACP()); |
| 73 | return 0; | 139 | return 0; |
| 74 | } | 140 | } |
diff --git a/runtime/test/shader_library_corpus_test.cpp b/runtime/test/shader_library_corpus_test.cpp new file mode 100644 index 000000000..6e3e6be94 --- /dev/null +++ b/runtime/test/shader_library_corpus_test.cpp | |||
| @@ -0,0 +1,159 @@ | |||
| 1 | // The runtime's shader lookup (src/shader_library.h) over a translated corpus from the player's own copy. | ||
| 2 | // | ||
| 3 | // LEONIDA_SHADERS=<work>/shaders/spirv the translator's output (index.json and the .spv modules) | ||
| 4 | // LEONIDA_SHADER_DXBC=<work>/shaders/dxbc optional; the carved DXBC containers, default <spirv>/../dxbc | ||
| 5 | // | ||
| 6 | // For every container the test does what d3d12_vulkan_device.cpp does with a PSO's bytecode: inflate the FSSM program | ||
| 7 | // from the DXIL/XDAT/XBCH entry, hash it and look it up under the container's stage. The stage comes from the DXIL | ||
| 8 | // part's program header, not from index.json. Every container has to resolve to its own entry (the one named after | ||
| 9 | // the file, or one of its `~N` duplicates) with a readable SPIR-V module, and every index entry has to be reached by | ||
| 10 | // a container. Containers with more than one 0x0D payload are counted, and their first payload must not stand in for | ||
| 11 | // the last: that is the rule fssm_program follows, so a regression to the first payload fails here. | ||
| 12 | // | ||
| 13 | // Without LEONIDA_SHADERS it prints SKIP and exits 77 (SKIP_RETURN_CODE). It reads the work folder in place, writes | ||
| 14 | // nothing, and prints counts; on a failure it names at most a few shaders, which stay on your machine. | ||
| 15 | #include "../src/shader_library.h" | ||
| 16 | |||
| 17 | #include <cstdio> | ||
| 18 | #include <cstdlib> | ||
| 19 | #include <filesystem> | ||
| 20 | #include <fstream> | ||
| 21 | #include <set> | ||
| 22 | #include <string> | ||
| 23 | #include <vector> | ||
| 24 | |||
| 25 | namespace { | ||
| 26 | |||
| 27 | namespace fs = std::filesystem; | ||
| 28 | |||
| 29 | std::string env(const char* name) { | ||
| 30 | const char* value = std::getenv(name); | ||
| 31 | return value ? value : ""; | ||
| 32 | } | ||
| 33 | |||
| 34 | std::vector<std::uint8_t> read_file(const fs::path& path) { | ||
| 35 | std::ifstream file(path, std::ios::binary); | ||
| 36 | return {std::istreambuf_iterator<char>(file), std::istreambuf_iterator<char>()}; | ||
| 37 | } | ||
| 38 | |||
| 39 | std::uint32_t u32(std::span<const std::uint8_t> data, std::size_t at) { | ||
| 40 | if (at + 4 > data.size()) return 0; | ||
| 41 | std::uint32_t v; | ||
| 42 | std::memcpy(&v, data.data() + at, 4); | ||
| 43 | return v; | ||
| 44 | } | ||
| 45 | |||
| 46 | // The stage the DXIL program header names (DxilProgramHeader::ProgramVersion, kind in bits 31:16; D3D12's | ||
| 47 | // D3D12_SHADER_VERSION_TYPE), in the translator's spelling. Empty for a kind the corpus has no translation for. | ||
| 48 | std::string dxil_stage(std::span<const std::uint8_t> container) { | ||
| 49 | const auto dxil = leonida::dxbc_part(container, "DXIL"); | ||
| 50 | if (dxil.size() < 4) return {}; | ||
| 51 | switch (u32(dxil, 0) >> 16) { | ||
| 52 | case 0: return "ps"; | ||
| 53 | case 1: return "vs"; | ||
| 54 | case 2: return "gs"; | ||
| 55 | case 5: return "cs"; | ||
| 56 | case 13: return "ms"; | ||
| 57 | default: return {}; | ||
| 58 | } | ||
| 59 | } | ||
| 60 | |||
| 61 | // Every 0x0D (XBCH) payload of the container's XDAT table, in table order, inflated. fssm_program keeps the last. | ||
| 62 | std::vector<std::vector<std::uint8_t>> all_programs(std::span<const std::uint8_t> container) { | ||
| 63 | std::vector<std::vector<std::uint8_t>> out; | ||
| 64 | const auto dxil = leonida::dxbc_part(container, "DXIL"); | ||
| 65 | std::size_t xdat = 0; | ||
| 66 | while (xdat + 4 <= dxil.size() && std::memcmp(dxil.data() + xdat, "XDAT", 4) != 0) ++xdat; | ||
| 67 | const std::uint32_t count = u32(dxil, xdat + 4); | ||
| 68 | for (std::uint32_t i = 0; i < count; ++i) { | ||
| 69 | const std::size_t entry = xdat + 12 + 12 * std::size_t(i); | ||
| 70 | if (entry + 12 > dxil.size()) break; | ||
| 71 | const std::uint32_t tag = u32(dxil, entry), offset = u32(dxil, entry + 4), size = u32(dxil, entry + 8); | ||
| 72 | if (tag != 0x0d || size < 24 || std::size_t(offset) + size > dxil.size()) continue; | ||
| 73 | const auto blob = dxil.subspan(offset, size); | ||
| 74 | std::vector<std::uint8_t> program; | ||
| 75 | if (std::memcmp(blob.data(), "XBCH", 4) == 0 && leonida::zlib_inflate(blob.subspan(24), program, u32(blob, 16))) | ||
| 76 | out.push_back(std::move(program)); | ||
| 77 | } | ||
| 78 | return out; | ||
| 79 | } | ||
| 80 | |||
| 81 | bool own_entry(const leonida::ShaderEntry& entry, const std::string& stem) { | ||
| 82 | return entry.name == stem || entry.name.rfind(stem + "~", 0) == 0; | ||
| 83 | } | ||
| 84 | |||
| 85 | } // namespace | ||
| 86 | |||
| 87 | int main() { | ||
| 88 | const std::string spirv_dir = env("LEONIDA_SHADERS"); | ||
| 89 | if (spirv_dir.empty()) { | ||
| 90 | std::printf("SKIP (no translated corpus: set LEONIDA_SHADERS to <work>/shaders/spirv)\n"); | ||
| 91 | return 77; | ||
| 92 | } | ||
| 93 | std::string dxbc_dir = env("LEONIDA_SHADER_DXBC"); | ||
| 94 | if (dxbc_dir.empty()) dxbc_dir = (fs::path(spirv_dir) / ".." / "dxbc").lexically_normal().string(); | ||
| 95 | |||
| 96 | int failures = 0, named = 0; | ||
| 97 | const auto fail = [&](const std::string& what, const std::string& shader) { | ||
| 98 | ++failures; | ||
| 99 | if (named++ < 8) std::fprintf(stderr, "FAIL %s: %s\n", what.c_str(), shader.c_str()); | ||
| 100 | }; | ||
| 101 | |||
| 102 | leonida::ShaderLibrary library; | ||
| 103 | std::string error; | ||
| 104 | if (!library.load(spirv_dir, &error)) { | ||
| 105 | std::fprintf(stderr, "FAIL loading %s: %s\n", spirv_dir.c_str(), error.c_str()); | ||
| 106 | return 1; | ||
| 107 | } | ||
| 108 | std::error_code ec; | ||
| 109 | if (!fs::is_directory(dxbc_dir, ec)) { | ||
| 110 | std::fprintf(stderr, "FAIL no DXBC folder %s (set LEONIDA_SHADER_DXBC)\n", dxbc_dir.c_str()); | ||
| 111 | return 1; | ||
| 112 | } | ||
| 113 | |||
| 114 | std::size_t containers = 0, multi = 0; | ||
| 115 | std::set<std::string> reached; | ||
| 116 | for (const auto& item : fs::directory_iterator(dxbc_dir)) { | ||
| 117 | if (!item.is_regular_file() || item.path().extension() != ".dxbc") continue; | ||
| 118 | ++containers; | ||
| 119 | const std::string stem = item.path().stem().string(); | ||
| 120 | const auto bytes = read_file(item.path()); | ||
| 121 | const std::string stage = dxil_stage(bytes); | ||
| 122 | if (stage.empty()) { | ||
| 123 | fail("no shader stage in the DXIL program header", stem); | ||
| 124 | continue; | ||
| 125 | } | ||
| 126 | const auto program = leonida::fssm_program(bytes); | ||
| 127 | if (program.size() < 4 || std::memcmp(program.data(), "FSSM", 4) != 0) { | ||
| 128 | fail("no FSSM program", stem); | ||
| 129 | continue; | ||
| 130 | } | ||
| 131 | bool found = false; | ||
| 132 | for (const leonida::ShaderEntry* entry : library.candidates(stage, leonida::sha256_hex(program))) { | ||
| 133 | if (!own_entry(*entry, stem)) continue; | ||
| 134 | found = true; | ||
| 135 | reached.insert(entry->name); | ||
| 136 | if (library.spirv(*entry).empty()) fail("no SPIR-V module for", entry->name); | ||
| 137 | } | ||
| 138 | if (!found) fail("not found under its " + stage + " stage", stem); | ||
| 139 | |||
| 140 | // The 0x0D payloads that differ from the last: none of them may be what the index has for this container. | ||
| 141 | const auto programs = all_programs(bytes); | ||
| 142 | if (programs.empty() || programs.back() != program) fail("fssm_program is not the last 0x0D payload", stem); | ||
| 143 | bool differs = false; | ||
| 144 | for (std::size_t i = 0; i + 1 < programs.size(); ++i) { | ||
| 145 | if (programs[i] == program) continue; | ||
| 146 | differs = true; | ||
| 147 | for (const leonida::ShaderEntry* entry : library.candidates(stage, leonida::sha256_hex(programs[i]))) | ||
| 148 | if (own_entry(*entry, stem)) fail("an earlier 0x0D payload is the indexed program", stem); | ||
| 149 | } | ||
| 150 | multi += differs; | ||
| 151 | } | ||
| 152 | |||
| 153 | if (containers == 0) fail("no .dxbc containers in", dxbc_dir); | ||
| 154 | if (reached.size() != library.size()) | ||
| 155 | fail(std::to_string(library.size() - reached.size()) + " index entries reached by no container", spirv_dir); | ||
| 156 | std::printf("%zu containers, %zu index entries, %zu reached; %zu containers with more than one program; " | ||
| 157 | "%d failures\n", containers, library.size(), reached.size(), multi, failures); | ||
| 158 | return failures ? 1 : 0; | ||
| 159 | } | ||
diff --git a/runtime/test/shaders/build.py b/runtime/test/shaders/build.py index c9796f244..7ec6608d6 100644 --- a/runtime/test/shaders/build.py +++ b/runtime/test/shaders/build.py | |||
| @@ -20,6 +20,8 @@ With LEONIDA_FMA=khr (or glsl), the fused multiply-adds are translated with --fm | |||
| 20 | VK_KHR_shader_fma; the test programs enable it when the device has it, else they exit 77) or --fma glsl. | 20 | VK_KHR_shader_fma; the test programs enable it when the device has it, else they exit 77) or --fma glsl. |
| 21 | With LEONIDA_BARY_FALLBACK=1, pixel shaders that read raw barycentrics are translated with --bary-fallback, and | 21 | With LEONIDA_BARY_FALLBACK=1, pixel shaders that read raw barycentrics are translated with --bary-fallback, and |
| 22 | each gets a pass-through geometry shader, <name>.bary_gs.spv, that check.py draws it with (tools/bary_fallback_gs.py). | 22 | each gets a pass-through geometry shader, <name>.bary_gs.spv, that check.py draws it with (tools/bary_fallback_gs.py). |
| 23 | Under that or LEONIDA_F16_INTERP_FALLBACK=1, ps_ij_computed isn't built: its computed I/J pair needs PerVertexKHR | ||
| 24 | inputs, and check.py reports it as SKIP. | ||
| 23 | """ | 25 | """ |
| 24 | import json | 26 | import json |
| 25 | import os | 27 | import os |
| @@ -38,6 +40,8 @@ import mc_command # noqa: E402 | |||
| 38 | 40 | ||
| 39 | MC = mc_command.mc_command() | 41 | MC = mc_command.mc_command() |
| 40 | RSRC2, GROUP = 0x8088, (64, 1, 1) | 42 | RSRC2, GROUP = 0x8088, (64, 1, 1) |
| 43 | # Not built under LEONIDA_BARY_FALLBACK=1 or LEONIDA_F16_INTERP_FALLBACK=1 (see main). | ||
| 44 | NEEDS_PER_VERTEX_INPUTS = ("ps_ij_computed",) | ||
| 41 | sys.path.insert(0, HERE) # this script is also run with python -I | 45 | sys.path.insert(0, HERE) # this script is also run with python -I |
| 42 | from compute_fixture import compute_header # noqa: E402 | 46 | from compute_fixture import compute_header # noqa: E402 |
| 43 | 47 | ||
| @@ -58,8 +62,8 @@ def asm_mattr(path): | |||
| 58 | CLIP_CASES = {"vs_clip": 1, "vs_clip_param4": 4, "vs_clip_undeclared": 1} | 62 | CLIP_CASES = {"vs_clip": 1, "vs_clip_param4": 4, "vs_clip_undeclared": 1} |
| 59 | 63 | ||
| 60 | 64 | ||
| 61 | def asm_fssm(path): | 65 | def asm_fssm_fields(path): |
| 62 | """The synthetic FSSM program a vs_/ps_ shader's header asks for, or None.""" | 66 | """(offset, words) of the "fssm-at" and "fssm-data" header comments, (None, []) without them.""" |
| 63 | at, words = None, [] | 67 | at, words = None, [] |
| 64 | for ln in Path(path).read_text(encoding="utf-8").splitlines(): | 68 | for ln in Path(path).read_text(encoding="utf-8").splitlines(): |
| 65 | s = ln.strip() | 69 | s = ln.strip() |
| @@ -71,11 +75,27 @@ def asm_fssm(path): | |||
| 71 | m = re.match(r";\s*fssm-data:\s*(.*)", s) | 75 | m = re.match(r";\s*fssm-data:\s*(.*)", s) |
| 72 | if m: | 76 | if m: |
| 73 | words += [int(w, 0) for w in m.group(1).split()] | 77 | words += [int(w, 0) for w in m.group(1).split()] |
| 78 | return at, words | ||
| 79 | |||
| 80 | |||
| 81 | def asm_fssm(path): | ||
| 82 | """The synthetic FSSM program a vs_/ps_ shader's header asks for, or None.""" | ||
| 83 | at, words = asm_fssm_fields(path) | ||
| 74 | if at is None or not words or at < 4 or at % 4: | 84 | if at is None or not words or at < 4 or at % 4: |
| 75 | return None | 85 | return None |
| 76 | return b"FSSM" + bytes(at - 4) + b"".join(struct.pack("<I", w) for w in words) | 86 | return b"FSSM" + bytes(at - 4) + b"".join(struct.pack("<I", w) for w in words) |
| 77 | 87 | ||
| 78 | 88 | ||
| 89 | def cs_fssm_extra(path): | ||
| 90 | """A compute shader's "fssm-at"/"fssm-data" words (at 0x148 or later, after compute_header's header), or None. | ||
| 91 | Two compute shaders with the same group size and RSRC2 would otherwise share one FSSM hash, which is what the | ||
| 92 | layer finds a PSO's shader by.""" | ||
| 93 | at, words = asm_fssm_fields(path) | ||
| 94 | if at is None or not words or at < 0x148 or at % 4: | ||
| 95 | return None | ||
| 96 | return at, b"".join(struct.pack("<I", w) for w in words) | ||
| 97 | |||
| 98 | |||
| 79 | def shader_source(name): | 99 | def shader_source(name): |
| 80 | return "vs_clip" if name in CLIP_CASES else name | 100 | return "vs_clip" if name in CLIP_CASES else name |
| 81 | 101 | ||
| @@ -108,12 +128,16 @@ def translate_tests(work, names): | |||
| 108 | sys.exit(f"{n}.asm did not assemble:\n{r.stderr}") | 128 | sys.exit(f"{n}.asm did not assemble:\n{r.stderr}") |
| 109 | # rdna2spirv.py rejects assembler directives such as the "\t.text" llvm-mc prints first. | 129 | # rdna2spirv.py rejects assembler directives such as the "\t.text" llvm-mc prints first. |
| 110 | code = "".join(ln for ln in r.stdout.splitlines(keepends=True) if not ln.lstrip().startswith(".")) | 130 | code = "".join(ln for ln in r.stdout.splitlines(keepends=True) if not ln.lstrip().startswith(".")) |
| 111 | (disasm / (n + ".s")).write_text(f"; {n} hand-written test\n{code}", encoding="utf-8") | 131 | (disasm / (n + ".s")).write_text(f"; {n} hand-written test\n{code}", encoding="utf-8", newline="\n") |
| 112 | program = None if n.startswith("cs_") else asm_fssm(asm_path) | 132 | program = None if n.startswith("cs_") else asm_fssm(asm_path) |
| 113 | if program: # where the translator looks for a program to hash, as in the game's work folder | 133 | if program: # where the translator looks for a program to hash, as in the game's work folder |
| 114 | (fssm / (n + ".fssm")).write_bytes(program) | 134 | (fssm / (n + ".fssm")).write_bytes(program) |
| 115 | if n.startswith("cs_"): | 135 | if n.startswith("cs_"): |
| 116 | (fssm / (n + ".fssm")).write_bytes(compute_header(asm_path)) | 136 | program = bytes(compute_header(asm_path)) |
| 137 | extra = cs_fssm_extra(asm_path) | ||
| 138 | if extra: | ||
| 139 | program += bytes(extra[0] - len(program)) + extra[1] | ||
| 140 | (fssm / (n + ".fssm")).write_bytes(program) | ||
| 117 | elif n in CLIP_CASES and n != "vs_clip_undeclared": | 141 | elif n in CLIP_CASES and n != "vs_clip_undeclared": |
| 118 | (work / (n + ".dxbc")).write_bytes(clip_container()) | 142 | (work / (n + ".dxbc")).write_bytes(clip_container()) |
| 119 | else: | 143 | else: |
| @@ -149,6 +173,14 @@ def main(): | |||
| 149 | if skipped: | 173 | if skipped: |
| 150 | print("not built (need a DXBC container with signatures):", ", ".join(skipped)) | 174 | print("not built (need a DXBC container with signatures):", ", ".join(skipped)) |
| 151 | names = [n for n in names if n not in skipped] | 175 | names = [n for n in names if n not in skipped] |
| 176 | # A computed I/J pair needs PerVertexKHR inputs, which both fallbacks take away: the translator refuses it there, | ||
| 177 | # and check.py and run_gpu_tests.py report it as SKIP. Leave it out instead of losing the whole batch. | ||
| 178 | if os.environ.get("LEONIDA_BARY_FALLBACK") == "1" or os.environ.get("LEONIDA_F16_INTERP_FALLBACK") == "1": | ||
| 179 | per_vertex = [n for n in names if n in NEEDS_PER_VERTEX_INPUTS] | ||
| 180 | if per_vertex: | ||
| 181 | print("not built (computed I/J pairs need PerVertexKHR inputs, off under the fallback):", | ||
| 182 | ", ".join(per_vertex)) | ||
| 183 | names = [n for n in names if n not in per_vertex] | ||
| 152 | if not names: | 184 | if not names: |
| 153 | return 0 | 185 | return 0 |
| 154 | out.mkdir(parents=True, exist_ok=True) | 186 | out.mkdir(parents=True, exist_ok=True) |
| @@ -168,13 +200,14 @@ def main(): | |||
| 168 | published_index = spirv / index.name | 200 | published_index = spirv / index.name |
| 169 | combined = json.loads(published_index.read_text(encoding="utf-8")) if published_index.exists() else {} | 201 | combined = json.loads(published_index.read_text(encoding="utf-8")) if published_index.exists() else {} |
| 170 | combined.update(validated) | 202 | combined.update(validated) |
| 171 | index.write_text(json.dumps(combined, indent=2) + "\n", encoding="utf-8") | 203 | index.write_text(json.dumps(combined, indent=2) + "\n", encoding="utf-8", newline="\n") |
| 172 | for n in validated: | 204 | for n in validated: |
| 173 | for suffix in (".spv", ".spvasm"): | 205 | for suffix in (".spv", ".spvasm"): |
| 174 | artifact = built / (n + suffix) | 206 | artifact = built / (n + suffix) |
| 175 | artifact.replace(spirv / artifact.name) | 207 | artifact.replace(spirv / artifact.name) |
| 176 | sidecar = work / "fssm" / (n + ".fssm") | 208 | sidecar = work / "fssm" / (n + ".fssm") |
| 177 | if not n.startswith("cs_") and sidecar.is_file(): | 209 | published = not n.startswith("cs_") or cs_fssm_extra(os.path.join(HERE, n + ".asm")) |
| 210 | if published and sidecar.is_file(): | ||
| 178 | (out / "fssm").mkdir(exist_ok=True) | 211 | (out / "fssm").mkdir(exist_ok=True) |
| 179 | sidecar.replace(out / "fssm" / sidecar.name) | 212 | sidecar.replace(out / "fssm" / sidecar.name) |
| 180 | index.replace(published_index) | 213 | index.replace(published_index) |
diff --git a/runtime/test/shaders/check.py b/runtime/test/shaders/check.py index 2f2853175..3985f85e4 100644 --- a/runtime/test/shaders/check.py +++ b/runtime/test/shaders/check.py | |||
| @@ -81,14 +81,14 @@ CS_SMEM = [0x5eed0024, 0x5eed0028, 0x5eed002c, 0x5eed0030, 0x5eed0010, 0x5eed001 | |||
| 81 | WAVE32_DUMPS = ("cs_store", "cs_smem_soffset_imm", "cs_wqm_w32", "cs_w32_lane_wrap", "cs_movrelsd_2", "cs_w32_permute", | 81 | WAVE32_DUMPS = ("cs_store", "cs_smem_soffset_imm", "cs_wqm_w32", "cs_w32_lane_wrap", "cs_movrelsd_2", "cs_w32_permute", |
| 82 | "cs_barrier_divergent", "cs_barrier_early_end", "cs_barrier_loop", "cs_w32_lds_u8_d16", "cs_bpermute32", | 82 | "cs_barrier_divergent", "cs_barrier_early_end", "cs_barrier_loop", "cs_w32_lds_u8_d16", "cs_bpermute32", |
| 83 | "cs_w32_partial_scmp", "cs_exec_const", "cs_w32_mask_imm", "cs_w32_int_ext", | 83 | "cs_w32_partial_scmp", "cs_exec_const", "cs_w32_mask_imm", "cs_w32_int_ext", |
| 84 | "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops", "cs_w32_sincos") | 84 | "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops", "cs_w32_sincos", "cs_lds_b64_cmpst") |
| 85 | # Wave32 lane-mask dumps: their EXEC/VCC masks and lane selects cover 32 lanes, so a device whose widest subgroup is | 85 | # Wave32 lane-mask dumps: their EXEC/VCC masks and lane selects cover 32 lanes, so a device whose widest subgroup is |
| 86 | # narrower (Mesa llvmpipe: 8) can't produce their words. They are skipped there, as ps_bitmask_perm is. They run with | 86 | # narrower (Mesa llvmpipe: 8) can't produce their words. They are skipped there, as ps_bitmask_perm is. They run with |
| 87 | # 32 lanes requested (WAVE32_LANE_ENV), as run_gpu_tests.py does: a device with a range like 8..32 (Intel ANV) may | 87 | # 32 lanes requested (WAVE32_LANE_ENV), as run_gpu_tests.py does: a device with a range like 8..32 (Intel ANV) may |
| 88 | # otherwise pick a narrower size and return different words (#774). | 88 | # otherwise pick a narrower size and return different words (#774). |
| 89 | WAVE32_LANE_ENV = {"VKC_SUBGROUP_SIZE": "32"} | 89 | WAVE32_LANE_ENV = {"VKC_SUBGROUP_SIZE": "32"} |
| 90 | WAVE32_LANE_DUMPS = ("cs_wqm_w32", "cs_w32_lane_wrap", "cs_w32_permute", "cs_bpermute32", "cs_w32_partial_scmp", "cs_exec_const", | 90 | WAVE32_LANE_DUMPS = ("cs_wqm_w32", "cs_w32_lane_wrap", "cs_w32_permute", "cs_bpermute32", "cs_w32_partial_scmp", "cs_exec_const", |
| 91 | "cs_w32_mask_imm") | 91 | "cs_w32_mask_imm", "cs_lds_b64_cmpst") |
| 92 | CS_DPP = [("cs_dpp", [1, 0, 3, 2, 5, 4, 7, 6]), | 92 | CS_DPP = [("cs_dpp", [1, 0, 3, 2, 5, 4, 7, 6]), |
| 93 | ("cs_dpp_row", [0, 0, 1, 2, 3, 4, 5, 6]), | 93 | ("cs_dpp_row", [0, 0, 1, 2, 3, 4, 5, 6]), |
| 94 | ("cs_dpp_mask", [1, 0, 3, 2, 0xeeeeeeee, 0xeeeeeeee, 0xeeeeeeee, 0xeeeeeeee]), | 94 | ("cs_dpp_mask", [1, 0, 3, 2, 0xeeeeeeee, 0xeeeeeeee, 0xeeeeeeee, 0xeeeeeeee]), |
| @@ -116,6 +116,9 @@ CS_DUMPS = [*CS_DPP, ("cs_store", CS_STORE), ("cs_smem_soffset_imm", CS_SMEM), | |||
| 116 | ("cs_w32_salu64", [0x1E6A2C48, 0x1234, 0xFFFFFFFF, 0x100, 47, 48, 0xFFFF8000, 0xFFFFFFFE]), | 116 | ("cs_w32_salu64", [0x1E6A2C48, 0x1234, 0xFFFFFFFF, 0x100, 47, 48, 0xFFFF8000, 0xFFFFFFFE]), |
| 117 | # SHADER-85: 8-bit LDS reads into one half of a VGPR, the other half kept | 117 | # SHADER-85: 8-bit LDS reads into one half of a VGPR, the other half kept |
| 118 | ("cs_w32_lds_u8_d16", [0xBEEF00FF, 0x00FF1234, 0xBEEFFF80, 0xFF801234, 0xBEEF007F, 0x007F1234, 0xBEEF0080, 0xFFFF1234]), | 118 | ("cs_w32_lds_u8_d16", [0xBEEF00FF, 0x00FF1234, 0xBEEFFF80, 0xFF801234, 0xBEEF007F, 0x007F1234, 0xBEEF0080, 0xFFFF1234]), |
| 119 | # ds_cmpst_b32 and the b64 2-address forms (cs_lds_b64_cmpst.asm header) | ||
| 120 | ("cs_lds_b64_cmpst", [0x11110001, 0x22220002, 0x33330003, 0x44440004, | ||
| 121 | 0xCCCC000C, 0x44440004, 0xBBBB000B, 0x3579BADC]), | ||
| 119 | # constant EXEC: each lane takes its own bit (Intel got 16-bit constants wrong for lanes 16-31) | 122 | # constant EXEC: each lane takes its own bit (Intel got 16-bit constants wrong for lanes 16-31) |
| 120 | ("cs_exec_const", [16, 8, 2, 16, 0, 16]), | 123 | ("cs_exec_const", [16, 8, 2, 16, 0, 16]), |
| 121 | # a constant lane mask (saveexec, wrexec, s_and/s_not/s_mov_b64 into EXEC or VCC) gives lane L its bit L, | 124 | # a constant lane mask (saveexec, wrexec, s_and/s_not/s_mov_b64 into EXEC or VCC) gives lane L its bit L, |
| @@ -188,6 +191,16 @@ FMT_XY_XYZ_WORDS = [ | |||
| 188 | 0x3F800000, 0xA5A50284, 0xA5A50288, 0xA5A5028C, 0x0000FFFF, 0xA5A50294, 0xA5A50298, 0xA5A5029C, | 191 | 0x3F800000, 0xA5A50284, 0xA5A50288, 0xA5A5028C, 0x0000FFFF, 0xA5A50294, 0xA5A50298, 0xA5A5029C, |
| 189 | 0x0003FF01, 0xA5A502A4, 0xA5A502A8, 0xA5A502AC, 0xA5A502B0, 0xA5A502B4, 0xA5A502B8, 0xA5A502BC, | 192 | 0x0003FF01, 0xA5A502A4, 0xA5A502A8, 0xA5A502AC, 0xA5A502B0, 0xA5A502B4, 0xA5A502B8, 0xA5A502BC, |
| 190 | 0xA5A502C0, 0xA5A502C4, 0xA5A502C8, 0xA5A502CC] | 193 | 0xA5A502C0, 0xA5A502C4, 0xA5A502C8, 0xA5A502CC] |
| 194 | # cs_tbuffer_store.asm: 13 tbuffer_store_format_* regions read back, as a Radeon 680M (gfx1035) gives them | ||
| 195 | # natively. Layout and rules in the .asm header. | ||
| 196 | TBUFFER_STORE_WORDS = [ | ||
| 197 | 0x3F800000, 0x40000000, 0x40400000, 0x40800000, 0x40003C00, 0x00000000, 0xA5A50218, 0xA5A5021C, | ||
| 198 | 0x00030201, 0xA5A50224, 0xA5A50228, 0xA5A5022C, 0xA5A5FF30, 0xA5A50234, 0xA5A50238, 0xA5A5023C, | ||
| 199 | 0x40000240, 0xA5A50244, 0xA5A50248, 0xA5A5024C, 0xD00003FF, 0xA5A50254, 0xA5A50258, 0xA5A5025C, | ||
| 200 | 0x3F800000, 0x40000000, 0xA5A50268, 0xA5A5026C, 0x40003C00, 0xA5A50274, 0xA5A50278, 0xA5A5027C, | ||
| 201 | 0xFF0080FF, 0xA5A50284, 0xA5A50288, 0xA5A5028C, 0xA5A50290, 0xA5A50294, 0xA5A50298, 0xA5A5029C, | ||
| 202 | 0xA5A502FF, 0xA5A502A4, 0xA5A502A8, 0xA5A502AC, 0x3F800000, 0xA5A502B4, 0xA5A502B8, 0xA5A502BC, | ||
| 203 | 0xA5A502C0, 0xA5A502C4, 0xA5A502C8, 0xA5A502CC] | ||
| 191 | # Negative global_load/global_store offsets (cs_global_neg_offset.asm): 40 groups make a 0x2800-byte heap that holds | 204 | # Negative global_load/global_store offsets (cs_global_neg_offset.asm): 40 groups make a 0x2800-byte heap that holds |
| 192 | # both the right addresses and the 4096-lower ones; only group 0 thread 0 runs, so no wave64 requirement. | 205 | # both the right addresses and the 4096-lower ones; only group 0 thread 0 runs, so no wave64 requirement. |
| 193 | GLOBAL_OFFSET = [("cs_global_neg_offset", "40", [0x5EED1FFC, 0x8BAD1800, 0x5EED1FF0, 0x5EED1FF4, | 206 | GLOBAL_OFFSET = [("cs_global_neg_offset", "40", [0x5EED1FFC, 0x8BAD1800, 0x5EED1FF0, 0x5EED1FF4, |
| @@ -257,6 +270,8 @@ PIXEL_BITS = {"ps_clip_color": (0x3e800000, 0x3f000000, 0x3f400000, 0x3f800000), | |||
| 257 | "ps_vcmpx_forms": (0xf05b2a48, 0xf05e8a12, 0xb174be18, 0x15550000), | 270 | "ps_vcmpx_forms": (0xf05b2a48, 0xf05e8a12, 0xb174be18, 0x15550000), |
| 258 | "ps_med3_mods": (0x3f800000, 0x40400000, 0x40c00000, 0x3f400000), | 271 | "ps_med3_mods": (0x3f800000, 0x40400000, 0x40c00000, 0x3f400000), |
| 259 | "ps_scc_minmax": (0x00030205, 0x00030207, 0x00030209, 0x00030203), | 272 | "ps_scc_minmax": (0x00030205, 0x00030207, 0x00030209, 0x00030203), |
| 273 | "ps_scc_logic32": (0x0fff0fff, 0x000f000f, 0xf00ff00f, 0x36), | ||
| 274 | "ps_scc_logic64": (0x0fff0fff, 0xff000000, 0xff0000ff, 0x16), | ||
| 260 | "ps_fma_literal": (0x41b80000, 0x41800000, 0x40e00000, 0x41a40000), | 275 | "ps_fma_literal": (0x41b80000, 0x41800000, 0x40e00000, 0x41a40000), |
| 261 | "ps_f64_mods": (0x40040000, 0x3ff00000, 0x3fe40000, 0x3ff00000), | 276 | "ps_f64_mods": (0x40040000, 0x3ff00000, 0x3fe40000, 0x3ff00000), |
| 262 | # f16 op_sel, partial writes, inline constants: words measured on RDNA2 hardware (.asm headers) | 277 | # f16 op_sel, partial writes, inline constants: words measured on RDNA2 hardware (.asm headers) |
| @@ -316,7 +331,8 @@ CLIP_TESTS = ("vs_clip", "vs_clip_param4", "vs_clip_undeclared") | |||
| 316 | # One definition: a later assignment used to drop ps_texoff (and any entry added by an earlier assignment) from | 331 | # One definition: a later assignment used to drop ps_texoff (and any entry added by an earlier assignment) from |
| 317 | # the standalone run. Keep every pixel fixture in this tuple. | 332 | # the standalone run. Keep every pixel fixture in this tuple. |
| 318 | PIXEL_TESTS = sorted((*PIXEL_BITS, "ps_bary", "ps_flat", "ps_bitmask_perm", "ps_texoff", "ps_texoff_implicit", | 333 | PIXEL_TESTS = sorted((*PIXEL_BITS, "ps_bary", "ps_flat", "ps_bitmask_perm", "ps_texoff", "ps_texoff_implicit", |
| 319 | "ps_uniform_branch", "ps_wqm", "ps_scc_mask32", "ps_interp_f16_high", "ps_ij_computed")) | 334 | "ps_uniform_branch", "ps_wqm", "ps_scc_mask32", "ps_interp_f16_high", "ps_ij_computed", |
| 335 | "ps_mandelbrot")) | ||
| 320 | # Pixel fixtures drawn with another vertex shader than vs_ids. | 336 | # Pixel fixtures drawn with another vertex shader than vs_ids. |
| 321 | PIXEL_VERTEX = {"ps_interp_f16_high": "vs_f16_pack", | 337 | PIXEL_VERTEX = {"ps_interp_f16_high": "vs_f16_pack", |
| 322 | "ps_interp_f32_mods": "vs_interp_consts", "ps_interp_mov_mods": "vs_interp_consts"} | 338 | "ps_interp_f32_mods": "vs_interp_consts", "ps_interp_mov_mods": "vs_interp_consts"} |
| @@ -465,6 +481,12 @@ def fmt_xy_xyz_test(tools, spirv, env=None): | |||
| 465 | return dump_test(tools, spirv, "cs_fmt_xy_xyz", FMT_XY_XYZ_WORDS + [0xEEEEEEEE] * 44, 192, env) | 481 | return dump_test(tools, spirv, "cs_fmt_xy_xyz", FMT_XY_XYZ_WORDS + [0xEEEEEEEE] * 44, 192, env) |
| 466 | 482 | ||
| 467 | 483 | ||
| 484 | def tbuffer_store_test(tools, spirv, env=None): | ||
| 485 | """The 52 region words tbuffer_store_format_* leaves and the untouched words after them, up to the regions at | ||
| 486 | 0x200. The heap needs 0x2d0 bytes, so it is 192 words.""" | ||
| 487 | return dump_test(tools, spirv, "cs_tbuffer_store", TBUFFER_STORE_WORDS + [0xEEEEEEEE] * 76, 192, env) | ||
| 488 | |||
| 489 | |||
| 468 | class Skip(str): | 490 | class Skip(str): |
| 469 | """A result that is neither a pass nor a failure: the device can't run the test.""" | 491 | """A result that is neither a pass nor a failure: the device can't run the test.""" |
| 470 | 492 | ||
| @@ -659,6 +681,8 @@ def cvt_f32_sat_test(tools, spirv): | |||
| 659 | for bits, unsigned, signed in CVT_F32_SAT_CASES: | 681 | for bits, unsigned, signed in CVT_F32_SAT_CASES: |
| 660 | problem = compute_test(tools, spirv, "cs_cvt_f32_sat", "1", "dump", expected_words=[unsigned, signed], | 682 | problem = compute_test(tools, spirv, "cs_cvt_f32_sat", "1", "dump", expected_words=[unsigned, signed], |
| 661 | env={"VKC_SGPRS": f"{bits:#010x}"}) | 683 | env={"VKC_SGPRS": f"{bits:#010x}"}) |
| 684 | if problem is None or isinstance(problem, Skip): | ||
| 685 | return problem # the device can't run it as recorded (wave size not pinnable): the same for every input | ||
| 662 | if problem: | 686 | if problem: |
| 663 | wrong.append(f"{bits:#010x}: {problem}") | 687 | wrong.append(f"{bits:#010x}: {problem}") |
| 664 | return f"{len(wrong)} of {len(CVT_F32_SAT_CASES)} inputs wrong, first {wrong[0]}" if wrong else "" | 688 | return f"{len(wrong)} of {len(CVT_F32_SAT_CASES)} inputs wrong, first {wrong[0]}" if wrong else "" |
| @@ -707,9 +731,10 @@ def subgroup_size(spirv, name): | |||
| 707 | return None | 731 | return None |
| 708 | 732 | ||
| 709 | 733 | ||
| 710 | def bindless_test(tools, spirv): | 734 | def bindless_test(tools, spirv, pixel="ps_tex"): |
| 711 | """ps_tex: a texture found through the descriptor hash table and the bindless set (vk_bindless_test).""" | 735 | """ps_tex: a texture found through the descriptor hash table and the bindless set (vk_bindless_test). |
| 712 | shaders = [os.path.join(spirv, name + ".spv") for name in ("vs_ids", "ps_tex")] | 736 | ps_imgatomic: image atomics in a pixel shader through the set's r32ui storage arrays, checked per texel.""" |
| 737 | shaders = [os.path.join(spirv, name + ".spv") for name in ("vs_ids", pixel)] | ||
| 713 | for path in shaders: | 738 | for path in shaders: |
| 714 | if not os.path.isfile(path): | 739 | if not os.path.isfile(path): |
| 715 | return f"missing {os.path.basename(path)}" | 740 | return f"missing {os.path.basename(path)}" |
| @@ -717,6 +742,9 @@ def bindless_test(tools, spirv): | |||
| 717 | if code == UNSUPPORTED: | 742 | if code == UNSUPPORTED: |
| 718 | m = re.search(r"unsupported: .*", out) | 743 | m = re.search(r"unsupported: .*", out) |
| 719 | return Skip(f"SKIP ({m.group(0) if m else 'unsupported device'})") | 744 | return Skip(f"SKIP ({m.group(0) if m else 'unsupported device'})") |
| 745 | if pixel == "ps_imgatomic": | ||
| 746 | m = re.search(r"ps_imgatomic: (\d+) of \d+ texels wrong.*; (\d+) of \d+ render-target pixels wrong", out) | ||
| 747 | return "" if code == 0 and m and m.group(1) == "0" and m.group(2) == "0" else failure(code, out, 3) | ||
| 720 | m = re.search(r"(\d+) draws read back, (\d+) bad pixels", out) | 748 | m = re.search(r"(\d+) draws read back, (\d+) bad pixels", out) |
| 721 | return "" if code == 0 and m and m.group(2) == "0" else failure(code, out, 3) | 749 | return "" if code == 0 and m and m.group(2) == "0" else failure(code, out, 3) |
| 722 | 750 | ||
| @@ -1098,6 +1126,46 @@ def wide_pixel_skip(name, out): | |||
| 1098 | return Skip(f"SKIP (this device cannot require a {want}-wide fragment subgroup{seen})") | 1126 | return Skip(f"SKIP (this device cannot require a {want}-wide fragment subgroup{seen})") |
| 1099 | 1127 | ||
| 1100 | 1128 | ||
| 1129 | def f32(x): | ||
| 1130 | """x rounded to the nearest float32. One double add or multiply of two float32 values, then this, is the exact | ||
| 1131 | IEEE float32 result, so a model built from it matches the GPU bit for bit.""" | ||
| 1132 | return struct.unpack("<f", struct.pack("<f", x))[0] | ||
| 1133 | |||
| 1134 | |||
| 1135 | def mandelbrot_counts(w): | ||
| 1136 | """ps_mandelbrot.asm's iteration counts over a w x w frame, in the shader's order of float32 operations.""" | ||
| 1137 | counts = [] | ||
| 1138 | for y in range(w): | ||
| 1139 | cy = f32(f32(3.0 * f32((y + 0.5) / w)) - 1.5) | ||
| 1140 | for x in range(w): | ||
| 1141 | cx = f32(f32(3.0 * f32((x + 0.5) / w)) - 2.25) | ||
| 1142 | zx = zy = 0.0 | ||
| 1143 | n = 0 | ||
| 1144 | while n < 64: | ||
| 1145 | zx2, zy2 = f32(zx * zx), f32(zy * zy) | ||
| 1146 | if not 4.0 >= f32(zx2 + zy2): | ||
| 1147 | break | ||
| 1148 | xy = f32(zx * zy) | ||
| 1149 | zx, zy = f32(f32(zx2 - zy2) + cx), f32(f32(xy + xy) + cy) | ||
| 1150 | n += 1 | ||
| 1151 | counts.append(n) | ||
| 1152 | return counts | ||
| 1153 | |||
| 1154 | |||
| 1155 | def mandelbrot_problem(px): | ||
| 1156 | """ps_mandelbrot: channel 3 is the lane's iteration count. A lane that leaves EXEC too early or late, or a loop | ||
| 1157 | that ends on the wrong branch, changes counts; the colour channels are only for looking at the frame.""" | ||
| 1158 | w = int(len(px) ** 0.5) | ||
| 1159 | if w * w != len(px): | ||
| 1160 | return f"{len(px)} pixels is not a square frame" | ||
| 1161 | want = mandelbrot_counts(w) | ||
| 1162 | wrong = [(i, p[3], e) for i, (p, e) in enumerate(zip(px, want)) if p[3] != e] | ||
| 1163 | if not wrong: | ||
| 1164 | return "" | ||
| 1165 | i, got, e = wrong[0] | ||
| 1166 | return f"{len(wrong)} of {len(px)} iteration counts differ, e.g. pixel ({i % w}, {i // w}) {got} instead of {e}" | ||
| 1167 | |||
| 1168 | |||
| 1101 | def pixel_test(tools, spirv, name): | 1169 | def pixel_test(tools, spirv, name): |
| 1102 | path = os.path.join(spirv, name + ".spv") | 1170 | path = os.path.join(spirv, name + ".spv") |
| 1103 | if name == "ps_ij_computed" and (BARY_FALLBACK or F16_HALVES): | 1171 | if name == "ps_ij_computed" and (BARY_FALLBACK or F16_HALVES): |
| @@ -1164,6 +1232,8 @@ def pixel_test(tools, spirv, name): | |||
| 1164 | c = collections.Counter((a, b) for a, b, _, _ in px) | 1232 | c = collections.Counter((a, b) for a, b, _, _ in px) |
| 1165 | fine = c[(8, 1)] and c[(8, 0)] and c[(7, 0)] and set(c) <= {(8, 1), (8, 0), (7, 0)} | 1233 | fine = c[(8, 1)] and c[(8, 0)] and c[(7, 0)] and set(c) <= {(8, 1), (8, 0), (7, 0)} |
| 1166 | return "" if fine else f"(s5, bit) counts {dict(c)}" | 1234 | return "" if fine else f"(s5, bit) counts {dict(c)}" |
| 1235 | if name == "ps_mandelbrot": | ||
| 1236 | return mandelbrot_problem(px) | ||
| 1167 | return "no check written for this shader" | 1237 | return "no check written for this shader" |
| 1168 | 1238 | ||
| 1169 | 1239 | ||
| @@ -1217,6 +1287,7 @@ def main(): | |||
| 1217 | results.append(("cs_fmt_1010102", fmt_1010102_test(tools, spirv))) | 1287 | results.append(("cs_fmt_1010102", fmt_1010102_test(tools, spirv))) |
| 1218 | results.append(("cs_fmt_sint32", fmt_sint32_test(tools, spirv))) | 1288 | results.append(("cs_fmt_sint32", fmt_sint32_test(tools, spirv))) |
| 1219 | results.append(("cs_fmt_xy_xyz", fmt_xy_xyz_test(tools, spirv))) | 1289 | results.append(("cs_fmt_xy_xyz", fmt_xy_xyz_test(tools, spirv))) |
| 1290 | results.append(("cs_tbuffer_store", tbuffer_store_test(tools, spirv))) | ||
| 1220 | for name, groups, want in GLOBAL_OFFSET: | 1291 | for name, groups, want in GLOBAL_OFFSET: |
| 1221 | results.append((name, compute_test(tools, spirv, name, groups, "dump", expected_words=want))) | 1292 | results.append((name, compute_test(tools, spirv, name, groups, "dump", expected_words=want))) |
| 1222 | results.append(("cs_user_sgprs", compute_test(tools, spirv, "cs_user_sgprs", "1", "dump", | 1293 | results.append(("cs_user_sgprs", compute_test(tools, spirv, "cs_user_sgprs", "1", "dump", |
| @@ -1254,6 +1325,7 @@ def main(): | |||
| 1254 | results.append((name, texture_constant_test(tools, spirv, name))) | 1325 | results.append((name, texture_constant_test(tools, spirv, name))) |
| 1255 | results.append(("ps_tex", bindless_test(tools, spirv))) | 1326 | results.append(("ps_tex", bindless_test(tools, spirv))) |
| 1256 | results.append(("ps_ssharp", sampler_test(tools, spirv))) | 1327 | results.append(("ps_ssharp", sampler_test(tools, spirv))) |
| 1328 | results.append(("ps_imgatomic", bindless_test(tools, spirv, "ps_imgatomic"))) | ||
| 1257 | for name in MIP_TEST_PASSES: | 1329 | for name in MIP_TEST_PASSES: |
| 1258 | results.append((name, texture_mip_test(tools, spirv, name))) | 1330 | results.append((name, texture_mip_test(tools, spirv, name))) |
| 1259 | for name in GRADIENT_TESTS: | 1331 | for name in GRADIENT_TESTS: |
diff --git a/runtime/test/shaders/cs_buf_counter.asm b/runtime/test/shaders/cs_buf_counter.asm new file mode 100644 index 000000000..9bbe84bea --- /dev/null +++ b/runtime/test/shaders/cs_buf_counter.asm | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | ; group: 64,1,1 | ||
| 2 | ; rsrc2: 0x808c | ||
| 3 | ; fssm-at: 0x150 | ||
| 4 | ; fssm-data: 0x4e554f43 0x3d524554 | ||
| 5 | ; UAV counters (D3D12 CreateUnorderedAccessView with pCounterResource): AppendStructuredBuffer and | ||
| 6 | ; ConsumeStructuredBuffer as hand-written RDNA2, the way docs/d3d12_vulkan.md section 3.4 describes the contract: | ||
| 7 | ; the counter is a second, raw 4-byte V# in the upper 16 bytes of the view's descriptor slot, and append and consume | ||
| 8 | ; are buffer atomics on it. Run: d3d12_buffer_uav_test (a compute PSO found by the SHA-256 of its synthetic FSSM header). | ||
| 9 | ; The branch skips the 10 dwords of the append path (checked with llvm-mc -show-encoding). | ||
| 10 | ; User data, from the root signature: [0] four 32-bit constants, [1] a descriptor table of six UAVs, TGID_X in s6: | ||
| 11 | ; s0 = mode: 0 append, 1 consume s[4:5] = console VA of the table's first slot (32 bytes a slot) | ||
| 12 | ; slot 0 (+0x00): V#, structured buffer, stride 8, 256 records; the counter V# in +0x10 (raw, 4 bytes) | ||
| 13 | ; slot 1 (+0x20): V#, raw buffer, 128 records of 8 bytes (written by consume) | ||
| 14 | ; g = 64 * group + lane | ||
| 15 | ; append: i = counter++ (buffer_atomic_add, glc returns the old value); record i = { g, g * 3 + 1 } | ||
| 16 | ; consume: i = --counter (the old value of buffer_atomic_sub, minus one); out[g] = record i | ||
| 17 | s_load_dwordx8 s[8:15], s[4:5], 0x0 | ||
| 18 | s_load_dwordx4 s[16:19], s[4:5], 0x20 | ||
| 19 | s_lshl_b32 s7, s6, 6 | ||
| 20 | s_waitcnt lgkmcnt(0) | ||
| 21 | v_add_nc_u32_e32 v1, s7, v0 | ||
| 22 | v_mov_b32_e32 v2, 1 | ||
| 23 | s_cmp_eq_u32 s0, 0 | ||
| 24 | s_cbranch_scc0 10 | ||
| 25 | buffer_atomic_add v2, off, s[12:15], 0 glc | ||
| 26 | s_waitcnt vmcnt(0) | ||
| 27 | v_mul_lo_u32 v6, v1, 3 | ||
| 28 | v_add_nc_u32_e32 v6, 1, v6 | ||
| 29 | v_mov_b32_e32 v5, v1 | ||
| 30 | buffer_store_dwordx2 v[5:6], v2, s[8:11], 0 idxen | ||
| 31 | s_endpgm | ||
| 32 | ; consume: | ||
| 33 | buffer_atomic_sub v2, off, s[12:15], 0 glc | ||
| 34 | s_waitcnt vmcnt(0) | ||
| 35 | v_add_nc_u32_e32 v2, -1, v2 | ||
| 36 | buffer_load_dwordx2 v[5:6], v2, s[8:11], 0 idxen | ||
| 37 | s_waitcnt vmcnt(0) | ||
| 38 | v_lshlrev_b32_e32 v7, 3, v1 | ||
| 39 | buffer_store_dwordx2 v[5:6], v7, s[16:19], 0 offen | ||
| 40 | s_endpgm | ||
diff --git a/runtime/test/shaders/cs_buf_typed.asm b/runtime/test/shaders/cs_buf_typed.asm new file mode 100644 index 000000000..b101343e8 --- /dev/null +++ b/runtime/test/shaders/cs_buf_typed.asm | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | ; group: 64,1,1 | ||
| 2 | ; rsrc2: 0x808c | ||
| 3 | ; fssm-at: 0x150 | ||
| 4 | ; fssm-data: 0x44505954 0x3d424655 | ||
| 5 | ; Typed buffer UAVs (D3D12 CreateUnorderedAccessView with a Format on a BUFFER view): hand-written RDNA2 the way a | ||
| 6 | ; translated `RWBuffer<T>` shader reads and writes them. Run: d3d12_buffer_uav_test (a compute PSO found by the | ||
| 7 | ; SHA-256 of its synthetic FSSM header, as for the other cs_ shaders). | ||
| 8 | ; User data, from the root signature: [0] four 32-bit constants, [1] a descriptor table of six UAVs. RSRC2 0x808c = | ||
| 9 | ; six user SGPRs and TGID_X, so the group index is s6: | ||
| 10 | ; s0 = seed s1 = multiplier s[4:5] = console VA of the table's first slot (a slot is 32 bytes, a V# in its first 16) | ||
| 11 | ; slot 0 (+0x00): V#, typed R32_UINT, 240 elements of a 256-element buffer (written, then atomically added to) | ||
| 12 | ; slot 1 (+0x20): V#, typed R16G16B16A16_FLOAT, 256 elements (written) | ||
| 13 | ; slot 2 (+0x40): V#, typed R8G8B8A8_UNORM, 256 elements from element 16 of the buffer (written) | ||
| 14 | ; slot 3 (+0x60): V#, typed R32G32B32A32_UINT, 256 elements (written) | ||
| 15 | ; slot 4 (+0x80): V#, typed R32_FLOAT, 250 elements of a 256-element buffer (read) | ||
| 16 | ; slot 5 (+0xa0): V#, typed R32_SINT, 256 elements (written) | ||
| 17 | ; g = 64 * group + lane, 0..255 (an index past a view's NUM_RECORDS is out of range: a load gives 0, a store or an | ||
| 18 | ; atomic touches nothing): | ||
| 19 | ; slot 0: element g = g * mul + seed, then += g | ||
| 20 | ; slot 1: element g = { f16(g), f16(g + 0.5), f16(-1 - g), f16(0.25) } | ||
| 21 | ; slot 2: element g = unorm8 { (g & 255) / 255, (255 - (g & 255)) / 255, 0, 1 } | ||
| 22 | ; slot 3: element g = { g, g ^ 0xffff, g * 7, 0xa5 } | ||
| 23 | ; slot 5: element g = (int)(2 * input[g]), input[g] = g - 100.5 | ||
| 24 | s_load_dwordx4 s[8:11], s[4:5], 0x0 | ||
| 25 | s_load_dwordx4 s[12:15], s[4:5], 0x20 | ||
| 26 | s_load_dwordx4 s[16:19], s[4:5], 0x40 | ||
| 27 | s_load_dwordx4 s[20:23], s[4:5], 0x60 | ||
| 28 | s_load_dwordx4 s[24:27], s[4:5], 0x80 | ||
| 29 | s_load_dwordx4 s[28:31], s[4:5], 0xa0 | ||
| 30 | s_lshl_b32 s7, s6, 6 | ||
| 31 | s_waitcnt lgkmcnt(0) | ||
| 32 | v_add_nc_u32_e32 v1, s7, v0 | ||
| 33 | v_mul_lo_u32 v2, v1, s1 | ||
| 34 | v_add_nc_u32_e32 v2, s0, v2 | ||
| 35 | buffer_store_format_x v2, v1, s[8:11], 0 idxen | ||
| 36 | v_mov_b32_e32 v3, v1 | ||
| 37 | buffer_atomic_add v3, v1, s[8:11], 0 idxen | ||
| 38 | v_cvt_f32_u32_e32 v4, v1 | ||
| 39 | v_add_f32_e32 v5, 0.5, v4 | ||
| 40 | v_sub_f32_e32 v6, -1.0, v4 | ||
| 41 | v_mov_b32_e32 v7, 0x3e800000 | ||
| 42 | buffer_store_format_xyzw v[4:7], v1, s[12:15], 0 idxen | ||
| 43 | v_and_b32_e32 v8, 255, v1 | ||
| 44 | v_cvt_f32_ubyte0_e32 v9, v8 | ||
| 45 | v_mov_b32_e32 v10, 0x3b808081 | ||
| 46 | v_mul_f32_e32 v11, v9, v10 | ||
| 47 | v_sub_nc_u32_e32 v12, 255, v8 | ||
| 48 | v_cvt_f32_ubyte0_e32 v12, v12 | ||
| 49 | v_mul_f32_e32 v12, v12, v10 | ||
| 50 | v_mov_b32_e32 v13, 0 | ||
| 51 | v_mov_b32_e32 v14, 1.0 | ||
| 52 | buffer_store_format_xyzw v[11:14], v1, s[16:19], 0 idxen | ||
| 53 | v_mov_b32_e32 v15, v1 | ||
| 54 | v_xor_b32_e32 v16, 0xffff, v1 | ||
| 55 | v_mul_lo_u32 v17, v1, 7 | ||
| 56 | v_mov_b32_e32 v18, 0xa5 | ||
| 57 | buffer_store_format_xyzw v[15:18], v1, s[20:23], 0 idxen | ||
| 58 | buffer_load_format_x v19, v1, s[24:27], 0 idxen | ||
| 59 | s_waitcnt vmcnt(0) | ||
| 60 | v_add_f32_e32 v19, v19, v19 | ||
| 61 | v_cvt_i32_f32_e32 v19, v19 | ||
| 62 | buffer_store_format_x v19, v1, s[28:31], 0 idxen | ||
| 63 | s_endpgm | ||
diff --git a/runtime/test/shaders/cs_lds_b64_cmpst.asm b/runtime/test/shaders/cs_lds_b64_cmpst.asm new file mode 100644 index 000000000..0998d8576 --- /dev/null +++ b/runtime/test/shaders/cs_lds_b64_cmpst.asm | |||
| @@ -0,0 +1,132 @@ | |||
| 1 | ; GPU test for the two LDS families that docs/design.md lists as not GPU-verified: | ||
| 2 | ; ds_cmpst_b32 (the non-returning compare-and-store) and the b64 2-address forms | ||
| 3 | ; (ds_read2_b64 / ds_write2_b64 and their st64 variants). | ||
| 4 | ; | ||
| 5 | ; LDS 4 KiB (RSRC2 0x40088), group 32x1x1, only lane 0 runs. The output words are | ||
| 6 | ; derived from the RDNA2 ISA's 2-address and DS_CMPST_B32 pseudocode: | ||
| 7 | ; | ||
| 8 | ; out[0..3] ds_write2_b64 then ds_read2_b64 at base 0x20, offset0:1 offset1:3, | ||
| 9 | ; writes A at 0x28 and B at 0x38 (unit 8), reads the same two elements: | ||
| 10 | ; A.lo A.hi B.lo B.hi | ||
| 11 | ; out[4] ds_read2st64_b64 at base 0x100, offset0:0 offset1:1 (unit 512): | ||
| 12 | ; XOR of the four dwords seeded at 0x100 and 0x300 | ||
| 13 | ; out[5] ds_write2st64_b64 at base 0x100, offset0:0 offset1:1, then plain | ||
| 14 | ; ds_read_b32 at 0x100/0x104/0x300/0x304: XOR of the four dwords | ||
| 15 | ; out[6] ds_read2_b64 v[2:5], v2 at base 0x200 (vdst overlaps vaddr): the | ||
| 16 | ; second element's low dword, 0xBBBB000B, read before v2 is overwritten | ||
| 17 | ; out[7] ds_cmpst_b32 hit (mem 0x13572468 -> 0x2468ABCD) XOR the miss case's | ||
| 18 | ; unchanged word (0x11111111): 0x3579BADC | ||
| 19 | ; | ||
| 20 | ; Run: vk_compute_test cs_lds_b64_cmpst.spv 1 dump | ||
| 21 | ; -> out[0..7] = 0x11110001 0x22220002 0x33330003 0x44440004 | ||
| 22 | ; 0xCCCC000C 0x44440004 0xBBBB000B 0x3579BADC | ||
| 23 | ; rsrc2: 0x40088 | ||
| 24 | ; group: 32,1,1 | ||
| 25 | ; mattr: +wavefrontsize32,-wavefrontsize64 | ||
| 26 | v_cmpx_eq_u32_e32 0, v0 | ||
| 27 | |||
| 28 | ; --- ds_write2_b64 / ds_read2_b64, unit 8 bytes --- | ||
| 29 | v_mov_b32_e32 v2, 0x20 | ||
| 30 | v_mov_b32_e32 v4, 0x11110001 | ||
| 31 | v_mov_b32_e32 v5, 0x22220002 | ||
| 32 | v_mov_b32_e32 v6, 0x33330003 | ||
| 33 | v_mov_b32_e32 v7, 0x44440004 | ||
| 34 | ds_write2_b64 v2, v[4:5], v[6:7] offset0:1 offset1:3 | ||
| 35 | s_waitcnt lgkmcnt(0) | ||
| 36 | ds_read2_b64 v[10:13], v2 offset0:1 offset1:3 | ||
| 37 | s_waitcnt lgkmcnt(0) | ||
| 38 | v_mov_b32_e32 v21, 0 | ||
| 39 | buffer_store_dword v10, v21, s[0:3], 0 offen | ||
| 40 | v_mov_b32_e32 v21, 4 | ||
| 41 | buffer_store_dword v11, v21, s[0:3], 0 offen | ||
| 42 | v_mov_b32_e32 v21, 8 | ||
| 43 | buffer_store_dword v12, v21, s[0:3], 0 offen | ||
| 44 | v_mov_b32_e32 v21, 12 | ||
| 45 | buffer_store_dword v13, v21, s[0:3], 0 offen | ||
| 46 | |||
| 47 | ; --- ds_read2st64_b64, unit 512 bytes: seed 0x100 and 0x300 --- | ||
| 48 | v_mov_b32_e32 v1, 0x100 | ||
| 49 | v_mov_b32_e32 v3, 0x55550005 | ||
| 50 | ds_write_b32 v1, v3 | ||
| 51 | v_mov_b32_e32 v1, 0x104 | ||
| 52 | v_mov_b32_e32 v3, 0x66660006 | ||
| 53 | ds_write_b32 v1, v3 | ||
| 54 | v_mov_b32_e32 v1, 0x300 | ||
| 55 | v_mov_b32_e32 v3, 0x77770007 | ||
| 56 | ds_write_b32 v1, v3 | ||
| 57 | v_mov_b32_e32 v1, 0x304 | ||
| 58 | v_mov_b32_e32 v3, 0x88880008 | ||
| 59 | ds_write_b32 v1, v3 | ||
| 60 | s_waitcnt lgkmcnt(0) | ||
| 61 | v_mov_b32_e32 v2, 0x100 | ||
| 62 | ds_read2st64_b64 v[10:13], v2 offset0:0 offset1:1 | ||
| 63 | s_waitcnt lgkmcnt(0) | ||
| 64 | v_xor_b32_e32 v14, v10, v11 | ||
| 65 | v_xor_b32_e32 v14, v14, v12 | ||
| 66 | v_xor_b32_e32 v14, v14, v13 | ||
| 67 | v_mov_b32_e32 v21, 16 | ||
| 68 | buffer_store_dword v14, v21, s[0:3], 0 offen | ||
| 69 | |||
| 70 | ; --- ds_write2st64_b64, unit 512 bytes: A at 0x100, B at 0x300 --- | ||
| 71 | v_mov_b32_e32 v2, 0x100 | ||
| 72 | ds_write2st64_b64 v2, v[4:5], v[6:7] offset0:0 offset1:1 | ||
| 73 | s_waitcnt lgkmcnt(0) | ||
| 74 | v_mov_b32_e32 v1, 0x100 | ||
| 75 | ds_read_b32 v10, v1 | ||
| 76 | v_mov_b32_e32 v1, 0x104 | ||
| 77 | ds_read_b32 v11, v1 | ||
| 78 | v_mov_b32_e32 v1, 0x300 | ||
| 79 | ds_read_b32 v12, v1 | ||
| 80 | v_mov_b32_e32 v1, 0x304 | ||
| 81 | ds_read_b32 v13, v1 | ||
| 82 | s_waitcnt lgkmcnt(0) | ||
| 83 | v_xor_b32_e32 v15, v10, v11 | ||
| 84 | v_xor_b32_e32 v15, v15, v12 | ||
| 85 | v_xor_b32_e32 v15, v15, v13 | ||
| 86 | v_mov_b32_e32 v21, 20 | ||
| 87 | buffer_store_dword v15, v21, s[0:3], 0 offen | ||
| 88 | |||
| 89 | ; --- ds_read2_b64 with vdst overlapping vaddr: v[2:5] <- base v2 --- | ||
| 90 | v_mov_b32_e32 v1, 0x200 | ||
| 91 | v_mov_b32_e32 v3, 0x99990009 | ||
| 92 | ds_write_b32 v1, v3 | ||
| 93 | v_mov_b32_e32 v1, 0x204 | ||
| 94 | v_mov_b32_e32 v3, 0xAAAA000A | ||
| 95 | ds_write_b32 v1, v3 | ||
| 96 | v_mov_b32_e32 v1, 0x208 | ||
| 97 | v_mov_b32_e32 v3, 0xBBBB000B | ||
| 98 | ds_write_b32 v1, v3 | ||
| 99 | v_mov_b32_e32 v1, 0x20C | ||
| 100 | v_mov_b32_e32 v3, 0xCCCC000C | ||
| 101 | ds_write_b32 v1, v3 | ||
| 102 | s_waitcnt lgkmcnt(0) | ||
| 103 | v_mov_b32_e32 v2, 0x200 | ||
| 104 | ds_read2_b64 v[2:5], v2 offset0:0 offset1:1 | ||
| 105 | s_waitcnt lgkmcnt(0) | ||
| 106 | v_mov_b32_e32 v21, 24 | ||
| 107 | buffer_store_dword v4, v21, s[0:3], 0 offen | ||
| 108 | |||
| 109 | ; --- ds_cmpst_b32: hit at 0x400, miss at 0x404 --- | ||
| 110 | v_mov_b32_e32 v1, 0x400 | ||
| 111 | v_mov_b32_e32 v3, 0x13572468 | ||
| 112 | ds_write_b32 v1, v3 | ||
| 113 | v_mov_b32_e32 v1, 0x404 | ||
| 114 | v_mov_b32_e32 v3, 0x11111111 | ||
| 115 | ds_write_b32 v1, v3 | ||
| 116 | s_waitcnt lgkmcnt(0) | ||
| 117 | v_mov_b32_e32 v1, 0x400 | ||
| 118 | v_mov_b32_e32 v3, 0x13572468 | ||
| 119 | v_mov_b32_e32 v4, 0x2468ABCD | ||
| 120 | ds_cmpst_b32 v1, v3, v4 | ||
| 121 | s_waitcnt lgkmcnt(0) | ||
| 122 | ds_read_b32 v10, v1 | ||
| 123 | v_mov_b32_e32 v1, 0x404 | ||
| 124 | v_mov_b32_e32 v3, 0 | ||
| 125 | v_mov_b32_e32 v4, 0xFFFFFFFF | ||
| 126 | ds_cmpst_b32 v1, v3, v4 | ||
| 127 | s_waitcnt lgkmcnt(0) | ||
| 128 | ds_read_b32 v11, v1 | ||
| 129 | v_xor_b32_e32 v16, v10, v11 | ||
| 130 | v_mov_b32_e32 v21, 28 | ||
| 131 | buffer_store_dword v16, v21, s[0:3], 0 offen | ||
| 132 | s_endpgm | ||
diff --git a/runtime/test/shaders/cs_m4_fill.asm b/runtime/test/shaders/cs_m4_fill.asm new file mode 100644 index 000000000..1af46dac9 --- /dev/null +++ b/runtime/test/shaders/cs_m4_fill.asm | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | ; group: 64,1,1 | ||
| 2 | ; rsrc2: 0x808c | ||
| 3 | ; fssm-at: 0x150 | ||
| 4 | ; fssm-data: 0x4c4c4946 0x3d344d5f | ||
| 5 | ; M4 compute shader 1: fills a structured UAV buffer and a typed UAV image from a raw input buffer, and writes the | ||
| 6 | ; arguments of the next (indirect) dispatch. Run: d3d12_m4_compute_test (a compute PSO found by the SHA-256 of its | ||
| 7 | ; synthetic FSSM header, as for the other cs_ shaders). | ||
| 8 | ; User data, from the root signature: [0] four 32-bit constants, [1] a descriptor table of five UAVs. RSRC2 0x808c = | ||
| 9 | ; six user SGPRs and TGID_X, so the group index is s6: | ||
| 10 | ; s0 = seed s1 = multiplier s2 = group count of the indirect dispatch s3 = unused | ||
| 11 | ; s[4:5] = console VA of the table's first slot. A slot is 32 bytes: a V# in its first 16 bytes or a T# in all 32. | ||
| 12 | ; slot 0 (+0x00): V#, structured buffer, stride 16, 256 records (written) | ||
| 13 | ; slot 1 (+0x20): V#, raw buffer, the arguments of the indirect dispatch (written) | ||
| 14 | ; slot 2 (+0x40): T#, 16x16 R32_UINT image (written) | ||
| 15 | ; slot 3 (+0x60): V#, raw buffer, 256 input words (read) | ||
| 16 | ; slot 4 (+0x80): V#, raw buffer, the second shader's output (not used here) | ||
| 17 | ; g = 64 * group + lane, 0..255: in = input[g] | ||
| 18 | ; record g = { in + seed, g * mul, in ^ (g << 8), rotr(in, 13) } | ||
| 19 | ; image(x = g & 15, y = g >> 4) = in * 3 + x * 0x10001 + y | ||
| 20 | ; g == 0 also writes the arguments { s2, 1, 1, 0xc0de0001 } | ||
| 21 | s_load_dwordx4 s[8:11], s[4:5], 0x0 | ||
| 22 | s_load_dwordx4 s[12:15], s[4:5], 0x20 | ||
| 23 | s_load_dwordx8 s[16:23], s[4:5], 0x40 | ||
| 24 | s_load_dwordx4 s[24:27], s[4:5], 0x60 | ||
| 25 | s_lshl_b32 s7, s6, 6 | ||
| 26 | s_waitcnt lgkmcnt(0) | ||
| 27 | v_add_nc_u32_e32 v1, s7, v0 | ||
| 28 | v_lshlrev_b32_e32 v2, 2, v1 | ||
| 29 | buffer_load_dword v3, v2, s[24:27], 0 offen | ||
| 30 | s_waitcnt vmcnt(0) | ||
| 31 | v_add_nc_u32_e32 v4, s0, v3 | ||
| 32 | v_mul_lo_u32 v5, v1, s1 | ||
| 33 | v_lshlrev_b32_e32 v6, 8, v1 | ||
| 34 | v_xor_b32_e32 v6, v3, v6 | ||
| 35 | v_alignbit_b32 v7, v3, v3, 13 | ||
| 36 | buffer_store_dwordx4 v[4:7], v1, s[8:11], 0 idxen | ||
| 37 | v_and_b32_e32 v8, 15, v1 | ||
| 38 | v_lshrrev_b32_e32 v9, 4, v1 | ||
| 39 | v_mul_u32_u24_e32 v10, 0x10001, v8 | ||
| 40 | v_mul_lo_u32 v11, v3, 3 | ||
| 41 | v_add_nc_u32_e32 v10, v10, v11 | ||
| 42 | v_add_nc_u32_e32 v10, v10, v9 | ||
| 43 | image_store v10, v[8:9], s[16:23] dmask:0x1 dim:SQ_RSRC_IMG_2D unorm | ||
| 44 | v_cmpx_eq_u32_e32 0, v1 | ||
| 45 | v_mov_b32_e32 v12, 0 | ||
| 46 | v_mov_b32_e32 v13, s2 | ||
| 47 | v_mov_b32_e32 v14, 1 | ||
| 48 | v_mov_b32_e32 v15, 1 | ||
| 49 | v_mov_b32_e32 v16, 0xc0de0001 | ||
| 50 | buffer_store_dwordx4 v[13:16], v12, s[12:15], 0 offen | ||
| 51 | s_endpgm | ||
diff --git a/runtime/test/shaders/cs_m4_indirect.asm b/runtime/test/shaders/cs_m4_indirect.asm new file mode 100644 index 000000000..8a23596bf --- /dev/null +++ b/runtime/test/shaders/cs_m4_indirect.asm | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | ; group: 64,1,1 | ||
| 2 | ; rsrc2: 0x808c | ||
| 3 | ; fssm-at: 0x150 | ||
| 4 | ; fssm-data: 0x44444e49 0x3d344d5f | ||
| 5 | ; M4 compute shader 2: runs under ExecuteIndirect with the arguments cs_m4_fill wrote ({ groups, 1, 1 }), reads the | ||
| 6 | ; structured buffer and the image the first dispatch wrote, and writes a raw output buffer. Run: | ||
| 7 | ; d3d12_m4_compute_test. Same root signature, user data and table as cs_m4_fill (see there): | ||
| 8 | ; slot 0: structured buffer (read) slot 2: R32_UINT image (read, image_load) slot 4: raw output (written) | ||
| 9 | ; g = 64 * group + lane; t = image(g & 15, g >> 4); record g = { w0, w1, w2, w3 } | ||
| 10 | ; out[g] = { (w0 + t) ^ w3, (w2 ^ t) + w1 } at byte offset 8 * g | ||
| 11 | s_load_dwordx4 s[8:11], s[4:5], 0x0 | ||
| 12 | s_load_dwordx8 s[16:23], s[4:5], 0x40 | ||
| 13 | s_load_dwordx4 s[12:15], s[4:5], 0x80 | ||
| 14 | s_lshl_b32 s7, s6, 6 | ||
| 15 | s_waitcnt lgkmcnt(0) | ||
| 16 | v_add_nc_u32_e32 v1, s7, v0 | ||
| 17 | buffer_load_dwordx4 v[4:7], v1, s[8:11], 0 idxen | ||
| 18 | v_and_b32_e32 v8, 15, v1 | ||
| 19 | v_lshrrev_b32_e32 v9, 4, v1 | ||
| 20 | image_load v10, v[8:9], s[16:23] dmask:0x1 dim:SQ_RSRC_IMG_2D unorm | ||
| 21 | s_waitcnt vmcnt(0) | ||
| 22 | v_add_nc_u32_e32 v11, v4, v10 | ||
| 23 | v_xor_b32_e32 v11, v11, v7 | ||
| 24 | v_xor_b32_e32 v12, v6, v10 | ||
| 25 | v_add_nc_u32_e32 v12, v12, v5 | ||
| 26 | v_lshlrev_b32_e32 v13, 3, v1 | ||
| 27 | buffer_store_dwordx2 v[11:12], v13, s[12:15], 0 offen | ||
| 28 | s_endpgm | ||
diff --git a/runtime/test/shaders/cs_tbuffer_store.asm b/runtime/test/shaders/cs_tbuffer_store.asm new file mode 100644 index 000000000..a6e0e78e5 --- /dev/null +++ b/runtime/test/shaders/cs_tbuffer_store.asm | |||
| @@ -0,0 +1,275 @@ | |||
| 1 | ; tbuffer_store_format_* and its d16 forms. Every expected word was measured by running this body natively on a Radeon | ||
| 2 | ; 680M (gfx1035, RDNA2) through tools/hw_oracle's kernel wrapper, with s[0:3] set to the V# vk_compute_test passes; | ||
| 3 | ; wave32 and wave64 gave the same 52 words. One thread runs. | ||
| 4 | ; - The instruction's format replaces the V#'s, for the encoding, the element size and the bounds check alike. No | ||
| 5 | ; format modifier means GFX10's default, BUF_FMT_8_UNORM: one byte, its neighbours kept. | ||
| 6 | ; - A store writes its format's whole element: components the format has but the instruction doesn't give are 0 | ||
| 7 | ; (xy into 16_16_16_16 leaves z = w = 0); components the format doesn't have are dropped (xyzw into 32_32 writes | ||
| 8 | ; x, y; into 32 only x). | ||
| 9 | ; - d16 data is two 16-bit values per VGPR, low half first. | ||
| 10 | ; - Bounds (OOB_SELECT 3): the instruction's element must end inside num_records. With NR 0x298, an xy store of a | ||
| 11 | ; 16-byte element at 0x290 writes nothing, though a V# that says 32_FLOAT has a 4-byte element; with NR 0x2a1, an | ||
| 12 | ; 8_UNORM byte at 0x2a0 is written, though the V#'s 16-byte element would not fit. | ||
| 13 | ; - A V# whose FORMAT is 0 (INVALID) disables the store, though the instruction brings its own format. | ||
| 14 | ; Store regions 0x200..0x2cf start as 0xa5a50000 | address; out[0..51] are the 13 regions read back, in source order. | ||
| 15 | ; Run: VKC_OUT_WORDS=192 VKC_DUMP=<file> vk_compute_test cs_tbuffer_store.spv 1 dump; check.py compares words 0..127 of | ||
| 16 | ; the dump with TBUFFER_STORE_WORDS and 76 untouched 0xeeeeeeee words. | ||
| 17 | v_cmpx_eq_u32_e32 0, v0 | ||
| 18 | ; the store regions 0x200..0x2cf hold 0xa5a50000 | their address | ||
| 19 | v_mov_b32_e32 v1, 0xa5a50200 | ||
| 20 | v_mov_b32_e32 v2, 0xa5a50204 | ||
| 21 | v_mov_b32_e32 v3, 0xa5a50208 | ||
| 22 | v_mov_b32_e32 v4, 0xa5a5020c | ||
| 23 | v_mov_b32_e32 v5, 0x200 | ||
| 24 | buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen | ||
| 25 | v_mov_b32_e32 v1, 0xa5a50210 | ||
| 26 | v_mov_b32_e32 v2, 0xa5a50214 | ||
| 27 | v_mov_b32_e32 v3, 0xa5a50218 | ||
| 28 | v_mov_b32_e32 v4, 0xa5a5021c | ||
| 29 | v_mov_b32_e32 v5, 0x210 | ||
| 30 | buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen | ||
| 31 | v_mov_b32_e32 v1, 0xa5a50220 | ||
| 32 | v_mov_b32_e32 v2, 0xa5a50224 | ||
| 33 | v_mov_b32_e32 v3, 0xa5a50228 | ||
| 34 | v_mov_b32_e32 v4, 0xa5a5022c | ||
| 35 | v_mov_b32_e32 v5, 0x220 | ||
| 36 | buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen | ||
| 37 | v_mov_b32_e32 v1, 0xa5a50230 | ||
| 38 | v_mov_b32_e32 v2, 0xa5a50234 | ||
| 39 | v_mov_b32_e32 v3, 0xa5a50238 | ||
| 40 | v_mov_b32_e32 v4, 0xa5a5023c | ||
| 41 | v_mov_b32_e32 v5, 0x230 | ||
| 42 | buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen | ||
| 43 | v_mov_b32_e32 v1, 0xa5a50240 | ||
| 44 | v_mov_b32_e32 v2, 0xa5a50244 | ||
| 45 | v_mov_b32_e32 v3, 0xa5a50248 | ||
| 46 | v_mov_b32_e32 v4, 0xa5a5024c | ||
| 47 | v_mov_b32_e32 v5, 0x240 | ||
| 48 | buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen | ||
| 49 | v_mov_b32_e32 v1, 0xa5a50250 | ||
| 50 | v_mov_b32_e32 v2, 0xa5a50254 | ||
| 51 | v_mov_b32_e32 v3, 0xa5a50258 | ||
| 52 | v_mov_b32_e32 v4, 0xa5a5025c | ||
| 53 | v_mov_b32_e32 v5, 0x250 | ||
| 54 | buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen | ||
| 55 | v_mov_b32_e32 v1, 0xa5a50260 | ||
| 56 | v_mov_b32_e32 v2, 0xa5a50264 | ||
| 57 | v_mov_b32_e32 v3, 0xa5a50268 | ||
| 58 | v_mov_b32_e32 v4, 0xa5a5026c | ||
| 59 | v_mov_b32_e32 v5, 0x260 | ||
| 60 | buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen | ||
| 61 | v_mov_b32_e32 v1, 0xa5a50270 | ||
| 62 | v_mov_b32_e32 v2, 0xa5a50274 | ||
| 63 | v_mov_b32_e32 v3, 0xa5a50278 | ||
| 64 | v_mov_b32_e32 v4, 0xa5a5027c | ||
| 65 | v_mov_b32_e32 v5, 0x270 | ||
| 66 | buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen | ||
| 67 | v_mov_b32_e32 v1, 0xa5a50280 | ||
| 68 | v_mov_b32_e32 v2, 0xa5a50284 | ||
| 69 | v_mov_b32_e32 v3, 0xa5a50288 | ||
| 70 | v_mov_b32_e32 v4, 0xa5a5028c | ||
| 71 | v_mov_b32_e32 v5, 0x280 | ||
| 72 | buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen | ||
| 73 | v_mov_b32_e32 v1, 0xa5a50290 | ||
| 74 | v_mov_b32_e32 v2, 0xa5a50294 | ||
| 75 | v_mov_b32_e32 v3, 0xa5a50298 | ||
| 76 | v_mov_b32_e32 v4, 0xa5a5029c | ||
| 77 | v_mov_b32_e32 v5, 0x290 | ||
| 78 | buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen | ||
| 79 | v_mov_b32_e32 v1, 0xa5a502a0 | ||
| 80 | v_mov_b32_e32 v2, 0xa5a502a4 | ||
| 81 | v_mov_b32_e32 v3, 0xa5a502a8 | ||
| 82 | v_mov_b32_e32 v4, 0xa5a502ac | ||
| 83 | v_mov_b32_e32 v5, 0x2a0 | ||
| 84 | buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen | ||
| 85 | v_mov_b32_e32 v1, 0xa5a502b0 | ||
| 86 | v_mov_b32_e32 v2, 0xa5a502b4 | ||
| 87 | v_mov_b32_e32 v3, 0xa5a502b8 | ||
| 88 | v_mov_b32_e32 v4, 0xa5a502bc | ||
| 89 | v_mov_b32_e32 v5, 0x2b0 | ||
| 90 | buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen | ||
| 91 | v_mov_b32_e32 v1, 0xa5a502c0 | ||
| 92 | v_mov_b32_e32 v2, 0xa5a502c4 | ||
| 93 | v_mov_b32_e32 v3, 0xa5a502c8 | ||
| 94 | v_mov_b32_e32 v4, 0xa5a502cc | ||
| 95 | v_mov_b32_e32 v5, 0x2c0 | ||
| 96 | buffer_store_dwordx4 v[1:4], v5, s[0:3], 0 offen | ||
| 97 | s_waitcnt_vscnt null, 0x0 | ||
| 98 | s_mov_b32 s4, s0 | ||
| 99 | s_mov_b32 s5, s1 | ||
| 100 | ; 0x200: tbuffer_store_format_xyzw, xyzw, 32_32_32_32_FLOAT over a V# that says 32_FLOAT: all four dwords | ||
| 101 | v_mov_b32_e32 v20, 0x3f800000 | ||
| 102 | v_mov_b32_e32 v21, 0x40000000 | ||
| 103 | v_mov_b32_e32 v22, 0x40400000 | ||
| 104 | v_mov_b32_e32 v23, 0x40800000 | ||
| 105 | s_mov_b32 s6, 0xffffffff | ||
| 106 | s_mov_b32 s7, 0x31016fac | ||
| 107 | v_mov_b32_e32 v5, 0x200 | ||
| 108 | tbuffer_store_format_xyzw v[20:23], v5, s[4:7], 0 format:[BUF_FMT_32_32_32_32_FLOAT] offen | ||
| 109 | ; 0x210: tbuffer_store_format_xy, xy, 16_16_16_16_FLOAT over a V# that says 32_32_32_32_FLOAT: the 8-byte element, z = w = 0 | ||
| 110 | v_mov_b32_e32 v20, 0x3f800000 | ||
| 111 | v_mov_b32_e32 v21, 0x40000000 | ||
| 112 | s_mov_b32 s6, 0xffffffff | ||
| 113 | s_mov_b32 s7, 0x3104dfac | ||
| 114 | v_mov_b32_e32 v5, 0x210 | ||
| 115 | tbuffer_store_format_xy v[20:21], v5, s[4:7], 0 format:[BUF_FMT_16_16_16_16_FLOAT] offen | ||
| 116 | ; 0x220: tbuffer_store_format_xyz, xyz, 8_8_8_8_UINT over a V# that says 32_FLOAT | ||
| 117 | v_mov_b32_e32 v20, 0x1 | ||
| 118 | v_mov_b32_e32 v21, 0x2 | ||
| 119 | v_mov_b32_e32 v22, 0x3 | ||
| 120 | s_mov_b32 s6, 0xffffffff | ||
| 121 | s_mov_b32 s7, 0x31016fac | ||
| 122 | v_mov_b32_e32 v5, 0x220 | ||
| 123 | tbuffer_store_format_xyz v[20:22], v5, s[4:7], 0 format:[BUF_FMT_8_8_8_8_UINT] offen | ||
| 124 | ; 0x230: tbuffer_store_format_x, x, no format modifier (GFX10 default 8_UNORM) at byte 1, over a V# that says 32_32_32_32_FLOAT | ||
| 125 | v_mov_b32_e32 v20, 0x3f800000 | ||
| 126 | s_mov_b32 s6, 0xffffffff | ||
| 127 | s_mov_b32 s7, 0x3104dfac | ||
| 128 | v_mov_b32_e32 v5, 0x231 | ||
| 129 | tbuffer_store_format_x v20, v5, s[4:7], 0 offen | ||
| 130 | ; 0x240: tbuffer_store_format_x, x, 16_FLOAT at byte 2 (the high half) | ||
| 131 | v_mov_b32_e32 v20, 0x40000000 | ||
| 132 | s_mov_b32 s6, 0xffffffff | ||
| 133 | s_mov_b32 s7, 0x31016fac | ||
| 134 | v_mov_b32_e32 v5, 0x242 | ||
| 135 | tbuffer_store_format_x v20, v5, s[4:7], 0 format:[BUF_FMT_16_FLOAT] offen | ||
| 136 | ; 0x250: tbuffer_store_format_xyzw, xyzw, 2_10_10_10_UNORM (1.0, 0.0, 0.25, 1.0) | ||
| 137 | v_mov_b32_e32 v20, 0x3f800000 | ||
| 138 | v_mov_b32_e32 v21, 0x0 | ||
| 139 | v_mov_b32_e32 v22, 0x3e800000 | ||
| 140 | v_mov_b32_e32 v23, 0x3f800000 | ||
| 141 | s_mov_b32 s6, 0xffffffff | ||
| 142 | s_mov_b32 s7, 0x31016fac | ||
| 143 | v_mov_b32_e32 v5, 0x250 | ||
| 144 | tbuffer_store_format_xyzw v[20:23], v5, s[4:7], 0 format:[BUF_FMT_2_10_10_10_UNORM] offen | ||
| 145 | ; 0x260: tbuffer_store_format_xyzw, xyzw into 32_32_FLOAT: only x, y | ||
| 146 | v_mov_b32_e32 v20, 0x3f800000 | ||
| 147 | v_mov_b32_e32 v21, 0x40000000 | ||
| 148 | v_mov_b32_e32 v22, 0x40400000 | ||
| 149 | v_mov_b32_e32 v23, 0x40800000 | ||
| 150 | s_mov_b32 s6, 0xffffffff | ||
| 151 | s_mov_b32 s7, 0x3104dfac | ||
| 152 | v_mov_b32_e32 v5, 0x260 | ||
| 153 | tbuffer_store_format_xyzw v[20:23], v5, s[4:7], 0 format:[BUF_FMT_32_32_FLOAT] offen | ||
| 154 | ; 0x270: tbuffer_store_format_d16_xy, d16_xy, 16_16_FLOAT (packed 1.0, 2.0) | ||
| 155 | v_mov_b32_e32 v20, 0x40003c00 | ||
| 156 | s_mov_b32 s6, 0xffffffff | ||
| 157 | s_mov_b32 s7, 0x3104dfac | ||
| 158 | v_mov_b32_e32 v5, 0x270 | ||
| 159 | tbuffer_store_format_d16_xy v20, v5, s[4:7], 0 format:[BUF_FMT_16_16_FLOAT] offen | ||
| 160 | ; 0x280: tbuffer_store_format_d16_xyzw, d16_xyzw, 8_8_8_8_UNORM (packed 1.0, 0.5, 0.0, 1.0) | ||
| 161 | v_mov_b32_e32 v20, 0x38003c00 | ||
| 162 | v_mov_b32_e32 v21, 0x3c000000 | ||
| 163 | s_mov_b32 s6, 0xffffffff | ||
| 164 | s_mov_b32 s7, 0x31016fac | ||
| 165 | v_mov_b32_e32 v5, 0x280 | ||
| 166 | tbuffer_store_format_d16_xyzw v[20:21], v5, s[4:7], 0 format:[BUF_FMT_8_8_8_8_UNORM] offen | ||
| 167 | ; 0x290: tbuffer_store_format_xy, xy, 32_32_32_32_FLOAT, NR 0x298 over a V# that says 32_FLOAT: x, y end at 0x298, the element at 0x2a0 | ||
| 168 | v_mov_b32_e32 v20, 0x3f800000 | ||
| 169 | v_mov_b32_e32 v21, 0x40000000 | ||
| 170 | s_mov_b32 s6, 0x298 | ||
| 171 | s_mov_b32 s7, 0x31016fac | ||
| 172 | v_mov_b32_e32 v5, 0x290 | ||
| 173 | tbuffer_store_format_xy v[20:21], v5, s[4:7], 0 format:[BUF_FMT_32_32_32_32_FLOAT] offen | ||
| 174 | ; 0x2a0: tbuffer_store_format_x, x, 8_UNORM, NR 0x2a1 over a V# that says 32_32_32_32_FLOAT: the byte fits, the V#'s element would not | ||
| 175 | v_mov_b32_e32 v20, 0x3f800000 | ||
| 176 | s_mov_b32 s6, 0x2a1 | ||
| 177 | s_mov_b32 s7, 0x3104dfac | ||
| 178 | v_mov_b32_e32 v5, 0x2a0 | ||
| 179 | tbuffer_store_format_x v20, v5, s[4:7], 0 format:[BUF_FMT_8_UNORM] offen | ||
| 180 | ; 0x2b0: tbuffer_store_format_xyzw, xyzw into 32_FLOAT (one channel) over a V# that says 32_32_32_32_FLOAT: only x | ||
| 181 | v_mov_b32_e32 v20, 0x3f800000 | ||
| 182 | v_mov_b32_e32 v21, 0x40000000 | ||
| 183 | v_mov_b32_e32 v22, 0x40400000 | ||
| 184 | v_mov_b32_e32 v23, 0x40800000 | ||
| 185 | s_mov_b32 s6, 0xffffffff | ||
| 186 | s_mov_b32 s7, 0x3104dfac | ||
| 187 | v_mov_b32_e32 v5, 0x2b0 | ||
| 188 | tbuffer_store_format_xyzw v[20:23], v5, s[4:7], 0 format:[BUF_FMT_32_FLOAT] offen | ||
| 189 | ; 0x2c0: tbuffer_store_format_xy, xy, 32_32_FLOAT over a V# whose FORMAT is 0 (INVALID): nothing | ||
| 190 | v_mov_b32_e32 v20, 0x3f800000 | ||
| 191 | v_mov_b32_e32 v21, 0x40000000 | ||
| 192 | s_mov_b32 s6, 0xffffffff | ||
| 193 | s_mov_b32 s7, 0x31000fac | ||
| 194 | v_mov_b32_e32 v5, 0x2c0 | ||
| 195 | tbuffer_store_format_xy v[20:21], v5, s[4:7], 0 format:[BUF_FMT_32_32_FLOAT] offen | ||
| 196 | s_waitcnt_vscnt null, 0x0 | ||
| 197 | ; out[0..3]: the 16 bytes at 0x200 | ||
| 198 | v_mov_b32_e32 v5, 0x200 | ||
| 199 | buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen | ||
| 200 | s_waitcnt vmcnt(0) | ||
| 201 | v_mov_b32_e32 v6, 0x0 | ||
| 202 | buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen | ||
| 203 | ; out[4..7]: the 16 bytes at 0x210 | ||
| 204 | v_mov_b32_e32 v5, 0x210 | ||
| 205 | buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen | ||
| 206 | s_waitcnt vmcnt(0) | ||
| 207 | v_mov_b32_e32 v6, 0x10 | ||
| 208 | buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen | ||
| 209 | ; out[8..11]: the 16 bytes at 0x220 | ||
| 210 | v_mov_b32_e32 v5, 0x220 | ||
| 211 | buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen | ||
| 212 | s_waitcnt vmcnt(0) | ||
| 213 | v_mov_b32_e32 v6, 0x20 | ||
| 214 | buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen | ||
| 215 | ; out[12..15]: the 16 bytes at 0x230 | ||
| 216 | v_mov_b32_e32 v5, 0x230 | ||
| 217 | buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen | ||
| 218 | s_waitcnt vmcnt(0) | ||
| 219 | v_mov_b32_e32 v6, 0x30 | ||
| 220 | buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen | ||
| 221 | ; out[16..19]: the 16 bytes at 0x240 | ||
| 222 | v_mov_b32_e32 v5, 0x240 | ||
| 223 | buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen | ||
| 224 | s_waitcnt vmcnt(0) | ||
| 225 | v_mov_b32_e32 v6, 0x40 | ||
| 226 | buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen | ||
| 227 | ; out[20..23]: the 16 bytes at 0x250 | ||
| 228 | v_mov_b32_e32 v5, 0x250 | ||
| 229 | buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen | ||
| 230 | s_waitcnt vmcnt(0) | ||
| 231 | v_mov_b32_e32 v6, 0x50 | ||
| 232 | buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen | ||
| 233 | ; out[24..27]: the 16 bytes at 0x260 | ||
| 234 | v_mov_b32_e32 v5, 0x260 | ||
| 235 | buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen | ||
| 236 | s_waitcnt vmcnt(0) | ||
| 237 | v_mov_b32_e32 v6, 0x60 | ||
| 238 | buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen | ||
| 239 | ; out[28..31]: the 16 bytes at 0x270 | ||
| 240 | v_mov_b32_e32 v5, 0x270 | ||
| 241 | buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen | ||
| 242 | s_waitcnt vmcnt(0) | ||
| 243 | v_mov_b32_e32 v6, 0x70 | ||
| 244 | buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen | ||
| 245 | ; out[32..35]: the 16 bytes at 0x280 | ||
| 246 | v_mov_b32_e32 v5, 0x280 | ||
| 247 | buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen | ||
| 248 | s_waitcnt vmcnt(0) | ||
| 249 | v_mov_b32_e32 v6, 0x80 | ||
| 250 | buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen | ||
| 251 | ; out[36..39]: the 16 bytes at 0x290 | ||
| 252 | v_mov_b32_e32 v5, 0x290 | ||
| 253 | buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen | ||
| 254 | s_waitcnt vmcnt(0) | ||
| 255 | v_mov_b32_e32 v6, 0x90 | ||
| 256 | buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen | ||
| 257 | ; out[40..43]: the 16 bytes at 0x2a0 | ||
| 258 | v_mov_b32_e32 v5, 0x2a0 | ||
| 259 | buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen | ||
| 260 | s_waitcnt vmcnt(0) | ||
| 261 | v_mov_b32_e32 v6, 0xa0 | ||
| 262 | buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen | ||
| 263 | ; out[44..47]: the 16 bytes at 0x2b0 | ||
| 264 | v_mov_b32_e32 v5, 0x2b0 | ||
| 265 | buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen | ||
| 266 | s_waitcnt vmcnt(0) | ||
| 267 | v_mov_b32_e32 v6, 0xb0 | ||
| 268 | buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen | ||
| 269 | ; out[48..51]: the 16 bytes at 0x2c0 | ||
| 270 | v_mov_b32_e32 v5, 0x2c0 | ||
| 271 | buffer_load_dwordx4 v[10:13], v5, s[0:3], 0 offen | ||
| 272 | s_waitcnt vmcnt(0) | ||
| 273 | v_mov_b32_e32 v6, 0xc0 | ||
| 274 | buffer_store_dwordx4 v[10:13], v6, s[0:3], 0 offen | ||
| 275 | s_endpgm | ||
diff --git a/runtime/test/shaders/ps_imgatomic.asm b/runtime/test/shaders/ps_imgatomic.asm new file mode 100644 index 000000000..b8f888c13 --- /dev/null +++ b/runtime/test/shaders/ps_imgatomic.asm | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | ; Image atomics in a pixel shader, the forms the game uses (1,018 of its 1,038 image-atomic shaders are pixel shaders: | ||
| 2 | ; image_atomic_or / umin / umax on a 2D image and umax on a 3D one), through the descriptor table and the set-0 | ||
| 3 | ; r32ui storage arrays (binding 4 for 2D, 7 for 3D). User data s2:s3 is the console VA of a table of four T#s: | ||
| 4 | ; +0x00 the 2D umax image, +0x20 the 2D umin image, +0x40 the 2D or image, +0x60 the 3D umax image (any 8 dwords: | ||
| 5 | ; only the key matters). Each of the 64x64 pixels computes px, py from attr0 (vs_ids runs it 0..1 over the target), | ||
| 6 | ; its id = px + 64 * py, and its texel tx = px >> 3, ty = py >> 3, so 64 pixels contend for each texel of the 8x8 | ||
| 7 | ; images: | ||
| 8 | ; umax2d[ty][tx] = max(id), umin2d[ty][tx] = min(id), or2d[ty][tx] |= 1 << (id & 31), | ||
| 9 | ; umax3d[px & 3][ty >> 1][tx >> 1] = max(id) (a 4x4x4 image) | ||
| 10 | ; After its atomics, every odd px is discarded (v_cmpx). The atomics of a pixel that is discarded afterwards still | ||
| 11 | ; count, as on hardware: the expected values above are over all 4096 pixels. Even pixels export 1.0. | ||
| 12 | ; Run: vk_bindless_test vs_ids.spv ps_imgatomic.spv (images cleared to 0, umin to 0xffffffff; checked per texel) | ||
| 13 | s_load_dwordx8 s[8:15], s[2:3], 0x0 | ||
| 14 | s_load_dwordx8 s[16:23], s[2:3], 0x20 | ||
| 15 | s_load_dwordx8 s[24:31], s[2:3], 0x40 | ||
| 16 | s_load_dwordx8 s[32:39], s[2:3], 0x60 | ||
| 17 | s_waitcnt lgkmcnt(0) | ||
| 18 | v_interp_p1_f32_e32 v2, v0, attr0.x | ||
| 19 | v_interp_p2_f32_e32 v2, v1, attr0.x | ||
| 20 | v_interp_p1_f32_e32 v3, v0, attr0.y | ||
| 21 | v_interp_p2_f32_e32 v3, v1, attr0.y | ||
| 22 | v_mul_f32_e32 v2, 0x42800000, v2 | ||
| 23 | v_mul_f32_e32 v3, 0x42800000, v3 | ||
| 24 | v_cvt_u32_f32_e32 v4, v2 | ||
| 25 | v_cvt_u32_f32_e32 v5, v3 | ||
| 26 | v_lshlrev_b32_e32 v6, 6, v5 | ||
| 27 | v_add_nc_u32_e32 v6, v6, v4 | ||
| 28 | v_lshrrev_b32_e32 v7, 3, v4 | ||
| 29 | v_lshrrev_b32_e32 v8, 3, v5 | ||
| 30 | image_atomic_umax v6, v[7:8], s[8:15] dmask:0x1 dim:SQ_RSRC_IMG_2D unorm | ||
| 31 | image_atomic_umin v6, v[7:8], s[16:23] dmask:0x1 dim:SQ_RSRC_IMG_2D unorm | ||
| 32 | v_and_b32_e32 v9, 31, v6 | ||
| 33 | v_lshlrev_b32_e64 v9, v9, 1 | ||
| 34 | image_atomic_or v9, v[7:8], s[24:31] dmask:0x1 dim:SQ_RSRC_IMG_2D unorm | ||
| 35 | v_lshrrev_b32_e32 v10, 1, v7 | ||
| 36 | v_lshrrev_b32_e32 v11, 1, v8 | ||
| 37 | v_and_b32_e32 v12, 3, v4 | ||
| 38 | image_atomic_umax v6, v[10:12], s[32:39] dmask:0x1 dim:SQ_RSRC_IMG_3D unorm | ||
| 39 | s_waitcnt vmcnt(0) | ||
| 40 | v_and_b32_e32 v13, 1, v4 | ||
| 41 | v_cmpx_eq_u32_e32 0, v13 | ||
| 42 | v_mov_b32_e32 v14, 1.0 | ||
| 43 | exp mrt0 v14, v14, v14, v14 done vm | ||
| 44 | s_endpgm | ||
diff --git a/runtime/test/shaders/ps_m2_uoff.asm b/runtime/test/shaders/ps_m2_uoff.asm index 7f1167944..1c96f50d5 100644 --- a/runtime/test/shaders/ps_m2_uoff.asm +++ b/runtime/test/shaders/ps_m2_uoff.asm | |||
| @@ -2,9 +2,12 @@ | |||
| 2 | ; and the fallback sampler give the same pixels; with U + 1 the CLAMP sampler returns the last column and the WRAP one | 2 | ; and the fallback sampler give the same pixels; with U + 1 the CLAMP sampler returns the last column and the WRAP one |
| 3 | ; the same texel as without the offset, so the pixels tell which sampler the draw used. Idea and measurements by | 3 | ; the same texel as without the offset, so the pixels tell which sampler the draw used. Idea and measurements by |
| 4 | ; @Vonsek (#1489). Run: d3d12_m2_textured_test. | 4 | ; @Vonsek (#1489). Run: d3d12_m2_textured_test. |
| 5 | ; The same unbounded SRV table stays bound across both draws. Root constants s4 and s5 hold | ||
| 6 | ; the descriptor index and byte stride, respectively. | ||
| 5 | ; fssm-at: 0x10 | 7 | ; fssm-at: 0x10 |
| 6 | ; fssm-data: 0x324d5350 0x4f465520 | 8 | ; fssm-data: 0x324d5350 0x4f465520 |
| 7 | s_load_dwordx8 s[8:15], s[0:1], 0x0 | 9 | s_mul_i32 s20, s4, s5 |
| 10 | s_load_dwordx8 s[8:15], s[0:1], s20 | ||
| 8 | s_load_dwordx4 s[16:19], s[2:3], 0x0 | 11 | s_load_dwordx4 s[16:19], s[2:3], 0x0 |
| 9 | s_waitcnt lgkmcnt(0) | 12 | s_waitcnt lgkmcnt(0) |
| 10 | v_interp_p1_f32_e32 v2, v0, attr0.x | 13 | v_interp_p1_f32_e32 v2, v0, attr0.x |
diff --git a/runtime/test/shaders/ps_mandelbrot.asm b/runtime/test/shaders/ps_mandelbrot.asm new file mode 100644 index 000000000..98c70f6cc --- /dev/null +++ b/runtime/test/shaders/ps_mandelbrot.asm | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | ; Mandelbrot set: a divergent backward loop with EXEC masking. Each lane iterates z = z^2 + c until |z|^2 > 4 or | ||
| 2 | ; 64 iterations, with c from attr0.xy (u, v 0..1 over the image) mapped to [-2.25, 0.75] x [-1.5, 1.5]. A lane that | ||
| 3 | ; escapes drops out of EXEC (s_and_b32 exec_lo, exec_lo, vcc_lo); s_cbranch_execz leaves the loop once every lane has | ||
| 4 | ; escaped, else the uniform counter s10 ends it after 64 rounds. EXEC is restored from s20 before the export. | ||
| 5 | ; Only v_mul/v_add/v_sub (no FMA), so a float32 model on the CPU gives the same counts. | ||
| 6 | ; Branch offsets are dwords from the next instruction: execz +9 forward to the restore, scc1 -15 back to the loop top. | ||
| 7 | ; Run: vk_harness vs_ids.spv ps_mandelbrot.spv out.raw | ||
| 8 | ; -> mrt0 = (sqrt(t), t*t, 4t(1-t), iteration count as raw bits) with t = count / 64 | ||
| 9 | v_interp_p1_f32_e32 v2, v0, attr0.x | ||
| 10 | v_interp_p2_f32_e32 v2, v1, attr0.x | ||
| 11 | v_interp_p1_f32_e32 v3, v0, attr0.y | ||
| 12 | v_interp_p2_f32_e32 v3, v1, attr0.y | ||
| 13 | v_mul_f32_e32 v4, 0x40400000, v2 | ||
| 14 | v_add_f32_e32 v4, 0xc0100000, v4 | ||
| 15 | v_mul_f32_e32 v5, 0x40400000, v3 | ||
| 16 | v_add_f32_e32 v5, 0xbfc00000, v5 | ||
| 17 | v_mov_b32_e32 v6, 0 | ||
| 18 | v_mov_b32_e32 v7, 0 | ||
| 19 | v_mov_b32_e32 v8, 0 | ||
| 20 | s_mov_b32 s10, 0 | ||
| 21 | s_mov_b32 s20, exec_lo | ||
| 22 | v_mul_f32_e32 v9, v6, v6 | ||
| 23 | v_mul_f32_e32 v10, v7, v7 | ||
| 24 | v_add_f32_e32 v11, v9, v10 | ||
| 25 | v_cmp_ge_f32_e32 vcc_lo, 4.0, v11 | ||
| 26 | s_and_b32 exec_lo, exec_lo, vcc_lo | ||
| 27 | s_cbranch_execz 9 | ||
| 28 | v_sub_f32_e32 v12, v9, v10 | ||
| 29 | v_mul_f32_e32 v13, v6, v7 | ||
| 30 | v_add_f32_e32 v13, v13, v13 | ||
| 31 | v_add_f32_e32 v6, v12, v4 | ||
| 32 | v_add_f32_e32 v7, v13, v5 | ||
| 33 | v_add_nc_u32_e32 v8, 1, v8 | ||
| 34 | s_add_u32 s10, s10, 1 | ||
| 35 | s_cmp_lt_u32 s10, 64 | ||
| 36 | s_cbranch_scc1 -15 | ||
| 37 | s_mov_b32 exec_lo, s20 | ||
| 38 | v_cvt_f32_u32_e32 v14, v8 | ||
| 39 | v_mul_f32_e32 v14, 0x3c800000, v14 | ||
| 40 | v_sqrt_f32_e32 v15, v14 | ||
| 41 | v_mul_f32_e32 v16, v14, v14 | ||
| 42 | v_sub_f32_e32 v17, 1.0, v14 | ||
| 43 | v_mul_f32_e32 v17, v14, v17 | ||
| 44 | v_mul_f32_e32 v17, 4.0, v17 | ||
| 45 | exp mrt0 v15, v16, v17, v8 done vm | ||
| 46 | s_endpgm | ||
diff --git a/runtime/test/shaders/ps_scc_logic32.asm b/runtime/test/shaders/ps_scc_logic32.asm new file mode 100644 index 000000000..3b36f1362 --- /dev/null +++ b/runtime/test/shaders/ps_scc_logic32.asm | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | ; s_nand_b32, s_nor_b32, s_xnor_b32: D = ~(S0 op S1), SCC = (D != 0). Values by hand from the RDNA2 ISA SOP2 text. | ||
| 2 | ; s2 = 0xf0f0f0f0, s3 = 0xff00ff00: and = 0xf000f000, or = 0xfff0fff0, xor = 0x0ff00ff0. | ||
| 3 | ; Expected mrt0 bits: nand 0x0fff0fff, nor 0x000f000f, xnor 0xf00ff00f, and an SCC word, bit n = SCC after case n: | ||
| 4 | ; 0 nand(-1, -1) = 0 -> 0 1 nor(0, 0) = -1 -> 1 2 xnor(x, x) = -1 -> 1 | ||
| 5 | ; 3 xnor(x, ~x) = 0 -> 0 4 nor(0xfffffff0, 0) = 0xf -> 1 5 nand(0x80000000, -1) = 0x7fffffff -> 1 | ||
| 6 | ; so the SCC word is 0x36. | ||
| 7 | s_mov_b32 s2, 0xf0f0f0f0 | ||
| 8 | s_mov_b32 s3, 0xff00ff00 | ||
| 9 | s_nand_b32 s4, s2, s3 | ||
| 10 | s_nor_b32 s5, s2, s3 | ||
| 11 | s_xnor_b32 s6, s2, s3 | ||
| 12 | s_mov_b32 s8, -1 | ||
| 13 | s_mov_b32 s9, 0 | ||
| 14 | s_mov_b32 s10, 0x0f0f0f0f | ||
| 15 | s_mov_b32 s11, 0xfffffff0 | ||
| 16 | s_mov_b32 s12, 0x80000000 | ||
| 17 | s_nand_b32 s13, s8, s8 | ||
| 18 | s_cselect_b32 s20, 1, 0 | ||
| 19 | s_nor_b32 s13, s9, s9 | ||
| 20 | s_cselect_b32 s21, 1, 0 | ||
| 21 | s_xnor_b32 s13, s2, s2 | ||
| 22 | s_cselect_b32 s22, 1, 0 | ||
| 23 | s_xnor_b32 s13, s2, s10 | ||
| 24 | s_cselect_b32 s23, 1, 0 | ||
| 25 | s_nor_b32 s13, s11, s9 | ||
| 26 | s_cselect_b32 s24, 1, 0 | ||
| 27 | s_nand_b32 s13, s12, s8 | ||
| 28 | s_cselect_b32 s25, 1, 0 | ||
| 29 | s_lshl_b32 s21, s21, 1 | ||
| 30 | s_lshl_b32 s22, s22, 2 | ||
| 31 | s_lshl_b32 s23, s23, 3 | ||
| 32 | s_lshl_b32 s24, s24, 4 | ||
| 33 | s_lshl_b32 s25, s25, 5 | ||
| 34 | s_or_b32 s20, s20, s21 | ||
| 35 | s_or_b32 s20, s20, s22 | ||
| 36 | s_or_b32 s20, s20, s23 | ||
| 37 | s_or_b32 s20, s20, s24 | ||
| 38 | s_or_b32 s20, s20, s25 | ||
| 39 | v_mov_b32_e32 v0, s4 | ||
| 40 | v_mov_b32_e32 v1, s5 | ||
| 41 | v_mov_b32_e32 v2, s6 | ||
| 42 | v_mov_b32_e32 v3, s20 | ||
| 43 | exp mrt0 v0, v1, v2, v3 done vm | ||
| 44 | s_endpgm | ||
diff --git a/runtime/test/shaders/ps_scc_logic64.asm b/runtime/test/shaders/ps_scc_logic64.asm new file mode 100644 index 000000000..3ffb677ae --- /dev/null +++ b/runtime/test/shaders/ps_scc_logic64.asm | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | ; s_nand_b64, s_nor_b64, s_xnor_b64 on plain SGPR pairs: D = ~(S0 op S1), SCC = ((D.lo | D.hi) != 0). By hand from the RDNA2 ISA. | ||
| 2 | ; A = s[2:3] = (lo 0xf0f0f0f0, hi 0x0000ffff), B = s[4:5] = (lo 0xff00ff00, hi 0x00ff00ff). | ||
| 3 | ; Expected mrt0 bits: nand.lo 0x0fff0fff, nor.hi 0xff000000 (A.hi | B.hi = 0x00ffffff), xnor.hi 0xff0000ff (A.hi ^ B.hi = 0x00ffff00), | ||
| 4 | ; and an SCC word, bit n = SCC after case n (X = (-1, 0), Y = (0, -1)): | ||
| 5 | ; 0 nand(ones, ones) = 0 -> 0 1 nor(X, 0) = (0, -1), only the high dword set -> 1 | ||
| 6 | ; 2 xnor(X, X) = all ones -> 1 3 xnor(X, Y) = 0 -> 0 | ||
| 7 | ; 4 nor(Y, (0xfffffff0, 0)) = (0xf, 0), only the low dword set -> 1 | ||
| 8 | ; so the SCC word is 0x16. | ||
| 9 | s_mov_b32 s2, 0xf0f0f0f0 | ||
| 10 | s_mov_b32 s3, 0x0000ffff | ||
| 11 | s_mov_b32 s4, 0xff00ff00 | ||
| 12 | s_mov_b32 s5, 0x00ff00ff | ||
| 13 | s_nand_b64 s[6:7], s[2:3], s[4:5] | ||
| 14 | s_nor_b64 s[8:9], s[2:3], s[4:5] | ||
| 15 | s_xnor_b64 s[10:11], s[2:3], s[4:5] | ||
| 16 | s_mov_b32 s12, -1 | ||
| 17 | s_mov_b32 s13, -1 | ||
| 18 | s_mov_b32 s14, -1 | ||
| 19 | s_mov_b32 s15, 0 | ||
| 20 | s_mov_b32 s16, 0 | ||
| 21 | s_mov_b32 s17, -1 | ||
| 22 | s_mov_b32 s18, 0 | ||
| 23 | s_mov_b32 s19, 0 | ||
| 24 | s_mov_b32 s24, 0xfffffff0 | ||
| 25 | s_mov_b32 s25, 0 | ||
| 26 | s_nand_b64 s[30:31], s[12:13], s[12:13] | ||
| 27 | s_cselect_b32 s40, 1, 0 | ||
| 28 | s_nor_b64 s[30:31], s[14:15], s[18:19] | ||
| 29 | s_cselect_b32 s41, 1, 0 | ||
| 30 | s_xnor_b64 s[30:31], s[14:15], s[14:15] | ||
| 31 | s_cselect_b32 s42, 1, 0 | ||
| 32 | s_xnor_b64 s[30:31], s[14:15], s[16:17] | ||
| 33 | s_cselect_b32 s43, 1, 0 | ||
| 34 | s_nor_b64 s[30:31], s[16:17], s[24:25] | ||
| 35 | s_cselect_b32 s44, 1, 0 | ||
| 36 | s_lshl_b32 s41, s41, 1 | ||
| 37 | s_lshl_b32 s42, s42, 2 | ||
| 38 | s_lshl_b32 s43, s43, 3 | ||
| 39 | s_lshl_b32 s44, s44, 4 | ||
| 40 | s_or_b32 s40, s40, s41 | ||
| 41 | s_or_b32 s40, s40, s42 | ||
| 42 | s_or_b32 s40, s40, s43 | ||
| 43 | s_or_b32 s40, s40, s44 | ||
| 44 | v_mov_b32_e32 v0, s6 | ||
| 45 | v_mov_b32_e32 v1, s9 | ||
| 46 | v_mov_b32_e32 v2, s11 | ||
| 47 | v_mov_b32_e32 v3, s40 | ||
| 48 | exp mrt0 v0, v1, v2, v3 done vm | ||
| 49 | s_endpgm | ||
diff --git a/runtime/test/shaders/vs_w64_a_skip.asm b/runtime/test/shaders/vs_w64_a_skip.asm new file mode 100644 index 000000000..dac0d885e --- /dev/null +++ b/runtime/test/shaders/vs_w64_a_skip.asm | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | ; TEST-251 (SHADER-10 tier A, vertex stage): the skip regions and the loop of ps_w64_a_skip in a wave64 vertex shader, | ||
| 2 | ; without its whole-quad mask (vertex quads are lanes, not pixels). Vertex v (v0 = vertex index) has x = v & 63 and | ||
| 3 | ; y = v >> 6, so every word is a function of v and not of the lane the vertex landed on. It stores (r0, r1, r2, r3) | ||
| 4 | ; to its record at heap 0x1000 + 16 * v through the V# in s[0:3]. | ||
| 5 | ; (1) a skip region behind s_cbranch_execz: only lanes with x % 4 == 1 run it. r0 = x % 4 == 1 ? 7 * y + x : 1000 + x. | ||
| 6 | ; (2) r1 = x % 4 == 1 (the VCC of (1), per lane). | ||
| 7 | ; (3) s_cbranch_vccz over a region that narrows EXEC to that VCC. r2 = 2000 + y + (y % 4 == 2 ? 9 : 0). | ||
| 8 | ; (4) a loop closed by s_cbranch_execnz, no scalar state carried. r3 = x % 4 + 1. | ||
| 9 | ; Run: VKH_VERTICES=960 VKH_SGPRS=0,0,65536,0x30000000 VKH_HEAP=0=0 VKH_HEAP_DUMP=heap.raw vk_harness | ||
| 10 | ; vs_w64_a_skip.spv <any fragment shader> out.raw, with and without RADV_PERFTEST=gewave32: equal records, and equal | ||
| 11 | ; to the expected words. | ||
| 12 | ; mattr: +wavefrontsize64,-wavefrontsize32 | ||
| 13 | v_and_b32_e32 v2, 63, v0 | ||
| 14 | v_lshrrev_b32_e32 v3, 6, v0 | ||
| 15 | s_mov_b64 s[10:11], exec | ||
| 16 | v_add_nc_u32_e32 v6, 0x3e8, v2 | ||
| 17 | v_and_b32_e32 v4, 3, v2 | ||
| 18 | v_cmp_eq_u32_e32 vcc, 1, v4 | ||
| 19 | v_cndmask_b32_e64 v7, 0, 1, vcc | ||
| 20 | s_and_saveexec_b64 s[12:13], vcc | ||
| 21 | s_cbranch_execz 2 | ||
| 22 | v_mul_u32_u24_e32 v6, 7, v3 | ||
| 23 | v_add_nc_u32_e32 v6, v6, v2 | ||
| 24 | s_or_b64 exec, exec, s[12:13] | ||
| 25 | v_and_b32_e32 v5, 3, v3 | ||
| 26 | v_add_nc_u32_e32 v8, 0x7d0, v3 | ||
| 27 | v_cmp_eq_u32_e32 vcc, 2, v5 | ||
| 28 | s_cbranch_vccz 3 | ||
| 29 | s_and_saveexec_b64 s[16:17], vcc | ||
| 30 | v_add_nc_u32_e32 v8, 9, v8 | ||
| 31 | s_or_b64 exec, exec, s[16:17] | ||
| 32 | v_add_nc_u32_e32 v10, 1, v4 | ||
| 33 | v_mov_b32_e32 v9, 0 | ||
| 34 | v_add_nc_u32_e32 v9, 1, v9 | ||
| 35 | v_cmp_lt_u32_e32 vcc, v9, v10 | ||
| 36 | s_and_b64 exec, exec, vcc | ||
| 37 | s_cbranch_execnz -4 | ||
| 38 | s_mov_b64 exec, s[10:11] | ||
| 39 | v_lshlrev_b32_e32 v12, 4, v0 | ||
| 40 | v_add_nc_u32_e32 v12, 0x1000, v12 | ||
| 41 | buffer_store_dwordx4 v[6:9], v12, s[0:3], 0 offen | ||
| 42 | v_mov_b32_e32 v5, 0 | ||
| 43 | exp pos0 v5, v5, v5, v5 done | ||
| 44 | exp param0 v5, v5, v5, v5 | ||
| 45 | s_endpgm | ||
diff --git a/runtime/test/shaders/vs_w64_b_ballot_atomic.asm b/runtime/test/shaders/vs_w64_b_ballot_atomic.asm new file mode 100644 index 000000000..f718c25f8 --- /dev/null +++ b/runtime/test/shaders/vs_w64_b_ballot_atomic.asm | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | ; TEST-251 (SHADER-10 tier B, vertex stage): the wave-aggregated atomic of ps_w64_b_ballot_atomic in a wave64 vertex | ||
| 2 | ; shader. Vertex v (v0 = vertex index) has x = v & 63; vertices with x % 4 == 1 are the "wanted" lanes. EXEC = the | ||
| 3 | ; wanted lanes; n = s_bcnt1_i32_b64 exec; rank = v_mbcnt_lo/hi of EXEC; the lane of rank 0 does buffer_atomic_add of n | ||
| 4 | ; to the counter at heap offset 0 and gets the old value back; v_readfirstlane broadcasts it as the base; every wanted | ||
| 5 | ; vertex stores v + 1 at heap offset 0x100 + 4 * (base + rank). Whatever the wave size and the packing, every wanted | ||
| 6 | ; vertex gets a slot of its own and the counter ends at the number of wanted vertices (240 of 960); which vertex gets | ||
| 7 | ; which slot depends on the packing, so the slots are compared as a set. Its record at heap 0x1000 + 16 * v holds | ||
| 8 | ; (x % 4 == 1, 0, 0, 0). | ||
| 9 | ; Run: VKH_VERTICES=960 VKH_SGPRS=0,0,65536,0x30000000 VKH_HEAP=0=0 VKH_HEAP_DUMP=heap.raw vk_harness | ||
| 10 | ; vs_w64_b_ballot_atomic.spv <any fragment shader> out.raw, with and without RADV_PERFTEST=gewave32. | ||
| 11 | ; mattr: +wavefrontsize64,-wavefrontsize32 | ||
| 12 | v_and_b32_e32 v2, 63, v0 | ||
| 13 | v_and_b32_e32 v4, 3, v2 | ||
| 14 | s_mov_b64 s[10:11], exec | ||
| 15 | v_cmp_eq_u32_e32 vcc, 1, v4 | ||
| 16 | v_cndmask_b32_e64 v6, 0, 1, vcc | ||
| 17 | s_and_saveexec_b64 s[12:13], vcc | ||
| 18 | s_bcnt1_i32_b64 s6, exec | ||
| 19 | v_mbcnt_lo_u32_b32 v10, exec_lo, 0 | ||
| 20 | v_mbcnt_hi_u32_b32 v10, exec_hi, v10 | ||
| 21 | v_cmp_eq_u32_e32 vcc, 0, v10 | ||
| 22 | s_and_saveexec_b64 s[14:15], vcc | ||
| 23 | v_mov_b32_e32 v11, s6 | ||
| 24 | v_mov_b32_e32 v13, 0 | ||
| 25 | buffer_atomic_add v11, v13, s[0:3], 0 offen glc | ||
| 26 | s_or_b64 exec, exec, s[14:15] | ||
| 27 | v_readfirstlane_b32 s7, v11 | ||
| 28 | v_add_nc_u32_e32 v13, s7, v10 | ||
| 29 | v_lshlrev_b32_e32 v13, 2, v13 | ||
| 30 | v_add_nc_u32_e32 v14, 1, v0 | ||
| 31 | buffer_store_dword v14, v13, s[0:3], 0 offen offset:256 | ||
| 32 | s_mov_b64 exec, s[10:11] | ||
| 33 | v_mov_b32_e32 v7, 0 | ||
| 34 | v_mov_b32_e32 v8, 0 | ||
| 35 | v_mov_b32_e32 v9, 0 | ||
| 36 | v_lshlrev_b32_e32 v12, 4, v0 | ||
| 37 | v_add_nc_u32_e32 v12, 0x1000, v12 | ||
| 38 | buffer_store_dwordx4 v[6:9], v12, s[0:3], 0 offen | ||
| 39 | v_mov_b32_e32 v5, 0 | ||
| 40 | exp pos0 v5, v5, v5, v5 done | ||
| 41 | exp param0 v5, v5, v5, v5 | ||
| 42 | s_endpgm | ||
diff --git a/runtime/test/shaders/vs_w64_b_readlane_uniform.asm b/runtime/test/shaders/vs_w64_b_readlane_uniform.asm new file mode 100644 index 000000000..0fb85008d --- /dev/null +++ b/runtime/test/shaders/vs_w64_b_readlane_uniform.asm | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | ; TEST-251 (SHADER-10 tier B, vertex stage): v_readfirstlane and v_readlane (lanes 40 and 63) of wave-uniform VGPRs | ||
| 2 | ; in a wave64 vertex shader, the vertex twin of ps_w64_b_readfirstlane and ps_w64_b_readlane_uniform. s4 is a user | ||
| 3 | ; SGPR (VKH_SGPRS sets it to 123), copied to a VGPR and read back; so is the constant 77. Every lane holds the same | ||
| 4 | ; value, so the scalar does not depend on which lane is read, on the wave size or on how many vertices a wave got. | ||
| 5 | ; Vertex v (v0 = vertex index) has x = v & 63. r0 = x + 123 (readfirstlane), r1 = 123 + 77 (readlane 40 and 63), | ||
| 6 | ; r2 = x + 123 (readlane 40), r3 = 77 * 2 + 123 (readfirstlane), stored to its record at heap 0x1000 + 16 * v | ||
| 7 | ; through the V# in s[0:3]. | ||
| 8 | ; Run: VKH_VERTICES=960 VKH_SGPRS=0,0,65536,0x30000000,123 VKH_HEAP=0=0 VKH_HEAP_DUMP=heap.raw vk_harness | ||
| 9 | ; vs_w64_b_readlane_uniform.spv <any fragment shader> out.raw, with and without RADV_PERFTEST=gewave32: equal, and | ||
| 10 | ; equal to the expected words. | ||
| 11 | ; mattr: +wavefrontsize64,-wavefrontsize32 | ||
| 12 | v_and_b32_e32 v2, 63, v0 | ||
| 13 | s_mov_b64 s[10:11], exec | ||
| 14 | v_mov_b32_e32 v5, s4 | ||
| 15 | v_mov_b32_e32 v4, 77 | ||
| 16 | v_readfirstlane_b32 s20, v5 | ||
| 17 | v_add_nc_u32_e32 v6, s20, v2 | ||
| 18 | v_readlane_b32 s21, v5, 40 | ||
| 19 | v_readlane_b32 s22, v4, 63 | ||
| 20 | s_add_u32 s23, s21, s22 | ||
| 21 | v_mov_b32_e32 v7, s23 | ||
| 22 | v_add_nc_u32_e32 v8, s21, v2 | ||
| 23 | v_readfirstlane_b32 s24, v4 | ||
| 24 | s_lshl_b32 s24, s24, 1 | ||
| 25 | s_add_u32 s24, s24, s20 | ||
| 26 | v_mov_b32_e32 v9, s24 | ||
| 27 | v_lshlrev_b32_e32 v12, 4, v0 | ||
| 28 | v_add_nc_u32_e32 v12, 0x1000, v12 | ||
| 29 | buffer_store_dwordx4 v[6:9], v12, s[0:3], 0 offen | ||
| 30 | v_mov_b32_e32 v5, 0 | ||
| 31 | exp pos0 v5, v5, v5, v5 done | ||
| 32 | exp param0 v5, v5, v5, v5 | ||
| 33 | s_endpgm | ||
diff --git a/runtime/test/shaders/vs_w64_b_waterfall.asm b/runtime/test/shaders/vs_w64_b_waterfall.asm new file mode 100644 index 000000000..814259842 --- /dev/null +++ b/runtime/test/shaders/vs_w64_b_waterfall.asm | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | ; TEST-251 (SHADER-10 tier B, vertex stage): the waterfall loop of ps_w64_b_waterfall in a wave64 vertex shader. | ||
| 2 | ; Vertex v (v0 = vertex index) has x = v & 63, y = v >> 6 and the key a = x % 4 + 4 * (y % 4). The loop takes | ||
| 3 | ; v_readfirstlane of the key, runs the lanes holding it (v_cmp_eq, s_and_saveexec), retires them (s_xor exec) and | ||
| 4 | ; repeats while lanes are left (s_cbranch_execnz); the scalar is used only inside the body. It runs once per distinct | ||
| 5 | ; key of the wave or of the 32-lane subgroup, and every vertex ends with r0 = 17 * a + x, r1 = a, r2 = r3 = 0, stored | ||
| 6 | ; to its record at heap 0x1000 + 16 * v through the V# in s[0:3]. | ||
| 7 | ; Run: VKH_VERTICES=960 VKH_SGPRS=0,0,65536,0x30000000 VKH_HEAP=0=0 VKH_HEAP_DUMP=heap.raw vk_harness | ||
| 8 | ; vs_w64_b_waterfall.spv <any fragment shader> out.raw, with and without RADV_PERFTEST=gewave32: equal, and equal to | ||
| 9 | ; the expected words. | ||
| 10 | ; mattr: +wavefrontsize64,-wavefrontsize32 | ||
| 11 | v_and_b32_e32 v2, 63, v0 | ||
| 12 | v_lshrrev_b32_e32 v3, 6, v0 | ||
| 13 | v_and_b32_e32 v4, 3, v2 | ||
| 14 | v_and_b32_e32 v5, 3, v3 | ||
| 15 | v_lshl_add_u32 v4, v5, 2, v4 | ||
| 16 | v_mov_b32_e32 v6, 0 | ||
| 17 | s_mov_b64 s[10:11], exec | ||
| 18 | v_readfirstlane_b32 s20, v4 | ||
| 19 | v_cmp_eq_u32_e32 vcc, s20, v4 | ||
| 20 | s_and_saveexec_b64 s[12:13], vcc | ||
| 21 | s_mul_i32 s21, s20, 17 | ||
| 22 | v_add_nc_u32_e32 v6, s21, v2 | ||
| 23 | s_xor_b64 exec, exec, s[12:13] | ||
| 24 | s_cbranch_execnz -7 | ||
| 25 | s_mov_b64 exec, s[10:11] | ||
| 26 | v_mov_b32_e32 v7, v4 | ||
| 27 | v_mov_b32_e32 v8, 0 | ||
| 28 | v_mov_b32_e32 v9, 0 | ||
| 29 | v_lshlrev_b32_e32 v12, 4, v0 | ||
| 30 | v_add_nc_u32_e32 v12, 0x1000, v12 | ||
| 31 | buffer_store_dwordx4 v[6:9], v12, s[0:3], 0 offen | ||
| 32 | v_mov_b32_e32 v5, 0 | ||
| 33 | exp pos0 v5, v5, v5, v5 done | ||
| 34 | exp param0 v5, v5, v5, v5 | ||
| 35 | s_endpgm | ||
diff --git a/runtime/test/shaders/vs_w64_c_bcnt_export.asm b/runtime/test/shaders/vs_w64_c_bcnt_export.asm new file mode 100644 index 000000000..84dd9bf53 --- /dev/null +++ b/runtime/test/shaders/vs_w64_c_bcnt_export.asm | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | ; TEST-251 (SHADER-10 tier C, vertex stage): a lane count used as data. Vertex v (v0 = vertex index) has x = v & 63; | ||
| 2 | ; s_bcnt1_i32_b64 counts the lanes of its wave with x % 4 == 1, which depends on the wave size and on how many | ||
| 3 | ; vertices the driver put in the wave. r0 = that count (partition dependent), r1 = x % 4 == 1, r2 = r3 = 0, stored to | ||
| 4 | ; its record at heap 0x1000 + 16 * v through the V# in s[0:3]. | ||
| 5 | ; Run: VKH_VERTICES=960 VKH_SGPRS=0,0,65536,0x30000000 VKH_HEAP=0=0 VKH_HEAP_DUMP=heap.raw vk_harness | ||
| 6 | ; vs_w64_c_bcnt_export.spv <any fragment shader> out.raw, with and without RADV_PERFTEST=gewave32: r1 equal, r0 | ||
| 7 | ; differs. | ||
| 8 | ; mattr: +wavefrontsize64,-wavefrontsize32 | ||
| 9 | v_and_b32_e32 v2, 63, v0 | ||
| 10 | v_and_b32_e32 v4, 3, v2 | ||
| 11 | v_cmp_eq_u32_e32 vcc, 1, v4 | ||
| 12 | s_bcnt1_i32_b64 s6, vcc | ||
| 13 | v_mov_b32_e32 v6, s6 | ||
| 14 | v_cndmask_b32_e64 v7, 0, 1, vcc | ||
| 15 | v_mov_b32_e32 v8, 0 | ||
| 16 | v_mov_b32_e32 v9, 0 | ||
| 17 | v_lshlrev_b32_e32 v12, 4, v0 | ||
| 18 | v_add_nc_u32_e32 v12, 0x1000, v12 | ||
| 19 | buffer_store_dwordx4 v[6:9], v12, s[0:3], 0 offen | ||
| 20 | v_mov_b32_e32 v5, 0 | ||
| 21 | exp pos0 v5, v5, v5, v5 done | ||
| 22 | exp param0 v5, v5, v5, v5 | ||
| 23 | s_endpgm | ||
diff --git a/runtime/test/shaders/vs_w64_c_lane_id.asm b/runtime/test/shaders/vs_w64_c_lane_id.asm new file mode 100644 index 000000000..c69850333 --- /dev/null +++ b/runtime/test/shaders/vs_w64_c_lane_id.asm | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | ; TEST-251 (SHADER-10 tier C, vertex stage): the raw lane number (v_mbcnt_lo/hi of -1) used as data. Each vertex v | ||
| 2 | ; (v0 = vertex index) stores (lane id, lane id & 31, v, 0) to its record at heap 0x1000 + 16 * v through the V# in | ||
| 3 | ; s[0:3]. In a wave64 VS some vertices get lanes 32..63; in a wave32 VS none do, so r0 and r1 depend on how the driver | ||
| 4 | ; packed the vertices into waves and r2 does not. w64_graphics.py also uses it as its probe: the largest r0 shows the | ||
| 5 | ; wave size the driver picked (63 by default on RADV GFX12, 31 with RADV_PERFTEST=gewave32). | ||
| 6 | ; Run: VKH_VERTICES=960 VKH_SGPRS=0,0,65536,0x30000000 VKH_HEAP=0=0 VKH_HEAP_DUMP=heap.raw vk_harness | ||
| 7 | ; vs_w64_c_lane_id.spv <any fragment shader> out.raw, with and without RADV_PERFTEST=gewave32 (the triangles have | ||
| 8 | ; zero area, so nothing is drawn). | ||
| 9 | ; mattr: +wavefrontsize64,-wavefrontsize32 | ||
| 10 | v_mbcnt_lo_u32_b32 v6, -1, 0 | ||
| 11 | v_mbcnt_hi_u32_b32 v6, -1, v6 | ||
| 12 | v_and_b32_e32 v7, 31, v6 | ||
| 13 | v_mov_b32_e32 v8, v0 | ||
| 14 | v_mov_b32_e32 v9, 0 | ||
| 15 | v_lshlrev_b32_e32 v12, 4, v0 | ||
| 16 | v_add_nc_u32_e32 v12, 0x1000, v12 | ||
| 17 | buffer_store_dwordx4 v[6:9], v12, s[0:3], 0 offen | ||
| 18 | v_mov_b32_e32 v5, 0 | ||
| 19 | exp pos0 v5, v5, v5, v5 done | ||
| 20 | exp param0 v5, v5, v5, v5 | ||
| 21 | s_endpgm | ||
diff --git a/runtime/test/shaders/vs_w64_c_readlane.asm b/runtime/test/shaders/vs_w64_c_readlane.asm new file mode 100644 index 000000000..d472b1ee5 --- /dev/null +++ b/runtime/test/shaders/vs_w64_c_readlane.asm | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | ; TEST-251 (SHADER-10 tier C, vertex stage): v_readlane of a varying value (the vertex index) at lanes 40 and 7. In a | ||
| 2 | ; wave64 VS every lane gets the vertex in hardware lane 40 (or 7) of its wave; in a wave32 VS lane 40 wraps or is | ||
| 3 | ; undefined and lane 7 is the vertex of another wave. Vertex v (v0 = vertex index): r0 = readlane 40, r1 = v, | ||
| 4 | ; r2 = readlane 7 (both partition dependent), r3 = 0, stored to its record at heap 0x1000 + 16 * v through the V# in | ||
| 5 | ; s[0:3]. | ||
| 6 | ; Run: VKH_VERTICES=960 VKH_SGPRS=0,0,65536,0x30000000 VKH_HEAP=0=0 VKH_HEAP_DUMP=heap.raw vk_harness | ||
| 7 | ; vs_w64_c_readlane.spv <any fragment shader> out.raw, with and without RADV_PERFTEST=gewave32: r1 equal, r2 differs. | ||
| 8 | ; mattr: +wavefrontsize64,-wavefrontsize32 | ||
| 9 | s_mov_b64 s[10:11], exec | ||
| 10 | v_mov_b32_e32 v4, v0 | ||
| 11 | v_readlane_b32 s6, v4, 40 | ||
| 12 | v_readlane_b32 s7, v4, 7 | ||
| 13 | v_mov_b32_e32 v6, s6 | ||
| 14 | v_mov_b32_e32 v7, v4 | ||
| 15 | v_mov_b32_e32 v8, s7 | ||
| 16 | v_mov_b32_e32 v9, 0 | ||
| 17 | v_lshlrev_b32_e32 v12, 4, v0 | ||
| 18 | v_add_nc_u32_e32 v12, 0x1000, v12 | ||
| 19 | buffer_store_dwordx4 v[6:9], v12, s[0:3], 0 offen | ||
| 20 | v_mov_b32_e32 v5, 0 | ||
| 21 | exp pos0 v5, v5, v5, v5 done | ||
| 22 | exp param0 v5, v5, v5, v5 | ||
| 23 | s_endpgm | ||
diff --git a/runtime/test/shaders/w64_graphics.py b/runtime/test/shaders/w64_graphics.py index 91424af99..6e281d4b4 100644 --- a/runtime/test/shaders/w64_graphics.py +++ b/runtime/test/shaders/w64_graphics.py | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | """SHADER-10 GPU checks: wave64 pixel shaders on 32-lane subgroups (docs/design.md, "Wave64 graphics: partition | 1 | """SHADER-10 GPU checks: wave64 pixel and vertex shaders on 32-lane subgroups (docs/design.md, "Wave64 graphics: |
| 2 | invariance"). | 2 | partition invariance"). |
| 3 | 3 | ||
| 4 | python3 -I runtime/test/shaders/w64_graphics.py <build dir with spirv/> [tools dir] [name ...] | 4 | python3 -I runtime/test/shaders/w64_graphics.py <build dir with spirv/> [tools dir] [name ...] |
| 5 | 5 | ||
| @@ -16,6 +16,13 @@ A device that can require only one size (NVIDIA: 32 only) cannot run the compari | |||
| 16 | checked against the derived words (tiers A, B), the tier C check is skipped, and two environment variables let a | 16 | checked against the derived words (tiers A, B), the tier C check is skipped, and two environment variables let a |
| 17 | second device stand in for the missing size: W64G_SAVE_REF=<dir> stores each 64-lane run of a device that can require | 17 | second device stand in for the missing size: W64G_SAVE_REF=<dir> stores each 64-lane run of a device that can require |
| 18 | it, and W64G_REF=<dir> compares every run of the other device with those files (equal for A and B, different for C). | 18 | it, and W64G_REF=<dir> compares every run of the other device with those files (equal for A and B, different for C). |
| 19 | |||
| 20 | The vs_w64_* fixtures (TEST-251) are vertex shaders: Vulkan cannot require a vertex subgroup size, so the two sizes | ||
| 21 | come from RADV, which runs the VS stage as wave64 by default and as wave32 with RADV_PERFTEST=gewave32 (GFX10+). | ||
| 22 | Each draws 960 vertices with zero area (VKH_VERTICES) and stores four words per vertex to the heap; vs_w64_c_lane_id | ||
| 23 | doubles as the probe that the wave size really changed, and without RADV only the default-size checks run. RADV packs | ||
| 24 | 62 or 64 vertices into a wave64 and 30 or 32 into a wave32, so the 32-lane run is a repacking, not the two halves of | ||
| 25 | the 64-lane waves: a stricter test of tiers A and B, which key every word on the vertex index. | ||
| 19 | """ | 26 | """ |
| 20 | import os | 27 | import os |
| 21 | import struct | 28 | import struct |
| @@ -106,6 +113,25 @@ def _c_execz_sgpr(i): | |||
| 106 | return (7 if _on(i) else None, _on(i), 0, 0) # r0 = s5: 7 only where the active side ran | 113 | return (7 if _on(i) else None, _on(i), 0, 0) # r0 = s5: 7 only where the active side ran |
| 107 | 114 | ||
| 108 | 115 | ||
| 116 | # vs_w64_* fixtures: i is the vertex index, x = i % 64 and y = i // 64 as for a pixel. | ||
| 117 | def _vs_a_skip(i): | ||
| 118 | x, y = _x(i), _y(i) | ||
| 119 | return (7 * y + x if x % 4 == 1 else 1000 + x, int(x % 4 == 1), 2000 + y + (9 if y % 4 == 2 else 0), x % 4 + 1) | ||
| 120 | |||
| 121 | |||
| 122 | def _vs_b_readlane_uniform(i): | ||
| 123 | return (_x(i) + 123, 200, _x(i) + 123, 277) | ||
| 124 | |||
| 125 | |||
| 126 | def _vs_c_lane_id(i): | ||
| 127 | return (None, None, i, 0) # r0, r1 = the lane the vertex got | ||
| 128 | |||
| 129 | |||
| 130 | VS_ENV = {"VKH_SGPRS": "0,0,65536,0x30000000", "VKH_HEAP": "0=0"} | ||
| 131 | VS_VERTICES = 960 # 15 rows of 64 vertices: several waves at either size, and partial ones | ||
| 132 | VS_RECORDS = 0x1000 // 4 # heap word of vertex 0's record (4 words per vertex); below it, the atomic's counter and slots | ||
| 133 | |||
| 134 | |||
| 109 | # name -> (tier, expected words per pixel (None = not fixed), environment of the draw) | 135 | # name -> (tier, expected words per pixel (None = not fixed), environment of the draw) |
| 110 | FIXTURES = { | 136 | FIXTURES = { |
| 111 | "ps_w64_a_skip": ("A", _a_skip, {}), | 137 | "ps_w64_a_skip": ("A", _a_skip, {}), |
| @@ -122,13 +148,70 @@ FIXTURES = { | |||
| 122 | "ps_w64_c_vote_else": ("C", _c_vote_else, {}), | 148 | "ps_w64_c_vote_else": ("C", _c_vote_else, {}), |
| 123 | "ps_w64_c_scc_vote": ("C", _c_scc_vote, {}), | 149 | "ps_w64_c_scc_vote": ("C", _c_scc_vote, {}), |
| 124 | "ps_w64_c_execz_sgpr": ("C", _c_execz_sgpr, {}), | 150 | "ps_w64_c_execz_sgpr": ("C", _c_execz_sgpr, {}), |
| 151 | "vs_w64_a_skip": ("A", _vs_a_skip, VS_ENV), | ||
| 152 | "vs_w64_b_waterfall": ("B", _b_waterfall, VS_ENV), | ||
| 153 | "vs_w64_b_readlane_uniform": ("B", _vs_b_readlane_uniform, dict(VS_ENV, VKH_SGPRS=VS_ENV["VKH_SGPRS"] + ",123")), | ||
| 154 | "vs_w64_b_ballot_atomic": ("B", _b_ballot, VS_ENV), | ||
| 155 | "vs_w64_c_bcnt_export": ("C", _c_bcnt, VS_ENV), | ||
| 156 | "vs_w64_c_readlane": ("C", _c_readlane, VS_ENV), | ||
| 157 | "vs_w64_c_lane_id": ("C", _vs_c_lane_id, VS_ENV), | ||
| 125 | } | 158 | } |
| 126 | 159 | ||
| 160 | VS_PROBE = "vs_w64_c_lane_id" | ||
| 161 | _vs_applied = {} | ||
| 162 | |||
| 163 | |||
| 164 | def _radv_perftest(size): | ||
| 165 | """RADV_PERFTEST for a vertex draw at `size`. Vulkan cannot require a vertex subgroup size (requiredSubgroupSizeStages | ||
| 166 | has no VERTEX on RADV or on the AMD driver), but RADV runs the VS/GS (NGG) stage as wave32 with gewave32 and as | ||
| 167 | wave64 without it on GFX10+. Other drivers ignore the variable; the probe then finds no change.""" | ||
| 168 | flags = [f for f in os.environ.get("RADV_PERFTEST", "").split(",") if f and f != "gewave32"] | ||
| 169 | return ",".join(flags + ["gewave32"] * (size == 32)) | ||
| 170 | |||
| 171 | |||
| 172 | def _vs_wave_size(tools, spirv, size, tmp): | ||
| 173 | """Whether a vertex draw at `size` really ran at that wave size: the largest lane id of VS_PROBE is 32..63 in a | ||
| 174 | wave64 VS and below 32 in a wave32 one. Size 32 also needs size 64 to work, so that the two draws differ.""" | ||
| 175 | if size not in _vs_applied: | ||
| 176 | def top(s): | ||
| 177 | words = _draw_vs(tools, spirv, VS_PROBE, s, tmp)[0] | ||
| 178 | return None if words is None else max(w[0] for w in words) | ||
| 179 | lane64, lane32 = top(64), top(32) | ||
| 180 | _vs_applied[64] = lane64 is not None and 32 <= lane64 < 64 | ||
| 181 | _vs_applied[32] = _vs_applied[64] and lane32 is not None and lane32 < 32 | ||
| 182 | return _vs_applied[size] | ||
| 183 | |||
| 184 | |||
| 185 | def _draw_vs(tools, spirv, name, size, tmp): | ||
| 186 | """(records, heap) of one vertex draw at `size` (None: as the environment says), or (None, message).""" | ||
| 187 | env = dict(os.environ, **FIXTURES[name][2]) | ||
| 188 | if size: | ||
| 189 | env["RADV_PERFTEST"] = _radv_perftest(size) | ||
| 190 | raw, heap = Path(tmp) / f"{name}.{size}.raw", Path(tmp) / f"{name}.{size}.heap" | ||
| 191 | env.update(VKH_VERTICES=str(VS_VERTICES), VKH_HEAP_DUMP=str(heap)) | ||
| 192 | env.pop("VKH_SUBGROUP_SIZE", None) | ||
| 193 | # The triangles have zero area, so no pixel is drawn and any fragment shader does. | ||
| 194 | cmd = [os.path.join(tools, "vk_harness" + EXE), os.path.join(spirv, name + ".spv"), | ||
| 195 | os.path.join(spirv, "ps_w64_a_skip.spv"), str(raw)] | ||
| 196 | r = subprocess.run(cmd, capture_output=True, text=True, env=env, timeout=120) | ||
| 197 | out = r.stdout + r.stderr | ||
| 198 | if r.returncode == UNSUPPORTED: | ||
| 199 | return None, "unsupported: " + out.strip().splitlines()[-1] | ||
| 200 | if r.returncode or not heap.is_file(): | ||
| 201 | return None, f"exit {r.returncode}: {' | '.join(out.strip().splitlines()[-3:])}" | ||
| 202 | words = list(struct.unpack("<%dI" % (65536 // 4), heap.read_bytes())) | ||
| 203 | return [tuple(words[VS_RECORDS + 4 * v:VS_RECORDS + 4 * v + 4]) for v in range(VS_VERTICES)], words | ||
| 204 | |||
| 127 | 205 | ||
| 128 | def draw(tools, spirv, name, size, tmp): | 206 | def draw(tools, spirv, name, size, tmp): |
| 129 | """(words per pixel, heap words or None, applied) of one draw. `applied`: the required size took effect (size | 207 | """(words per pixel, heap words or None, applied) of one draw. `applied`: the required size took effect (size |
| 130 | None: no size asked, applied is None). The words are None when the draw failed; then `heap` is the message.""" | 208 | None: no size asked, applied is None). The words are None when the draw failed; then `heap` is the message.""" |
| 131 | tier, expect, extra = FIXTURES[name] | 209 | tier, expect, extra = FIXTURES[name] |
| 210 | if name.startswith("vs_"): | ||
| 211 | words, heap = _draw_vs(tools, spirv, name, size, tmp) | ||
| 212 | if words is None: | ||
| 213 | return None, heap, None | ||
| 214 | return words, heap, _vs_wave_size(tools, spirv, size, tmp) if size else None | ||
| 132 | env = dict(os.environ, **extra) | 215 | env = dict(os.environ, **extra) |
| 133 | env.pop("VKH_SUBGROUP_SIZE", None) | 216 | env.pop("VKH_SUBGROUP_SIZE", None) |
| 134 | if size: | 217 | if size: |
| @@ -168,15 +251,16 @@ def expected_problem(name, words, heap): | |||
| 168 | if wrong: | 251 | if wrong: |
| 169 | i, w, want = wrong[0] | 252 | i, w, want = wrong[0] |
| 170 | return f"{len(wrong)} of {len(words)} pixels differ from the derived words, first ({_x(i)},{_y(i)}): got {w}, want {want}" | 253 | return f"{len(wrong)} of {len(words)} pixels differ from the derived words, first ({_x(i)},{_y(i)}): got {w}, want {want}" |
| 171 | if name == "ps_w64_b_ballot_atomic": | 254 | if name.endswith("_b_ballot_atomic"): |
| 172 | want = sorted(_y(i) * W + _x(i) + 1 for i in range(W * H) if _x(i) % 4 == 1) | 255 | want = sorted(i + 1 for i in range(len(words)) if _x(i) % 4 == 1) |
| 173 | n = len(want) | 256 | n = len(want) |
| 174 | if heap[0] != n: | 257 | if heap[0] != n: |
| 175 | return f"counter is {heap[0]}, want {n}" | 258 | return f"counter is {heap[0]}, want {n}" |
| 176 | slots = heap[64:64 + n] | 259 | slots = heap[64:64 + n] |
| 177 | if sorted(slots) != want: | 260 | if sorted(slots) != want: |
| 178 | return f"slot words are not the {n} wanted pixel numbers once each ({len(set(slots))} distinct)" | 261 | return f"slot words are not the {n} wanted pixel numbers once each ({len(set(slots))} distinct)" |
| 179 | if any(heap[64 + n:]) or any(heap[1:64]): | 262 | end = VS_RECORDS if name.startswith("vs_") else len(heap) # the vertex records follow the slots |
| 263 | if any(heap[64 + n:end]) or any(heap[1:64]): | ||
| 180 | return "words outside the counter and the slots were written" | 264 | return "words outside the counter and the slots were written" |
| 181 | return "" | 265 | return "" |
| 182 | 266 | ||
| @@ -184,7 +268,7 @@ def expected_problem(name, words, heap): | |||
| 184 | def comparable(name, words, heap): | 268 | def comparable(name, words, heap): |
| 185 | """What two draws of the same fixture must share when the shader is partition invariant.""" | 269 | """What two draws of the same fixture must share when the shader is partition invariant.""" |
| 186 | stable = [tuple(0 if g is None else v for g, v in zip(FIXTURES[name][1](i), w)) for i, w in enumerate(words)] | 270 | stable = [tuple(0 if g is None else v for g, v in zip(FIXTURES[name][1](i), w)) for i, w in enumerate(words)] |
| 187 | if name == "ps_w64_b_ballot_atomic": | 271 | if name.endswith("_b_ballot_atomic"): |
| 188 | return stable, sorted(heap[64:64 + heap[0]]), heap[0] | 272 | return stable, sorted(heap[64:64 + heap[0]]), heap[0] |
| 189 | return stable, None, None | 273 | return stable, None, None |
| 190 | 274 | ||
| @@ -240,7 +324,7 @@ def check(tools, spirv, name): | |||
| 240 | if not partition_dependent(name, ref_words, words): | 324 | if not partition_dependent(name, ref_words, words): |
| 241 | return "tier C but the run equals the 64-lane reference: the detector is wrong" | 325 | return "tier C but the run equals the 64-lane reference: the detector is wrong" |
| 242 | compared = True | 326 | compared = True |
| 243 | elif name != "ps_w64_b_ballot_atomic" and comparable(name, ref_words, None) != comparable(name, words, None): | 327 | elif not name.endswith("_b_ballot_atomic") and comparable(name, ref_words, None) != comparable(name, words, None): |
| 244 | return "the run differs from the 64-lane reference" | 328 | return "the run differs from the 64-lane reference" |
| 245 | if tier == "C" and not compared: | 329 | if tier == "C" and not compared: |
| 246 | return Skip("SKIP (tier C needs a device that can require both 64 and 32, or W64G_REF)") | 330 | return Skip("SKIP (tier C needs a device that can require both 64 and 32, or W64G_REF)") |
diff --git a/runtime/test/typeless_rtv_test.cpp b/runtime/test/typeless_rtv_test.cpp index be935c123..87fa46acb 100644 --- a/runtime/test/typeless_rtv_test.cpp +++ b/runtime/test/typeless_rtv_test.cpp | |||
| @@ -262,9 +262,27 @@ int main() { | |||
| 262 | EXPECT(rejects(wrong, {1, 0, 1, 2, ColorViewFormat::rgba8_srgb}, ReplayResult::invalid_subresource)); | 262 | EXPECT(rejects(wrong, {1, 0, 1, 2, ColorViewFormat::rgba8_srgb}, ReplayResult::invalid_subresource)); |
| 263 | wrong = binding; wrong.volume = true; | 263 | wrong = binding; wrong.volume = true; |
| 264 | EXPECT(rejects(wrong, {1, 0, 0, 1, ColorViewFormat::rgba8_srgb})); | 264 | EXPECT(rejects(wrong, {1, 0, 0, 1, ColorViewFormat::rgba8_srgb})); |
| 265 | wrong = binding; wrong.samples = 4; | 265 | { |
| 266 | EXPECT(rejects(wrong, {1, 0, 0, 1, ColorViewFormat::rgba8_uint})); | 266 | auto msaa = binding; msaa.samples = 4; |
| 267 | checks += 8; | 267 | for (const auto [format, expected] : formats) { |
| 268 | CommandList ms_list; | ||
| 269 | EXPECT(ms_list.clear_render_target({1, 0, 0, 1, format}, color) && ms_list.close()); | ||
| 270 | EXPECT(run(ms_list, msaa, vk) == ReplayResult::success); | ||
| 271 | const bool attachment = format != ColorViewFormat::rgba8_unorm; | ||
| 272 | EXPECT(image_clears == (attachment ? 0u : 1u) && attachment_clears == (attachment ? 1u : 0u)); | ||
| 273 | EXPECT(!attachment || (requested_format == expected && rendering_layers == 1)); | ||
| 274 | ++checks; | ||
| 275 | } | ||
| 276 | auto msaa_layered = layered; msaa_layered.mip_levels = 1; msaa_layered.samples = 4; | ||
| 277 | CommandList ms_layer_list; | ||
| 278 | EXPECT(ms_layer_list.clear_render_target({1, 0, 1, 2, ColorViewFormat::rgba8_srgb}, color) && | ||
| 279 | ms_layer_list.close()); | ||
| 280 | EXPECT(run(ms_layer_list, msaa_layered, vk) == ReplayResult::success); | ||
| 281 | EXPECT(attachment_clears == 1 && requested_format == VK_FORMAT_R8G8B8A8_SRGB); | ||
| 282 | EXPECT(requested_range.baseArrayLayer == 1 && requested_range.layerCount == 2 && rendering_layers == 2); | ||
| 283 | ++checks; | ||
| 284 | } | ||
| 285 | checks += 7; | ||
| 268 | CommandList list; | 286 | CommandList list; |
| 269 | EXPECT(list.clear_render_target({1, 0, 0, 1, ColorViewFormat::rgba8_srgb}, color) && list.close()); | 287 | EXPECT(list.clear_render_target({1, 0, 0, 1, ColorViewFormat::rgba8_srgb}, color) && list.close()); |
| 270 | auto unavailable = vk; unavailable.begin_rendering = nullptr; | 288 | auto unavailable = vk; unavailable.begin_rendering = nullptr; |
diff --git a/runtime/test/vk_bc_zero_init_test.cpp b/runtime/test/vk_bc_zero_init_test.cpp new file mode 100644 index 000000000..6edc36fcb --- /dev/null +++ b/runtime/test/vk_bc_zero_init_test.cpp | |||
| @@ -0,0 +1,388 @@ | |||
| 1 | // Committed block-compressed (BC*) texture zero-initialization regression (D3D-220, #1725): | ||
| 2 | // D3D12 committed textures start zeroed unless D3D12_HEAP_FLAG_CREATE_NOT_ZEROED is set. Vulkan forbids | ||
| 3 | // vkCmdClearColorImage on BC formats, so detail::initialize() must zero-fill them via vkCmdCopyBufferToImage | ||
| 4 | // from either the device zero page (vk.zero_buffer) or a zeroed transfer-scratch chunk (vk.copy_scratch). | ||
| 5 | // | ||
| 6 | // Cases (all on explicitly poisoned 0x5A backing memory when host-visible, plus default device memory): | ||
| 7 | // 1. Path A (vk.zero_buffer): CopyTextureRegion R32G32_UINT 2x2 -> BC1 16x16 at (8, 4) — untouched blocks are 0x00. | ||
| 8 | // 2. Path A (vk.zero_buffer): CopyResource R32G32_UINT 3x2 -> BC1 12x8, 2 mips — mip 1 untouched block (bytes 56..63) is 0x00. | ||
| 9 | // 3. Path A (tiny 32-byte vk.zero_buffer): 32x32 BC7 image tiled in multiple row/column chunks — all 1024 bytes are 0x00. | ||
| 10 | // 4. Path B (enable_copy_scratch, no zero_buffer — matches d3d12_copy_xfmt): both D3D-220 cases match bit for bit. | ||
| 11 | // 5. not_zeroed = true (CREATE_NOT_ZEROED): zero-fill is skipped. | ||
| 12 | // Skips with exit code 77 when no Vulkan 1.3 device with textureCompressionBC is available. No game data. | ||
| 13 | #include "vk_test_device.h" | ||
| 14 | #include "../src/vulkan_backend.h" | ||
| 15 | |||
| 16 | #include <algorithm> | ||
| 17 | #include <cstdint> | ||
| 18 | #include <cstdio> | ||
| 19 | #include <cstring> | ||
| 20 | #include <vector> | ||
| 21 | |||
| 22 | #define EXPECT(condition) do { \ | ||
| 23 | if (!(condition)) { std::fprintf(stderr, "line %d: %s\n", __LINE__, #condition); return 1; } \ | ||
| 24 | } while (0) | ||
| 25 | |||
| 26 | namespace { | ||
| 27 | |||
| 28 | struct OwnedImage { | ||
| 29 | VkDevice device = VK_NULL_HANDLE; | ||
| 30 | PFN_vkDestroyImage destroy_image = nullptr; | ||
| 31 | PFN_vkFreeMemory free_memory = nullptr; | ||
| 32 | VkImage image = VK_NULL_HANDLE; | ||
| 33 | VkDeviceMemory memory = VK_NULL_HANDLE; | ||
| 34 | bool poisoned = false; | ||
| 35 | |||
| 36 | ~OwnedImage() { | ||
| 37 | if (image && destroy_image) destroy_image(device, image, nullptr); | ||
| 38 | if (memory && free_memory) free_memory(device, memory, nullptr); | ||
| 39 | } | ||
| 40 | OwnedImage(const OwnedImage&) = delete; | ||
| 41 | OwnedImage& operator=(const OwnedImage&) = delete; | ||
| 42 | OwnedImage() = default; | ||
| 43 | }; | ||
| 44 | |||
| 45 | bool create_image(const vktest::Device& d, VkFormat format, std::uint32_t width, std::uint32_t height, | ||
| 46 | std::uint32_t mips, VkBuffer poison_buf, OwnedImage& out) { | ||
| 47 | out.device = d.device; | ||
| 48 | out.destroy_image = d.fn<PFN_vkDestroyImage>("vkDestroyImage"); | ||
| 49 | out.free_memory = d.fn<PFN_vkFreeMemory>("vkFreeMemory"); | ||
| 50 | |||
| 51 | VkImageCreateInfo info{VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO}; | ||
| 52 | info.imageType = VK_IMAGE_TYPE_2D; | ||
| 53 | info.format = format; | ||
| 54 | info.extent = {width, height, 1}; | ||
| 55 | info.mipLevels = mips; | ||
| 56 | info.arrayLayers = 1; | ||
| 57 | info.samples = VK_SAMPLE_COUNT_1_BIT; | ||
| 58 | info.tiling = VK_IMAGE_TILING_OPTIMAL; | ||
| 59 | info.usage = VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_SAMPLED_BIT; | ||
| 60 | if (d.fn<PFN_vkCreateImage>("vkCreateImage")(d.device, &info, nullptr, &out.image) != VK_SUCCESS) return false; | ||
| 61 | |||
| 62 | VkMemoryRequirements req{}; | ||
| 63 | d.fn<PFN_vkGetImageMemoryRequirements>("vkGetImageMemoryRequirements")(d.device, out.image, &req); | ||
| 64 | VkPhysicalDeviceMemoryProperties mp{}; | ||
| 65 | d.instance_fn<PFN_vkGetPhysicalDeviceMemoryProperties>("vkGetPhysicalDeviceMemoryProperties")(d.physical, &mp); | ||
| 66 | |||
| 67 | std::uint32_t type = UINT32_MAX; | ||
| 68 | for (std::uint32_t i = 0; i < mp.memoryTypeCount; ++i) { | ||
| 69 | if (!(req.memoryTypeBits & (1u << i))) continue; | ||
| 70 | if (type == UINT32_MAX) type = i; | ||
| 71 | if (mp.memoryTypes[i].propertyFlags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) { | ||
| 72 | type = i; | ||
| 73 | break; | ||
| 74 | } | ||
| 75 | } | ||
| 76 | if (type == UINT32_MAX) return false; | ||
| 77 | |||
| 78 | VkMemoryAllocateInfo alloc{VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO}; | ||
| 79 | alloc.allocationSize = req.size; | ||
| 80 | alloc.memoryTypeIndex = type; | ||
| 81 | if (d.fn<PFN_vkAllocateMemory>("vkAllocateMemory")(d.device, &alloc, nullptr, &out.memory) != VK_SUCCESS) | ||
| 82 | return false; | ||
| 83 | if (d.fn<PFN_vkBindImageMemory>("vkBindImageMemory")(d.device, out.image, out.memory, 0) != VK_SUCCESS) | ||
| 84 | return false; | ||
| 85 | |||
| 86 | // Pre-fill every mip on the GPU with 0x5A so stale recycled VRAM is modeled deterministically on every GPU | ||
| 87 | // (discrete and integrated alike), before registering the image in LayoutTracker as UNDEFINED. | ||
| 88 | if (poison_buf) { | ||
| 89 | const bool ok = const_cast<vktest::Device&>(d).run([&](VkCommandBuffer cb) { | ||
| 90 | VkImageMemoryBarrier to_dst{VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER}; | ||
| 91 | to_dst.dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; | ||
| 92 | to_dst.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED; | ||
| 93 | to_dst.newLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL; | ||
| 94 | to_dst.srcQueueFamilyIndex = to_dst.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; | ||
| 95 | to_dst.image = out.image; | ||
| 96 | to_dst.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, mips, 0, 1}; | ||
| 97 | d.fn<PFN_vkCmdPipelineBarrier>("vkCmdPipelineBarrier")(cb, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, | ||
| 98 | VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, nullptr, 0, | ||
| 99 | nullptr, 1, &to_dst); | ||
| 100 | std::vector<VkBufferImageCopy> regions; | ||
| 101 | for (std::uint32_t m = 0; m < mips; ++m) { | ||
| 102 | VkBufferImageCopy r{}; | ||
| 103 | r.imageSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, m, 0, 1}; | ||
| 104 | r.imageExtent = {std::max(1u, width >> m), std::max(1u, height >> m), 1}; | ||
| 105 | regions.push_back(r); | ||
| 106 | } | ||
| 107 | d.fn<PFN_vkCmdCopyBufferToImage>("vkCmdCopyBufferToImage")( | ||
| 108 | cb, poison_buf, out.image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, std::uint32_t(regions.size()), | ||
| 109 | regions.data()); | ||
| 110 | return true; | ||
| 111 | }); | ||
| 112 | if (!ok) return false; | ||
| 113 | out.poisoned = true; | ||
| 114 | } | ||
| 115 | return true; | ||
| 116 | } | ||
| 117 | |||
| 118 | VkDeviceMemory allocate_device_local(const vktest::Device& d, const VkMemoryRequirements& req) { | ||
| 119 | VkPhysicalDeviceMemoryProperties mp{}; | ||
| 120 | d.instance_fn<PFN_vkGetPhysicalDeviceMemoryProperties>("vkGetPhysicalDeviceMemoryProperties")(d.physical, &mp); | ||
| 121 | std::uint32_t chosen = UINT32_MAX; | ||
| 122 | for (std::uint32_t i = 0; i < mp.memoryTypeCount; ++i) { | ||
| 123 | if (!(req.memoryTypeBits & (1u << i))) continue; | ||
| 124 | if (chosen == UINT32_MAX) chosen = i; | ||
| 125 | if (mp.memoryTypes[i].propertyFlags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) { | ||
| 126 | chosen = i; | ||
| 127 | break; | ||
| 128 | } | ||
| 129 | } | ||
| 130 | if (chosen == UINT32_MAX) return VK_NULL_HANDLE; | ||
| 131 | VkMemoryAllocateInfo info{VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO}; | ||
| 132 | info.allocationSize = req.size; | ||
| 133 | info.memoryTypeIndex = chosen; | ||
| 134 | VkDeviceMemory mem = VK_NULL_HANDLE; | ||
| 135 | if (d.fn<PFN_vkAllocateMemory>("vkAllocateMemory")(d.device, &info, nullptr, &mem) != VK_SUCCESS) | ||
| 136 | return VK_NULL_HANDLE; | ||
| 137 | return mem; | ||
| 138 | } | ||
| 139 | |||
| 140 | // Runs the two D3D-220 partial uncompressed -> BC1 copies on a given context/queue: | ||
| 141 | // (a) CopyTextureRegion R32G32_UINT 2x2 -> BC1 16x16 at (8, 4) | ||
| 142 | // (b) CopyResource R32G32_UINT 3x2 -> BC1 12x8, 2 mips | ||
| 143 | int run_d3d220_cases(const vktest::Device& d, leonida::VulkanContext& ctx, leonida::VulkanQueue& q, | ||
| 144 | VkBuffer poison_buf, VkBuffer up_buf, void* up_ptr, VkBuffer rb_buf, void* rb_ptr, | ||
| 145 | const char* label) { | ||
| 146 | using namespace leonida; | ||
| 147 | |||
| 148 | auto* up = static_cast<std::uint8_t*>(up_ptr); | ||
| 149 | auto* rb = static_cast<std::uint8_t*>(rb_ptr); | ||
| 150 | for (std::size_t i = 0; i < 4096; ++i) up[i] = static_cast<std::uint8_t>(i * 7 + 3); | ||
| 151 | |||
| 152 | // Case (a): CopyTextureRegion R32G32_UINT 2x2 -> BC1 16x16 at (8, 4). | ||
| 153 | // Destination has 4x4 BC1 blocks (8 bytes/block). Only blocks (2,1), (3,1), (2,2), (3,2) are written; | ||
| 154 | // the other 12 blocks (including block (0,0) at byte 0) must be 0x00. | ||
| 155 | { | ||
| 156 | OwnedImage src_img, dst_img; | ||
| 157 | EXPECT(create_image(d, VK_FORMAT_R32G32_UINT, 2, 2, 1, VK_NULL_HANDLE, src_img)); | ||
| 158 | EXPECT(create_image(d, VK_FORMAT_BC1_RGBA_UNORM_BLOCK, 16, 16, 1, poison_buf, dst_img)); | ||
| 159 | |||
| 160 | ResourceBinding src_rb{}; | ||
| 161 | src_rb.image = src_img.image; | ||
| 162 | src_rb.format = VK_FORMAT_R32G32_UINT; | ||
| 163 | src_rb.aspects = VK_IMAGE_ASPECT_COLOR_BIT; | ||
| 164 | src_rb.width = 2; src_rb.height = 2; src_rb.mip_levels = 1; src_rb.array_layers = 1; src_rb.depth = 1; src_rb.samples = 1; | ||
| 165 | |||
| 166 | ResourceBinding dst_rb{}; | ||
| 167 | dst_rb.image = dst_img.image; | ||
| 168 | dst_rb.format = VK_FORMAT_BC1_RGBA_UNORM_BLOCK; | ||
| 169 | dst_rb.aspects = VK_IMAGE_ASPECT_COLOR_BIT; | ||
| 170 | dst_rb.width = 16; dst_rb.height = 16; dst_rb.mip_levels = 1; dst_rb.array_layers = 1; dst_rb.depth = 1; dst_rb.samples = 1; | ||
| 171 | |||
| 172 | ctx.add_resource(10, src_rb, VK_IMAGE_LAYOUT_UNDEFINED); | ||
| 173 | ctx.add_resource(11, dst_rb, VK_IMAGE_LAYOUT_UNDEFINED); | ||
| 174 | std::memset(rb, 0xCD, 4096); | ||
| 175 | |||
| 176 | CommandList list; | ||
| 177 | CopyLocation up_loc{1, true, 0, 0, 2, 2, 1, 256}; | ||
| 178 | CopyLocation src_loc{10, false, 0, 0, 0, 0, 0, 0}; | ||
| 179 | CopyLocation dst_loc{11, false, 0, 0, 0, 0, 0, 0}; | ||
| 180 | CopyLocation rb_loc{2, true, 0, 0, 16, 16, 1, 256}; | ||
| 181 | EXPECT(list.copy_texture({src_loc, 0, 0, 0, up_loc, false, {}})); | ||
| 182 | EXPECT(list.transition({10, all_subresources, d3d12_state::copy_dest, d3d12_state::copy_source})); | ||
| 183 | EXPECT(list.copy_texture({dst_loc, 8, 4, 0, src_loc, false, {}})); | ||
| 184 | EXPECT(list.transition({11, all_subresources, d3d12_state::copy_dest, d3d12_state::copy_source})); | ||
| 185 | EXPECT(list.copy_texture({rb_loc, 0, 0, 0, dst_loc, false, {}})); | ||
| 186 | EXPECT(list.close()); | ||
| 187 | |||
| 188 | const CommandList* ptr = &list; | ||
| 189 | EXPECT(q.execute({&ptr, 1}) == ReplayResult::success); | ||
| 190 | EXPECT(q.idle()); | ||
| 191 | |||
| 192 | // Check every 8-byte block across the 4x4 block grid (row pitch 256). | ||
| 193 | for (std::uint32_t by = 0; by < 4; ++by) { | ||
| 194 | for (std::uint32_t bx = 0; bx < 4; ++bx) { | ||
| 195 | const std::uint8_t* got = rb + std::size_t(by) * 256 + std::size_t(bx) * 8; | ||
| 196 | if (bx >= 2 && bx < 4 && by >= 1 && by < 3) { | ||
| 197 | const std::uint8_t* want = up + std::size_t(by - 1) * 256 + std::size_t(bx - 2) * 8; | ||
| 198 | EXPECT(std::memcmp(got, want, 8) == 0); | ||
| 199 | } else { | ||
| 200 | for (int k = 0; k < 8; ++k) EXPECT(got[k] == 0x00); | ||
| 201 | } | ||
| 202 | } | ||
| 203 | } | ||
| 204 | ctx.remove_resource(10); | ||
| 205 | ctx.remove_resource(11); | ||
| 206 | } | ||
| 207 | |||
| 208 | // Case (b): CopyResource R32G32_UINT 3x2 -> BC1 12x8, 2 mips. | ||
| 209 | // Mip 0: 3x2 -> 12x8 (3x2 = 6 blocks written). | ||
| 210 | // Mip 1: 1x1 -> 6x4 (2x1 = 2 blocks; block 0 is written, block 1 at bytes 8..15 of mip 1 is untouched -> 0x00). | ||
| 211 | { | ||
| 212 | OwnedImage src_img, dst_img; | ||
| 213 | EXPECT(create_image(d, VK_FORMAT_R32G32_UINT, 3, 2, 2, VK_NULL_HANDLE, src_img)); | ||
| 214 | EXPECT(create_image(d, VK_FORMAT_BC1_RGBA_UNORM_BLOCK, 12, 8, 2, poison_buf, dst_img)); | ||
| 215 | |||
| 216 | ResourceBinding src_rb{}; | ||
| 217 | src_rb.image = src_img.image; | ||
| 218 | src_rb.format = VK_FORMAT_R32G32_UINT; | ||
| 219 | src_rb.aspects = VK_IMAGE_ASPECT_COLOR_BIT; | ||
| 220 | src_rb.width = 3; src_rb.height = 2; src_rb.mip_levels = 2; src_rb.array_layers = 1; src_rb.depth = 1; src_rb.samples = 1; | ||
| 221 | |||
| 222 | ResourceBinding dst_rb{}; | ||
| 223 | dst_rb.image = dst_img.image; | ||
| 224 | dst_rb.format = VK_FORMAT_BC1_RGBA_UNORM_BLOCK; | ||
| 225 | dst_rb.aspects = VK_IMAGE_ASPECT_COLOR_BIT; | ||
| 226 | dst_rb.width = 12; dst_rb.height = 8; dst_rb.mip_levels = 2; dst_rb.array_layers = 1; dst_rb.depth = 1; dst_rb.samples = 1; | ||
| 227 | |||
| 228 | ctx.add_resource(12, src_rb, VK_IMAGE_LAYOUT_UNDEFINED); | ||
| 229 | ctx.add_resource(13, dst_rb, VK_IMAGE_LAYOUT_UNDEFINED); | ||
| 230 | std::memset(rb, 0xCD, 4096); | ||
| 231 | |||
| 232 | // Upload mip 0 at offset 0 (2 rows * 256 = 512 bytes) and mip 1 at offset 512 (1 row * 256). | ||
| 233 | CommandList list; | ||
| 234 | CopyLocation up0{1, true, 0, 0, 3, 2, 1, 256}; | ||
| 235 | CopyLocation up1{1, true, 0, 512, 1, 1, 1, 256}; | ||
| 236 | CopyLocation src0{12, false, 0, 0, 0, 0, 0, 0}; | ||
| 237 | CopyLocation src1{12, false, 1, 0, 0, 0, 0, 0}; | ||
| 238 | CopyLocation dst0{13, false, 0, 0, 0, 0, 0, 0}; | ||
| 239 | CopyLocation dst1{13, false, 1, 0, 0, 0, 0, 0}; | ||
| 240 | CopyLocation rb0{2, true, 0, 0, 12, 8, 1, 256}; | ||
| 241 | CopyLocation rb1{2, true, 0, 512, 6, 4, 1, 256}; | ||
| 242 | EXPECT(list.copy_texture({src0, 0, 0, 0, up0, false, {}})); | ||
| 243 | EXPECT(list.copy_texture({src1, 0, 0, 0, up1, false, {}})); | ||
| 244 | EXPECT(list.transition({12, all_subresources, d3d12_state::copy_dest, d3d12_state::copy_source})); | ||
| 245 | EXPECT(list.copy_resource({13, 12})); | ||
| 246 | EXPECT(list.transition({13, all_subresources, d3d12_state::copy_dest, d3d12_state::copy_source})); | ||
| 247 | EXPECT(list.copy_texture({rb0, 0, 0, 0, dst0, false, {}})); | ||
| 248 | EXPECT(list.copy_texture({rb1, 0, 0, 0, dst1, false, {}})); | ||
| 249 | EXPECT(list.close()); | ||
| 250 | |||
| 251 | const CommandList* ptr = &list; | ||
| 252 | EXPECT(q.execute({&ptr, 1}) == ReplayResult::success); | ||
| 253 | EXPECT(q.idle()); | ||
| 254 | |||
| 255 | // Mip 0: 2 rows of 3 blocks (24 bytes per row). | ||
| 256 | EXPECT(std::memcmp(rb + 0, up + 0, 24) == 0); | ||
| 257 | EXPECT(std::memcmp(rb + 256, up + 256, 24) == 0); | ||
| 258 | // Mip 1: block 0 (bytes 0..7) matches up + 512; untouched block 1 (bytes 8..15) must be 0x00. | ||
| 259 | EXPECT(std::memcmp(rb + 512, up + 512, 8) == 0); | ||
| 260 | for (int k = 8; k < 16; ++k) EXPECT(rb[512 + k] == 0x00); | ||
| 261 | |||
| 262 | ctx.remove_resource(12); | ||
| 263 | ctx.remove_resource(13); | ||
| 264 | } | ||
| 265 | |||
| 266 | (void)up_buf; | ||
| 267 | (void)rb_buf; | ||
| 268 | std::printf("bc zero-init (%s): partial CopyTextureRegion and 2-mip CopyResource ok\n", label); | ||
| 269 | return 0; | ||
| 270 | } | ||
| 271 | |||
| 272 | } // namespace | ||
| 273 | |||
| 274 | int main() { | ||
| 275 | using namespace leonida; | ||
| 276 | |||
| 277 | vktest::Device d; | ||
| 278 | if (!d.create(false) || !d.bc) { | ||
| 279 | std::fprintf(stderr, "vk_bc_zero_init_test: no Vulkan 1.3 device with BC support, skipped\n"); | ||
| 280 | return 77; | ||
| 281 | } | ||
| 282 | |||
| 283 | void* up_ptr = nullptr; | ||
| 284 | void* rb_ptr = nullptr; | ||
| 285 | void* zero_ptr = nullptr; | ||
| 286 | void* poison_ptr = nullptr; | ||
| 287 | const VkBuffer up_buf = d.buffer(4096, VK_BUFFER_USAGE_TRANSFER_SRC_BIT, &up_ptr); | ||
| 288 | const VkBuffer rb_buf = d.buffer(8192, VK_BUFFER_USAGE_TRANSFER_DST_BIT, &rb_ptr); | ||
| 289 | const VkBuffer zero_buf = d.buffer(65536, VK_BUFFER_USAGE_TRANSFER_SRC_BIT, &zero_ptr); | ||
| 290 | const VkBuffer poison_buf = d.buffer(4096, VK_BUFFER_USAGE_TRANSFER_SRC_BIT, &poison_ptr); | ||
| 291 | EXPECT(up_buf && rb_buf && zero_buf && poison_buf); | ||
| 292 | std::memset(zero_ptr, 0, 65536); | ||
| 293 | std::memset(poison_ptr, 0x5A, 4096); | ||
| 294 | |||
| 295 | ResourceBinding up_rb{}; | ||
| 296 | up_rb.buffer = up_buf; | ||
| 297 | up_rb.size = 4096; | ||
| 298 | ResourceBinding rb_rb{}; | ||
| 299 | rb_rb.buffer = rb_buf; | ||
| 300 | rb_rb.size = 8192; | ||
| 301 | rb_rb.host_readable = true; | ||
| 302 | |||
| 303 | // Path A: device arena zero page (vk.zero_buffer). | ||
| 304 | { | ||
| 305 | VulkanContext ctx(d.device_proc, d.device, true); | ||
| 306 | EXPECT(ctx.loaded()); | ||
| 307 | ctx.set_zero_page(zero_buf, 0, 65536); | ||
| 308 | ctx.add_resource(1, up_rb); | ||
| 309 | ctx.add_resource(2, rb_rb); | ||
| 310 | VulkanQueue q(ctx, d.queue, d.family); | ||
| 311 | EXPECT(q.ok()); | ||
| 312 | EXPECT(run_d3d220_cases(d, ctx, q, poison_buf, up_buf, up_ptr, rb_buf, rb_ptr, "zero_buffer") == 0); | ||
| 313 | |||
| 314 | // Multi-tile chunking: shrink zero_page to 32 bytes (2 BC7 blocks) and zero-init a 32x32 BC7 image (64 blocks). | ||
| 315 | ctx.set_zero_page(zero_buf, 16, 32); | ||
| 316 | OwnedImage bc7_img; | ||
| 317 | EXPECT(create_image(d, VK_FORMAT_BC7_UNORM_BLOCK, 32, 32, 1, poison_buf, bc7_img)); | ||
| 318 | ResourceBinding bc7_rb{}; | ||
| 319 | bc7_rb.image = bc7_img.image; | ||
| 320 | bc7_rb.format = VK_FORMAT_BC7_UNORM_BLOCK; | ||
| 321 | bc7_rb.aspects = VK_IMAGE_ASPECT_COLOR_BIT; | ||
| 322 | bc7_rb.width = 32; bc7_rb.height = 32; bc7_rb.mip_levels = 1; bc7_rb.array_layers = 1; bc7_rb.depth = 1; bc7_rb.samples = 1; | ||
| 323 | ctx.add_resource(20, bc7_rb, VK_IMAGE_LAYOUT_UNDEFINED); | ||
| 324 | std::memset(rb_ptr, 0xCD, 8192); | ||
| 325 | |||
| 326 | CommandList list; | ||
| 327 | EXPECT(list.transition({20, all_subresources, d3d12_state::copy_dest, d3d12_state::copy_source})); | ||
| 328 | CopyLocation bc7_loc{20, false, 0, 0, 0, 0, 0, 0}; | ||
| 329 | CopyLocation rb_loc{2, true, 0, 0, 32, 32, 1, 256}; | ||
| 330 | EXPECT(list.copy_texture({rb_loc, 0, 0, 0, bc7_loc, false, {}})); | ||
| 331 | EXPECT(list.close()); | ||
| 332 | const CommandList* ptr = &list; | ||
| 333 | EXPECT(q.execute({&ptr, 1}) == ReplayResult::success); | ||
| 334 | EXPECT(q.idle()); | ||
| 335 | |||
| 336 | auto* rb = static_cast<std::uint8_t*>(rb_ptr); | ||
| 337 | for (std::uint32_t row = 0; row < 8; ++row) | ||
| 338 | for (std::uint32_t x = 0; x < 8 * 16; ++x) | ||
| 339 | EXPECT(rb[row * 256 + x] == 0x00); | ||
| 340 | ctx.remove_resource(20); | ||
| 341 | std::printf("bc zero-init (tiny 32-byte zero_buffer chunking on 32x32 BC7): ok\n"); | ||
| 342 | |||
| 343 | // CREATE_NOT_ZEROED (not_zeroed = true) must skip zero-fill. | ||
| 344 | ctx.set_zero_page(zero_buf, 0, 65536); | ||
| 345 | OwnedImage nz_img; | ||
| 346 | EXPECT(create_image(d, VK_FORMAT_BC1_RGBA_UNORM_BLOCK, 16, 16, 1, poison_buf, nz_img)); | ||
| 347 | EXPECT(nz_img.poisoned); | ||
| 348 | ResourceBinding nz_rb{}; | ||
| 349 | nz_rb.image = nz_img.image; | ||
| 350 | nz_rb.format = VK_FORMAT_BC1_RGBA_UNORM_BLOCK; | ||
| 351 | nz_rb.aspects = VK_IMAGE_ASPECT_COLOR_BIT; | ||
| 352 | nz_rb.width = 16; nz_rb.height = 16; nz_rb.mip_levels = 1; nz_rb.array_layers = 1; nz_rb.depth = 1; nz_rb.samples = 1; | ||
| 353 | nz_rb.not_zeroed = true; | ||
| 354 | ctx.add_resource(21, nz_rb, VK_IMAGE_LAYOUT_UNDEFINED); | ||
| 355 | std::memset(rb_ptr, 0xCD, 8192); | ||
| 356 | |||
| 357 | CommandList nz_list; | ||
| 358 | EXPECT(nz_list.transition({21, all_subresources, d3d12_state::copy_dest, d3d12_state::copy_source})); | ||
| 359 | CopyLocation nz_loc{21, false, 0, 0, 0, 0, 0, 0}; | ||
| 360 | CopyLocation nz_rb_loc{2, true, 0, 0, 16, 16, 1, 256}; | ||
| 361 | EXPECT(nz_list.copy_texture({nz_rb_loc, 0, 0, 0, nz_loc, false, {}})); | ||
| 362 | EXPECT(nz_list.close()); | ||
| 363 | const CommandList* nz_ptr = &nz_list; | ||
| 364 | EXPECT(q.execute({&nz_ptr, 1}) == ReplayResult::success); | ||
| 365 | EXPECT(q.idle()); | ||
| 366 | EXPECT(rb[0] == 0x5A); | ||
| 367 | ctx.remove_resource(21); | ||
| 368 | std::printf("bc zero-init (not_zeroed = true skips zero-fill): ok\n"); | ||
| 369 | } | ||
| 370 | |||
| 371 | // Path B: copy_scratch + vkCmdFillBuffer fallback (no zero_buffer, matching d3d12_copy_xfmt without BDA). | ||
| 372 | { | ||
| 373 | VulkanContext ctx(d.device_proc, d.device, true); | ||
| 374 | EXPECT(ctx.loaded()); | ||
| 375 | ctx.enable_copy_scratch(d.device_proc, [&](const VkMemoryRequirements& req) { | ||
| 376 | return allocate_device_local(d, req); | ||
| 377 | }); | ||
| 378 | ctx.add_resource(1, up_rb); | ||
| 379 | ctx.add_resource(2, rb_rb); | ||
| 380 | VulkanQueue q(ctx, d.queue, d.family); | ||
| 381 | EXPECT(q.ok()); | ||
| 382 | EXPECT(run_d3d220_cases(d, ctx, q, poison_buf, up_buf, up_ptr, rb_buf, rb_ptr, "copy_scratch") == 0); | ||
| 383 | } | ||
| 384 | |||
| 385 | EXPECT(d.validation_errors() == 0); | ||
| 386 | std::printf("vk_bc_zero_init_test: ok\n"); | ||
| 387 | return 0; | ||
| 388 | } | ||
diff --git a/runtime/test/vk_bindless_test.cpp b/runtime/test/vk_bindless_test.cpp index 73ac39013..041f6f648 100644 --- a/runtime/test/vk_bindless_test.cpp +++ b/runtime/test/vk_bindless_test.cpp | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include "vk_shader_fma.h" | 24 | #include "vk_shader_fma.h" |
| 25 | #include "../src/vulkan_bindless.h" | 25 | #include "../src/vulkan_bindless.h" |
| 26 | 26 | ||
| 27 | #include <algorithm> | ||
| 27 | #include <array> | 28 | #include <array> |
| 28 | #include <cmath> | 29 | #include <cmath> |
| 29 | #include <cstdio> | 30 | #include <cstdio> |
| @@ -105,7 +106,7 @@ std::uint32_t probe_depth(std::span<const std::uint32_t> table, const Descriptor | |||
| 105 | 106 | ||
| 106 | int main(int argc, char** argv) { | 107 | int main(int argc, char** argv) { |
| 107 | if (argc < 3) { | 108 | if (argc < 3) { |
| 108 | std::fprintf(stderr, "usage: vk_bindless_test <vs_ids.spv> <ps_tex.spv>\n"); | 109 | std::fprintf(stderr, "usage: vk_bindless_test <vs_ids.spv> <ps_tex.spv | ps_imgatomic.spv>\n"); |
| 109 | return 2; | 110 | return 2; |
| 110 | } | 111 | } |
| 111 | // A bad readback in a single channel must still fail when all three others match. | 112 | // A bad readback in a single channel must still fail when all three others match. |
| @@ -225,6 +226,15 @@ int main(int argc, char** argv) { | |||
| 225 | VkPhysicalDeviceFeatures2 enable{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, &enable12}; | 226 | VkPhysicalDeviceFeatures2 enable{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, &enable12}; |
| 226 | enable.features.shaderInt64 = VK_TRUE; | 227 | enable.features.shaderInt64 = VK_TRUE; |
| 227 | enable.features.shaderSampledImageArrayDynamicIndexing = VK_TRUE; | 228 | enable.features.shaderSampledImageArrayDynamicIndexing = VK_TRUE; |
| 229 | // ps_imgatomic: image atomics in a pixel shader need fragment stores and atomics. | ||
| 230 | const bool atomic_mode = std::strstr(argv[2], "imgatomic") != nullptr; | ||
| 231 | if (atomic_mode) { | ||
| 232 | if (!have.features.fragmentStoresAndAtomics) { | ||
| 233 | std::printf("unsupported: fragmentStoresAndAtomics (image atomics in a pixel shader)\n"); | ||
| 234 | return unsupported; | ||
| 235 | } | ||
| 236 | enable.features.fragmentStoresAndAtomics = VK_TRUE; | ||
| 237 | } | ||
| 228 | 238 | ||
| 229 | std::uint32_t qn = 0; | 239 | std::uint32_t qn = 0; |
| 230 | vkGetPhysicalDeviceQueueFamilyProperties(pd, &qn, nullptr); | 240 | vkGetPhysicalDeviceQueueFamilyProperties(pd, &qn, nullptr); |
| @@ -260,7 +270,7 @@ int main(int argc, char** argv) { | |||
| 260 | LD(vkDeviceWaitIdle); LD(vkDestroyPipeline); LD(vkDestroyPipelineLayout); | 270 | LD(vkDeviceWaitIdle); LD(vkDestroyPipeline); LD(vkDestroyPipelineLayout); |
| 261 | LD(vkDestroyCommandPool); LD(vkDestroyShaderModule); LD(vkDestroyFramebuffer); LD(vkDestroyRenderPass); | 271 | LD(vkDestroyCommandPool); LD(vkDestroyShaderModule); LD(vkDestroyFramebuffer); LD(vkDestroyRenderPass); |
| 262 | LD(vkDestroySampler); LD(vkDestroyImageView); LD(vkDestroyImage); LD(vkDestroyBuffer); | 272 | LD(vkDestroySampler); LD(vkDestroyImageView); LD(vkDestroyImage); LD(vkDestroyBuffer); |
| 263 | LD(vkFreeMemory); LD(vkDestroyDevice); | 273 | LD(vkFreeMemory); LD(vkDestroyDevice); LD(vkCmdClearColorImage); |
| 264 | VkQueue queue = VK_NULL_HANDLE; | 274 | VkQueue queue = VK_NULL_HANDLE; |
| 265 | vkGetDeviceQueue(dev, qi, 0, &queue); | 275 | vkGetDeviceQueue(dev, qi, 0, &queue); |
| 266 | VkPhysicalDeviceMemoryProperties mp; | 276 | VkPhysicalDeviceMemoryProperties mp; |
| @@ -663,6 +673,171 @@ int main(int argc, char** argv) { | |||
| 663 | const std::uint32_t sampler_index = set.add_sampler(nearest); | 673 | const std::uint32_t sampler_index = set.add_sampler(nearest); |
| 664 | EXPECT(decoy_sampler == 1 && sampler_index == 2); | 674 | EXPECT(decoy_sampler == 1 && sampler_index == 2); |
| 665 | 675 | ||
| 676 | if (atomic_mode) { | ||
| 677 | // ps_imgatomic.asm: image_atomic_umax/umin/or on three 8x8 r32ui images and umax on a 4x4x4 one, from | ||
| 678 | // every pixel of the 64x64 draw (64 pixels per 2D texel), each found through its own T# key. Odd | ||
| 679 | // pixels are discarded after their atomics, which still count. | ||
| 680 | constexpr std::uint32_t atomic_va = 1024, AW = 8, A3 = 4; | ||
| 681 | const std::array<DescriptorKey, 4> keys{{{0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8}, | ||
| 682 | {0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8}, | ||
| 683 | {0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8}, | ||
| 684 | {0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8}}}; | ||
| 685 | for (std::uint32_t k = 0; k < 4; ++k) | ||
| 686 | std::memcpy(static_cast<char*>(heap_map) + atomic_va + 32 * k, keys[k].data(), 32); | ||
| 687 | const VkImageUsageFlags atomic_usage = | ||
| 688 | VK_IMAGE_USAGE_STORAGE_BIT | VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT | | ||
| 689 | VK_IMAGE_USAGE_TRANSFER_DST_BIT; | ||
| 690 | VkImage images[4]; | ||
| 691 | VkImageView views[4]; | ||
| 692 | for (int k = 0; k < 3; ++k) CHECK(make_image(VK_FORMAT_R32_UINT, AW, AW, atomic_usage, &images[k], &views[k])); | ||
| 693 | { // the 3D image | ||
| 694 | VkImageCreateInfo ii{VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO}; | ||
| 695 | ii.imageType = VK_IMAGE_TYPE_3D; | ||
| 696 | ii.format = VK_FORMAT_R32_UINT; | ||
| 697 | ii.extent = {A3, A3, A3}; | ||
| 698 | ii.mipLevels = 1; | ||
| 699 | ii.arrayLayers = 1; | ||
| 700 | ii.samples = VK_SAMPLE_COUNT_1_BIT; | ||
| 701 | ii.usage = atomic_usage; | ||
| 702 | CHECK(vkCreateImage(dev, &ii, nullptr, &images[3])); | ||
| 703 | VkMemoryRequirements mr; | ||
| 704 | vkGetImageMemoryRequirements(dev, images[3], &mr); | ||
| 705 | VkMemoryAllocateInfo ai{VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO}; | ||
| 706 | ai.allocationSize = mr.size; | ||
| 707 | ai.memoryTypeIndex = memtype(mr.memoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT); | ||
| 708 | VkDeviceMemory m; | ||
| 709 | CHECK(vkAllocateMemory(dev, &ai, nullptr, &m)); | ||
| 710 | allocations.push_back(m); | ||
| 711 | CHECK(vkBindImageMemory(dev, images[3], m, 0)); | ||
| 712 | VkImageViewCreateInfo vi{VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO}; | ||
| 713 | vi.image = images[3]; | ||
| 714 | vi.viewType = VK_IMAGE_VIEW_TYPE_3D; | ||
| 715 | vi.format = VK_FORMAT_R32_UINT; | ||
| 716 | vi.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}; | ||
| 717 | CHECK(vkCreateImageView(dev, &vi, nullptr, &views[3])); | ||
| 718 | } | ||
| 719 | std::uint32_t indices[4]; | ||
| 720 | for (int k = 0; k < 4; ++k) { | ||
| 721 | StorageViews storage; | ||
| 722 | storage.as_uint = views[k]; | ||
| 723 | storage.r32ui = views[k]; | ||
| 724 | indices[k] = set.add_image(k == 3 ? ImageDimension::dim_3d : ImageDimension::dim_2d, views[k], | ||
| 725 | VK_IMAGE_LAYOUT_GENERAL, storage); | ||
| 726 | EXPECT(indices[k] != 0); | ||
| 727 | EXPECT(set.insert_key(keys[k], indices[k])); | ||
| 728 | } | ||
| 729 | EXPECT(flush()); | ||
| 730 | |||
| 731 | // Clear: umax and or start at 0, umin at all ones; then GENERAL for the shader's atomics. | ||
| 732 | CHECK(vkResetCommandBuffer(cmd, 0)); | ||
| 733 | CHECK(vkBeginCommandBuffer(cmd, &begin)); | ||
| 734 | if (!set.fallbacks_ready()) set.record_fallback_init(cmd); | ||
| 735 | for (int k = 0; k < 4; ++k) { | ||
| 736 | VkImageMemoryBarrier b{VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER}; | ||
| 737 | b.dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; | ||
| 738 | b.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED; | ||
| 739 | b.newLayout = VK_IMAGE_LAYOUT_GENERAL; | ||
| 740 | b.srcQueueFamilyIndex = b.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; | ||
| 741 | b.image = images[k]; | ||
| 742 | b.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}; | ||
| 743 | vkCmdPipelineBarrier(cmd, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, | ||
| 744 | nullptr, 0, nullptr, 1, &b); | ||
| 745 | VkClearColorValue value{}; | ||
| 746 | for (auto& c : value.uint32) c = k == 1 ? 0xFFFFFFFFu : 0u; | ||
| 747 | vkCmdClearColorImage(cmd, images[k], VK_IMAGE_LAYOUT_GENERAL, &value, 1, &b.subresourceRange); | ||
| 748 | b.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; | ||
| 749 | b.dstAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT; | ||
| 750 | b.oldLayout = b.newLayout = VK_IMAGE_LAYOUT_GENERAL; | ||
| 751 | vkCmdPipelineBarrier(cmd, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, 0, 0, | ||
| 752 | nullptr, 0, nullptr, 1, &b); | ||
| 753 | } | ||
| 754 | CHECK(submit()); | ||
| 755 | |||
| 756 | // The draw, then the images and the render target read back. | ||
| 757 | const VkDeviceSize image_bytes = 3 * AW * AW * 4 + A3 * A3 * A3 * 4; | ||
| 758 | VkBuffer atomic_readback; | ||
| 759 | void* atomic_map; | ||
| 760 | CHECK(make_buffer(image_bytes, VK_BUFFER_USAGE_TRANSFER_DST_BIT, &atomic_readback, &atomic_map)); | ||
| 761 | CHECK(vkResetCommandBuffer(cmd, 0)); | ||
| 762 | CHECK(vkBeginCommandBuffer(cmd, &begin)); | ||
| 763 | VkClearValue clear{}; | ||
| 764 | for (float& channel : clear.color.float32) channel = 0.25f; | ||
| 765 | VkRenderPassBeginInfo rbi{VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO}; | ||
| 766 | rbi.renderPass = pass; | ||
| 767 | rbi.framebuffer = framebuffer; | ||
| 768 | rbi.renderArea = scissor; | ||
| 769 | rbi.clearValueCount = 1; | ||
| 770 | rbi.pClearValues = &clear; | ||
| 771 | vkCmdBeginRenderPass(cmd, &rbi, VK_SUBPASS_CONTENTS_INLINE); | ||
| 772 | vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline); | ||
| 773 | const VkDescriptorSet bound = set.set(); | ||
| 774 | vkCmdBindDescriptorSets(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 1, &bound, 0, nullptr); | ||
| 775 | std::uint32_t block[36] = {}; | ||
| 776 | block[2] = atomic_va; | ||
| 777 | block[32] = std::uint32_t(heap_base); | ||
| 778 | block[33] = std::uint32_t(heap_base >> 32); | ||
| 779 | vkCmdPushConstants(cmd, pipeline_layout, VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT, 0, | ||
| 780 | sizeof(block), block); | ||
| 781 | vkCmdDraw(cmd, 3, 1, 0, 0); | ||
| 782 | vkCmdEndRenderPass(cmd); | ||
| 783 | VkMemoryBarrier after{VK_STRUCTURE_TYPE_MEMORY_BARRIER}; | ||
| 784 | after.srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT; | ||
| 785 | after.dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT; | ||
| 786 | vkCmdPipelineBarrier(cmd, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 1, &after, | ||
| 787 | 0, nullptr, 0, nullptr); | ||
| 788 | VkDeviceSize offset = 0; | ||
| 789 | for (int k = 0; k < 4; ++k) { | ||
| 790 | VkBufferImageCopy rc{}; | ||
| 791 | rc.bufferOffset = offset; | ||
| 792 | rc.imageSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1}; | ||
| 793 | rc.imageExtent = k == 3 ? VkExtent3D{A3, A3, A3} : VkExtent3D{AW, AW, 1}; | ||
| 794 | vkCmdCopyImageToBuffer(cmd, images[k], VK_IMAGE_LAYOUT_GENERAL, atomic_readback, 1, &rc); | ||
| 795 | offset += k == 3 ? A3 * A3 * A3 * 4 : AW * AW * 4; | ||
| 796 | } | ||
| 797 | VkBufferImageCopy tc{}; | ||
| 798 | tc.imageSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1}; | ||
| 799 | tc.imageExtent = {W, H, 1}; | ||
| 800 | vkCmdCopyImageToBuffer(cmd, target, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, readback, 1, &tc); | ||
| 801 | CHECK(submit()); | ||
| 802 | |||
| 803 | // The model: every pixel's atomics, discarded or not. | ||
| 804 | std::vector<std::uint32_t> want(3 * AW * AW + A3 * A3 * A3, 0); | ||
| 805 | for (std::uint32_t t = 0; t < AW * AW; ++t) want[AW * AW + t] = 0xFFFFFFFFu; | ||
| 806 | for (std::uint32_t py = 0; py < H; ++py) | ||
| 807 | for (std::uint32_t px = 0; px < W; ++px) { | ||
| 808 | const std::uint32_t id = px + 64 * py, t = (py >> 3) * AW + (px >> 3); | ||
| 809 | want[t] = std::max(want[t], id); | ||
| 810 | want[AW * AW + t] = std::min(want[AW * AW + t], id); | ||
| 811 | want[2 * AW * AW + t] |= 1u << (id & 31); | ||
| 812 | const std::uint32_t v = ((px & 3) * A3 + (py >> 4)) * A3 + (px >> 4); | ||
| 813 | want[3 * AW * AW + v] = std::max(want[3 * AW * AW + v], id); | ||
| 814 | } | ||
| 815 | const auto* got = static_cast<const std::uint32_t*>(atomic_map); | ||
| 816 | const char* names[] = {"2D umax", "2D umin", "2D or", "3D umax"}; | ||
| 817 | unsigned wrong = 0; | ||
| 818 | for (std::size_t i = 0; i < want.size(); ++i) { | ||
| 819 | if (got[i] == want[i]) continue; | ||
| 820 | const int k = i < 3 * AW * AW ? int(i / (AW * AW)) : 3; | ||
| 821 | if (wrong++ < 8) | ||
| 822 | std::printf(" %s texel %zu: got 0x%08x, want 0x%08x\n", names[k], | ||
| 823 | k == 3 ? i - 3 * AW * AW : i % (AW * AW), got[i], want[i]); | ||
| 824 | } | ||
| 825 | const float* rt = static_cast<const float*>(readback_map); | ||
| 826 | unsigned bad_rt = 0; | ||
| 827 | for (std::uint32_t py = 0; py < H; ++py) | ||
| 828 | for (std::uint32_t px = 0; px < W; ++px) | ||
| 829 | bad_rt += rt[(py * W + px) * 4] != ((px & 1) ? 0.25f : 1.0f); | ||
| 830 | std::printf("ps_imgatomic: %u of %zu texels wrong (2D umax/umin/or 8x8 each, 3D umax 4x4x4); " | ||
| 831 | "%u of %u render-target pixels wrong (odd columns discarded)\n", | ||
| 832 | wrong, want.size(), bad_rt, W * H); | ||
| 833 | vkDeviceWaitIdle(dev); | ||
| 834 | if (g_validation_errors) { | ||
| 835 | std::printf("ps_imgatomic: %u validation errors\n", g_validation_errors); | ||
| 836 | return 1; | ||
| 837 | } | ||
| 838 | return wrong || bad_rt ? 1 : 0; | ||
| 839 | } | ||
| 840 | |||
| 666 | // A view that comes and goes before the set is flushed is never written: a texture created and destroyed | 841 | // A view that comes and goes before the set is flushed is never written: a texture created and destroyed |
| 667 | // between two submissions. Its slots are written once, with the fallback; a write of the destroyed view | 842 | // between two submissions. Its slots are written once, with the fallback; a write of the destroyed view |
| 668 | // would be a validation error. | 843 | // would be a validation error. |
| @@ -727,7 +902,7 @@ int main(int argc, char** argv) { | |||
| 727 | // 2. Without its key the T# is a miss: index 0, the fallback image of zeros. | 902 | // 2. Without its key the T# is a miss: index 0, the fallback image of zeros. |
| 728 | const float zeros[4] = {0, 0, 0, 0}; | 903 | const float zeros[4] = {0, 0, 0, 0}; |
| 729 | EXPECT(set.erase_key(tsharp) && !set.erase_key(tsharp)); | 904 | EXPECT(set.erase_key(tsharp) && !set.erase_key(tsharp)); |
| 730 | EXPECT(set.flush_needs_idle()); // erasing may move the keys behind it; nothing is running here | 905 | EXPECT(!set.flush_needs_idle()); // erasing empties its slot only: the three keys ahead stay where they are |
| 731 | EXPECT(flush() && !set.flush_needs_idle()); | 906 | EXPECT(flush() && !set.flush_needs_idle()); |
| 732 | CHECK(draw()); | 907 | CHECK(draw()); |
| 733 | compare("2 miss", zeros); | 908 | compare("2 miss", zeros); |
diff --git a/runtime/test/vk_descriptor_bench.cpp b/runtime/test/vk_descriptor_bench.cpp index 07be76abb..5f5e721c8 100644 --- a/runtime/test/vk_descriptor_bench.cpp +++ b/runtime/test/vk_descriptor_bench.cpp | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | // dispatch against CPU DescriptorTable::lookup() before timing. | 7 | // dispatch against CPU DescriptorTable::lookup() before timing. |
| 8 | // | 8 | // |
| 9 | // Usage: | 9 | // Usage: |
| 10 | // vk_descriptor_bench [--sizes 1000,10000,100000] [--groups 4096] [--iters 64] [--reps 25] [--warmup 5] | 10 | // vk_descriptor_bench [--sizes 1000,10000,100000] [--groups 4096] [--iters 64] [--reps 25] [--warmup 5] [--warmup-ms 300] |
| 11 | // [--memory all|device|host|rebar] [--device N] [--list-devices] [--quick] [--csv] | 11 | // [--memory all|device|host|rebar] [--device N] [--list-devices] [--quick] [--csv] |
| 12 | // [--dump-spv PREFIX] [--self-test] | 12 | // [--dump-spv PREFIX] [--self-test] |
| 13 | // LEONIDA_VK_VALIDATION=1 enables VK_LAYER_KHRONOS_validation; any validation error fails the run. | 13 | // LEONIDA_VK_VALIDATION=1 enables VK_LAYER_KHRONOS_validation; any validation error fails the run. |
| @@ -969,6 +969,7 @@ struct Options { | |||
| 969 | std::uint32_t reps = 25u; | 969 | std::uint32_t reps = 25u; |
| 970 | std::uint32_t warmup = 5u; | 970 | std::uint32_t warmup = 5u; |
| 971 | double max_dispatch_ms = 120.0; | 971 | double max_dispatch_ms = 120.0; |
| 972 | double warmup_ms = 300.0; // keep running the timed dispatch until this much time has passed (0 = off) | ||
| 972 | std::optional<std::uint32_t> device_index; | 973 | std::optional<std::uint32_t> device_index; |
| 973 | MemoryFilter mem_filter = MemoryFilter::All; | 974 | MemoryFilter mem_filter = MemoryFilter::All; |
| 974 | bool list_devices = false; | 975 | bool list_devices = false; |
| @@ -985,6 +986,8 @@ void print_usage() { | |||
| 985 | " --iters N lookups per invocation per dispatch (default: 64)\n" | 986 | " --iters N lookups per invocation per dispatch (default: 64)\n" |
| 986 | " --reps N timed repetitions per scenario (default: 25)\n" | 987 | " --reps N timed repetitions per scenario (default: 25)\n" |
| 987 | " --warmup N warmup dispatches before timing (default: 5)\n" | 988 | " --warmup N warmup dispatches before timing (default: 5)\n" |
| 989 | " --warmup-ms F then keep dispatching until F ms have passed, so the GPU clocks are up before the\n" | ||
| 990 | " first timed run, 0=off (default: 300; --quick turns it off)\n" | ||
| 988 | " --max-dispatch-ms F auto-scale slow dispatches to avoid OS TDR, 0=off (default: 120)\n" | 991 | " --max-dispatch-ms F auto-scale slow dispatches to avoid OS TDR, 0=off (default: 120)\n" |
| 989 | " --memory MODE all|device|host|rebar (default: all)\n" | 992 | " --memory MODE all|device|host|rebar (default: all)\n" |
| 990 | " --device N select physical device index from --list-devices\n" | 993 | " --device N select physical device index from --list-devices\n" |
| @@ -1031,6 +1034,7 @@ bool parse_args(int argc, const char* const* argv, Options& opt, bool& show_help | |||
| 1031 | opt.groups = 16u; | 1034 | opt.groups = 16u; |
| 1032 | opt.iters = 4u; | 1035 | opt.iters = 4u; |
| 1033 | opt.warmup = 1u; | 1036 | opt.warmup = 1u; |
| 1037 | opt.warmup_ms = 0.0; | ||
| 1034 | opt.reps = 3u; | 1038 | opt.reps = 3u; |
| 1035 | } else if (arg == "--groups") { | 1039 | } else if (arg == "--groups") { |
| 1036 | const char* v = nullptr; | 1040 | const char* v = nullptr; |
| @@ -1051,6 +1055,13 @@ bool parse_args(int argc, const char* const* argv, Options& opt, bool& show_help | |||
| 1051 | const double val = std::strtod(v, &end); | 1055 | const double val = std::strtod(v, &end); |
| 1052 | if (*v == '\0' || *end != '\0' || !std::isfinite(val) || val < 0.0) return false; | 1056 | if (*v == '\0' || *end != '\0' || !std::isfinite(val) || val < 0.0) return false; |
| 1053 | opt.max_dispatch_ms = val; | 1057 | opt.max_dispatch_ms = val; |
| 1058 | } else if (arg == "--warmup-ms") { | ||
| 1059 | const char* v = nullptr; | ||
| 1060 | if (!need_val(v)) return false; | ||
| 1061 | char* end = nullptr; | ||
| 1062 | const double val = std::strtod(v, &end); | ||
| 1063 | if (*v == '\0' || *end != '\0' || !std::isfinite(val) || val < 0.0) return false; | ||
| 1064 | opt.warmup_ms = val; | ||
| 1054 | } else if (arg == "--device") { | 1065 | } else if (arg == "--device") { |
| 1055 | const char* v = nullptr; | 1066 | const char* v = nullptr; |
| 1056 | std::uint32_t idx = 0u; | 1067 | std::uint32_t idx = 0u; |
| @@ -1164,6 +1175,19 @@ int run_self_test() { | |||
| 1164 | return 1; | 1175 | return 1; |
| 1165 | } | 1176 | } |
| 1166 | 1177 | ||
| 1178 | { | ||
| 1179 | const char* const ok_args[] = {"vk_descriptor_bench", "--warmup-ms", "0"}; | ||
| 1180 | const char* const bad_args[] = {"vk_descriptor_bench", "--warmup-ms", "-1"}; | ||
| 1181 | const char* const quick_args[] = {"vk_descriptor_bench", "--quick"}; | ||
| 1182 | Options o_ok, o_bad, o_quick, o_default; | ||
| 1183 | bool h = false; | ||
| 1184 | if (o_default.warmup_ms != 300.0 || !parse_args(3, ok_args, o_ok, h) || o_ok.warmup_ms != 0.0 || | ||
| 1185 | parse_args(3, bad_args, o_bad, h) || !parse_args(2, quick_args, o_quick, h) || o_quick.warmup_ms != 0.0) { | ||
| 1186 | std::fprintf(stderr, "self-test: --warmup-ms parsing or its default is wrong\n"); | ||
| 1187 | return 1; | ||
| 1188 | } | ||
| 1189 | } | ||
| 1190 | |||
| 1167 | const struct { | 1191 | const struct { |
| 1168 | const char* name; | 1192 | const char* name; |
| 1169 | ShaderKind kind; | 1193 | ShaderKind kind; |
| @@ -2134,6 +2158,22 @@ int main(int argc, char** argv) { | |||
| 2134 | } | 2158 | } |
| 2135 | } | 2159 | } |
| 2136 | 2160 | ||
| 2161 | // A handful of dispatches is not enough to bring the clocks up on every GPU: with --warmup 5 an idle | ||
| 2162 | // RX 7600 measured the first placement ~1.8x slower than with --warmup 200, and the RTX 4050 ~1.3x | ||
| 2163 | // (TEST-277). Keep running the command that is about to be timed for --warmup-ms. | ||
| 2164 | if (opt.warmup_ms > 0.0) { | ||
| 2165 | const auto w0 = std::chrono::steady_clock::now(); | ||
| 2166 | for (;;) { | ||
| 2167 | if (!submit_and_wait(bench_cmd)) { | ||
| 2168 | cleanup_all(keys_buf, map_buf); | ||
| 2169 | return 1; | ||
| 2170 | } | ||
| 2171 | const double spent = | ||
| 2172 | std::chrono::duration<double, std::milli>(std::chrono::steady_clock::now() - w0).count(); | ||
| 2173 | if (spent >= opt.warmup_ms) break; | ||
| 2174 | } | ||
| 2175 | } | ||
| 2176 | |||
| 2137 | std::vector<double> samples_ms; | 2177 | std::vector<double> samples_ms; |
| 2138 | samples_ms.reserve(eff_reps); | 2178 | samples_ms.reserve(eff_reps); |
| 2139 | for (std::uint32_t r = 0; r < eff_reps; ++r) { | 2179 | for (std::uint32_t r = 0; r < eff_reps; ++r) { |
diff --git a/runtime/test/vk_harness.cpp b/runtime/test/vk_harness.cpp index f7f86fa51..360a20fa7 100644 --- a/runtime/test/vk_harness.cpp +++ b/runtime/test/vk_harness.cpp | |||
| @@ -240,6 +240,17 @@ int main(int argc, char** argv) { | |||
| 240 | return 2; | 240 | return 2; |
| 241 | } | 241 | } |
| 242 | } | 242 | } |
| 243 | // Translated shaders declare a 144-byte push-constant block (user SGPRs, heap base, code base; see VKH_SGPRS / | ||
| 244 | // VKH_HEAP); --mesh-compute modules and their vertex shaders add the output address (152 bytes). A device with | ||
| 245 | // fewer bytes (128, the Vulkan minimum, as on some Intel Arc drivers and AMD's Windows driver for RDNA2 iGPUs) | ||
| 246 | // cannot take that range: declaring it anyway is invalid, and there a shader reading past the limit crashed or | ||
| 247 | // hung the device. 77, as vk_texture_test and vk_bindless_test: a device limit, not a wrong result (D3D-14). | ||
| 248 | const uint32_t pc_bytes = mesh_compute ? 152u : 144u; | ||
| 249 | if (props.limits.maxPushConstantsSize < pc_bytes) { | ||
| 250 | std::fprintf(stderr, "unsupported: need %u push constant bytes, device has %u\n", pc_bytes, | ||
| 251 | props.limits.maxPushConstantsSize); | ||
| 252 | return 77; | ||
| 253 | } | ||
| 243 | // VKH_MESH=1: the first shader is a mesh shader (VK_EXT_mesh_shader), drawn with vkCmdDrawMeshTasksEXT(1,1,1). | 254 | // VKH_MESH=1: the first shader is a mesh shader (VK_EXT_mesh_shader), drawn with vkCmdDrawMeshTasksEXT(1,1,1). |
| 244 | const bool mesh = !mesh_compute && (group_readback || std::getenv("VKH_MESH") != nullptr); | 255 | const bool mesh = !mesh_compute && (group_readback || std::getenv("VKH_MESH") != nullptr); |
| 245 | VkPhysicalDeviceMeshShaderFeaturesEXT meshf{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT}; | 256 | VkPhysicalDeviceMeshShaderFeaturesEXT meshf{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT}; |
| @@ -454,12 +465,11 @@ int main(int argc, char** argv) { | |||
| 454 | VkPipelineColorBlendAttachmentState cba{}; cba.colorWriteMask = 0xF; | 465 | VkPipelineColorBlendAttachmentState cba{}; cba.colorWriteMask = 0xF; |
| 455 | VkPipelineColorBlendStateCreateInfo cb{VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO}; | 466 | VkPipelineColorBlendStateCreateInfo cb{VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO}; |
| 456 | cb.attachmentCount = 1; cb.pAttachments = &cba; | 467 | cb.attachmentCount = 1; cb.pAttachments = &cba; |
| 457 | // Translated shaders declare a 144-byte push-constant block (user SGPRs, heap base, code base; see VKH_SGPRS / | 468 | // The push-constant block (pc_bytes, checked against the device limit above). |
| 458 | // VKH_HEAP); --mesh-compute modules and their vertex shaders add the output address (152 bytes). | ||
| 459 | const VkShaderStageFlags pcs = (mesh ? VK_SHADER_STAGE_MESH_BIT_EXT : VK_SHADER_STAGE_VERTEX_BIT) | | 469 | const VkShaderStageFlags pcs = (mesh ? VK_SHADER_STAGE_MESH_BIT_EXT : VK_SHADER_STAGE_VERTEX_BIT) | |
| 460 | VK_SHADER_STAGE_FRAGMENT_BIT | (gs_path ? VK_SHADER_STAGE_GEOMETRY_BIT : 0) | | 470 | VK_SHADER_STAGE_FRAGMENT_BIT | (gs_path ? VK_SHADER_STAGE_GEOMETRY_BIT : 0) | |
| 461 | (mesh_compute ? VK_SHADER_STAGE_COMPUTE_BIT : 0); | 471 | (mesh_compute ? VK_SHADER_STAGE_COMPUTE_BIT : 0); |
| 462 | VkPushConstantRange pcr{pcs, 0, mesh_compute ? 152u : 144u}; | 472 | VkPushConstantRange pcr{pcs, 0, pc_bytes}; |
| 463 | VkPipelineLayoutCreateInfo pli{VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO}; | 473 | VkPipelineLayoutCreateInfo pli{VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO}; |
| 464 | pli.pushConstantRangeCount = 1; pli.pPushConstantRanges = &pcr; | 474 | pli.pushConstantRangeCount = 1; pli.pPushConstantRanges = &pcr; |
| 465 | VkPipelineLayout pl; CHECK(vkCreatePipelineLayout(dev, &pli, nullptr, &pl)); | 475 | VkPipelineLayout pl; CHECK(vkCreatePipelineLayout(dev, &pli, nullptr, &pl)); |
| @@ -564,7 +574,6 @@ int main(int argc, char** argv) { | |||
| 564 | std::memcpy(pc, shifts, sizeof(shifts)); | 574 | std::memcpy(pc, shifts, sizeof(shifts)); |
| 565 | } | 575 | } |
| 566 | auto push = reinterpret_cast<PFN_vkCmdPushConstants>(vkGetDeviceProcAddr(dev, "vkCmdPushConstants")); | 576 | auto push = reinterpret_cast<PFN_vkCmdPushConstants>(vkGetDeviceProcAddr(dev, "vkCmdPushConstants")); |
| 567 | const uint32_t pc_bytes = mesh_compute ? 152u : 144u; | ||
| 568 | if (mesh_compute) { | 577 | if (mesh_compute) { |
| 569 | // The mesh shader as compute, then make its stores visible to the vertex shader's reads. | 578 | // The mesh shader as compute, then make its stores visible to the vertex shader's reads. |
| 570 | LOADD(vkCmdDispatch); LOADD(vkCmdPipelineBarrier); | 579 | LOADD(vkCmdDispatch); LOADD(vkCmdPipelineBarrier); |
| @@ -591,7 +600,11 @@ int main(int argc, char** argv) { | |||
| 591 | } | 600 | } |
| 592 | vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, pipe); | 601 | vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, pipe); |
| 593 | push(cmd, pl, pcs, 0, pc_bytes, pc); | 602 | push(cmd, pl, pcs, 0, pc_bytes, pc); |
| 594 | if (mesh_compute) | 603 | // VKH_VERTICES=<n>: draw n vertices instead of one triangle, so a vertex shader fills whole waves (TEST-251). |
| 604 | const char* vertices_env = std::getenv("VKH_VERTICES"); | ||
| 605 | if (const unsigned vertices = vertices_env ? unsigned(std::strtoul(vertices_env, nullptr, 10)) : 0; vertices && !mesh) | ||
| 606 | vkCmdDraw(cmd, vertices, 1, 0, 0); | ||
| 607 | else if (mesh_compute) | ||
| 595 | vkCmdDraw(cmd, uint32_t(mesh_groups * mesh_prims * 3), 1, 0, 0); | 608 | vkCmdDraw(cmd, uint32_t(mesh_groups * mesh_prims * 3), 1, 0, 0); |
| 596 | else if (mesh) | 609 | else if (mesh) |
| 597 | reinterpret_cast<PFN_vkCmdDrawMeshTasksEXT>(vkGetDeviceProcAddr(dev, "vkCmdDrawMeshTasksEXT"))(cmd, groups[0], groups[1], groups[2]); | 610 | reinterpret_cast<PFN_vkCmdDrawMeshTasksEXT>(vkGetDeviceProcAddr(dev, "vkCmdDrawMeshTasksEXT"))(cmd, groups[0], groups[1], groups[2]); |
diff --git a/runtime/test/vk_overlapping_occlusion_test.cpp b/runtime/test/vk_overlapping_occlusion_test.cpp index cc9372feb..2a510d33a 100644 --- a/runtime/test/vk_overlapping_occlusion_test.cpp +++ b/runtime/test/vk_overlapping_occlusion_test.cpp | |||
| @@ -135,13 +135,14 @@ struct Draws { | |||
| 135 | std::vector<std::uint32_t> extents; | 135 | std::vector<std::uint32_t> extents; |
| 136 | std::size_t next = 0; | 136 | std::size_t next = 0; |
| 137 | bool overflow = false; | 137 | bool overflow = false; |
| 138 | bool every = false; // --bisect: one 1x1 draw before every end, no schedule | 138 | bool every = false; // --bisect: one 1x1 draw before every end, no schedule |
| 139 | bool no_draw = false; // --bisect --no-draw: no draws at all, every query stays empty | ||
| 139 | }; | 140 | }; |
| 140 | Draws* draws = nullptr; | 141 | Draws* draws = nullptr; |
| 141 | 142 | ||
| 142 | VKAPI_ATTR void VKAPI_CALL end_query_with_draw(VkCommandBuffer cb, VkQueryPool pool, std::uint32_t index) { | 143 | VKAPI_ATTR void VKAPI_CALL end_query_with_draw(VkCommandBuffer cb, VkQueryPool pool, std::uint32_t index) { |
| 143 | if (draws->every) { | 144 | if (draws->every) { |
| 144 | draws->fixture.draw(cb, 1); | 145 | if (!draws->no_draw) draws->fixture.draw(cb, 1); |
| 145 | } else if (draws->next == draws->extents.size()) { | 146 | } else if (draws->next == draws->extents.size()) { |
| 146 | draws->overflow = true; | 147 | draws->overflow = true; |
| 147 | } else if (const auto extent = draws->extents[draws->next++]) { | 148 | } else if (const auto extent = draws->extents[draws->next++]) { |
| @@ -159,9 +160,13 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL get_device_proc(VkDevice device, const | |||
| 159 | // submission is waited for before the next, so the last "running" line before a hang or a lost device names the | 160 | // submission is waited for before the next, so the last "running" line before a hang or a lost device names the |
| 160 | // pattern. --gated queues them all behind one semaphore the CPU signals afterwards, as the full test does. Named | 161 | // pattern. --gated queues them all behind one semaphore the CPU signals afterwards, as the full test does. Named |
| 161 | // phases run only those, in the order below. Only completion is checked, not values. | 162 | // phases run only those, in the order below. Only completion is checked, not values. |
| 163 | // Two switches separate the draw from the resolve: --no-draw leaves every query empty (no rendering scope inside | ||
| 164 | // it), --no-resolve records the queries but never copies or sums their results. | ||
| 162 | struct Bisect { | 165 | struct Bisect { |
| 163 | bool enabled = false; | 166 | bool enabled = false; |
| 164 | bool gated = false; | 167 | bool gated = false; |
| 168 | bool no_draw = false; | ||
| 169 | bool no_resolve = false; | ||
| 165 | std::vector<std::string> phases; | 170 | std::vector<std::string> phases; |
| 166 | bool wants(const char* name) const { | 171 | bool wants(const char* name) const { |
| 167 | return phases.empty() || std::find(phases.begin(), phases.end(), name) != phases.end(); | 172 | return phases.empty() || std::find(phases.begin(), phases.end(), name) != phases.end(); |
| @@ -184,8 +189,9 @@ int run(vktest::Device& d, const char* vertex, const char* fragment, const Bisec | |||
| 184 | schedule.extents.insert(schedule.extents.end(), 2 * bursts + 1, 1); | 189 | schedule.extents.insert(schedule.extents.end(), 2 * bursts + 1, 1); |
| 185 | // The statistics lists below: a split query (two segments), two unsplit references and a second split query. | 190 | // The statistics lists below: a split query (two segments), two unsplit references and a second split query. |
| 186 | if (d.pipeline_statistics_query) schedule.extents.insert(schedule.extents.end(), {3, 5, 3, 5, 3, 5}); | 191 | if (d.pipeline_statistics_query) schedule.extents.insert(schedule.extents.end(), {3, 5, 3, 5, 3, 5}); |
| 187 | schedule.extents.insert(schedule.extents.end(), {2, 0, 0, 0}); | 192 | schedule.extents.insert(schedule.extents.end(), {2, 0, 0, 0, 1}); |
| 188 | schedule.every = bisect.enabled; | 193 | schedule.every = bisect.enabled; |
| 194 | schedule.no_draw = bisect.no_draw; | ||
| 189 | draws = &schedule; | 195 | draws = &schedule; |
| 190 | VulkanContext context(get_device_proc, d.device, true, d.conditional_rendering); | 196 | VulkanContext context(get_device_proc, d.device, true, d.conditional_rendering); |
| 191 | EXPECT(context.loaded()); | 197 | EXPECT(context.loaded()); |
| @@ -236,30 +242,37 @@ int run(vktest::Device& d, const char* vertex, const char* fragment, const Bisec | |||
| 236 | if (!bisect.wants(name)) return nullptr; | 242 | if (!bisect.wants(name)) return nullptr; |
| 237 | return &lists.emplace_back(name, CommandList{}).second; | 243 | return &lists.emplace_back(name, CommandList{}).second; |
| 238 | }; | 244 | }; |
| 245 | const auto resolve = [&](CommandList* l, const ResolveQueries& r) { | ||
| 246 | return bisect.no_resolve || l->resolve_queries(r); | ||
| 247 | }; | ||
| 239 | if (auto* l = add("crossing")) { // two queries of one heap overlap; resolve while one is active | 248 | if (auto* l = add("crossing")) { // two queries of one heap overlap; resolve while one is active |
| 240 | EXPECT(l->begin_query({a, occ, 0}) && l->begin_query({a, occ, 1}) && l->end_query({a, occ, 0})); | 249 | EXPECT(l->begin_query({a, occ, 0}) && l->begin_query({a, occ, 1}) && l->end_query({a, occ, 0})); |
| 241 | EXPECT(l->resolve_queries({a, occ, 0, 1, dst_id, 8}) && l->end_query({a, occ, 1})); | 250 | EXPECT(resolve(l, {a, occ, 0, 1, dst_id, 8}) && l->end_query({a, occ, 1})); |
| 242 | EXPECT(l->resolve_queries({a, occ, 0, 2, dst_id, 24})); | 251 | EXPECT(resolve(l, {a, occ, 0, 2, dst_id, 24})); |
| 252 | } | ||
| 253 | if (auto* l = add("active")) { // a resolve inside one active query, without an overlap | ||
| 254 | EXPECT(l->begin_query({a, occ, 0}) && l->end_query({a, occ, 0}) && l->begin_query({a, occ, 3})); | ||
| 255 | EXPECT(resolve(l, {a, occ, 0, 1, dst_id, 128}) && l->end_query({a, occ, 3})); | ||
| 243 | } | 256 | } |
| 244 | if (auto* l = add("nested")) { // the same index in two heaps, one inside the other | 257 | if (auto* l = add("nested")) { // the same index in two heaps, one inside the other |
| 245 | EXPECT(l->begin_query({a, occ, 2}) && l->begin_query({b, occ, 2})); | 258 | EXPECT(l->begin_query({a, occ, 2}) && l->begin_query({b, occ, 2})); |
| 246 | EXPECT(l->end_query({b, occ, 2}) && l->end_query({a, occ, 2})); | 259 | EXPECT(l->end_query({b, occ, 2}) && l->end_query({a, occ, 2})); |
| 247 | EXPECT(l->resolve_queries({a, occ, 2, 1, dst_id, 40}) && l->resolve_queries({b, occ, 2, 1, dst_id, 48})); | 260 | EXPECT(resolve(l, {a, occ, 2, 1, dst_id, 40}) && resolve(l, {b, occ, 2, 1, dst_id, 48})); |
| 248 | } | 261 | } |
| 249 | if (auto* l = add("unwritten")) { // a query never begun: zero fill | 262 | if (auto* l = add("unwritten")) { // a query never begun: zero fill |
| 250 | EXPECT(l->resolve_queries({b, occ, 0, 1, dst_id, 56})); | 263 | EXPECT(resolve(l, {b, occ, 0, 1, dst_id, 56})); |
| 251 | } | 264 | } |
| 252 | if (auto* l = add("binary")) { // the binary-occlusion compute resolve | 265 | if (auto* l = add("binary")) { // the binary-occlusion compute resolve |
| 253 | EXPECT(l->begin_query({a, binary, 3}) && l->end_query({a, binary, 3})); | 266 | EXPECT(l->begin_query({a, binary, 3}) && l->end_query({a, binary, 3})); |
| 254 | EXPECT(l->resolve_queries({a, binary, 3, 1, dst_id, 64})); | 267 | EXPECT(resolve(l, {a, binary, 3, 1, dst_id, 64})); |
| 255 | } | 268 | } |
| 256 | if (d.conditional_rendering) { | 269 | if (d.conditional_rendering) { |
| 257 | if (auto* l = add("predicated")) { // both compute resolves under a false predicate | 270 | if (auto* l = add("predicated")) { // both compute resolves under a false predicate |
| 258 | EXPECT(l->begin_query({a, binary, 3}) && l->end_query({a, binary, 3})); | 271 | EXPECT(l->begin_query({a, binary, 3}) && l->end_query({a, binary, 3})); |
| 259 | EXPECT(l->set_predication({predicate_id, 0, d3d12_predication::equal_zero})); | 272 | EXPECT(l->set_predication({predicate_id, 0, d3d12_predication::equal_zero})); |
| 260 | EXPECT(l->resolve_queries({a, binary, 3, 1, dst_id, 64})); | 273 | EXPECT(resolve(l, {a, binary, 3, 1, dst_id, 64})); |
| 261 | EXPECT(l->resolve_queries({a, occ, 0, 1, dst_id, 72})); | 274 | EXPECT(resolve(l, {a, occ, 0, 1, dst_id, 72})); |
| 262 | EXPECT(l->resolve_queries({a, binary, 3, 1, dst_id, 80})); | 275 | EXPECT(resolve(l, {a, binary, 3, 1, dst_id, 80})); |
| 263 | EXPECT(copy_control.record(*l)); | 276 | EXPECT(copy_control.record(*l)); |
| 264 | } | 277 | } |
| 265 | } | 278 | } |
| @@ -267,14 +280,24 @@ int run(vktest::Device& d, const char* vertex, const char* fragment, const Bisec | |||
| 267 | EXPECT(l->begin_query({a, occ, 3})); | 280 | EXPECT(l->begin_query({a, occ, 3})); |
| 268 | for (std::uint32_t i = 0; i < bursts; ++i) EXPECT(l->begin_query({b, occ, 0}) && l->end_query({b, occ, 0})); | 281 | for (std::uint32_t i = 0; i < bursts; ++i) EXPECT(l->begin_query({b, occ, 0}) && l->end_query({b, occ, 0})); |
| 269 | EXPECT(l->end_query({a, occ, 3})); | 282 | EXPECT(l->end_query({a, occ, 3})); |
| 270 | EXPECT(l->resolve_queries({a, occ, 3, 1, dst_id, 88}) && l->resolve_queries({b, occ, 0, 1, dst_id, 96})); | 283 | EXPECT(resolve(l, {a, occ, 3, 1, dst_id, 88}) && resolve(l, {b, occ, 0, 1, dst_id, 96})); |
| 271 | } | 284 | } |
| 272 | if (auto* l = add("replace")) { // every heap query begun and ended again, then resolved | 285 | if (auto* l = add("replace")) { // every heap query begun and ended again, then resolved |
| 273 | for (const auto& [heap, index] : {std::pair{a, 0u}, std::pair{a, 1u}, std::pair{a, 2u}, std::pair{b, 2u}}) | 286 | for (const auto& [heap, index] : {std::pair{a, 0u}, std::pair{a, 1u}, std::pair{a, 2u}, std::pair{b, 2u}}) |
| 274 | EXPECT(l->begin_query({heap, occ, index}) && l->end_query({heap, occ, index})); | 287 | EXPECT(l->begin_query({heap, occ, index}) && l->end_query({heap, occ, index})); |
| 275 | EXPECT(l->resolve_queries({a, occ, 0, 2, dst_id, 112})); | 288 | EXPECT(resolve(l, {a, occ, 0, 2, dst_id, 112})); |
| 276 | } | 289 | } |
| 277 | EXPECT(!lists.empty()); | 290 | EXPECT(!lists.empty()); |
| 291 | std::printf("bisect:%s%s%s\n", bisect.gated ? " gated" : " ungated", bisect.no_draw ? " no-draw" : " draws", | ||
| 292 | bisect.no_resolve ? " no-resolve" : " resolves"); | ||
| 293 | // After a TDR, AMD's Windows driver lets vkQueueWaitIdle succeed (#1540); every timeline semaphore then reads | ||
| 294 | // UINT64_MAX, so the gate's value is checked as well as what the context has seen. | ||
| 295 | const auto get_value = d.fn<PFN_vkGetSemaphoreCounterValue>("vkGetSemaphoreCounterValue"); | ||
| 296 | const auto lost = [&] { | ||
| 297 | std::uint64_t value = 0; | ||
| 298 | return context.is_device_lost() || get_value(d.device, gate.semaphore(), &value) != VK_SUCCESS || | ||
| 299 | value == UINT64_MAX; | ||
| 300 | }; | ||
| 278 | if (bisect.gated) queue.wait(gate.semaphore(), 1); | 301 | if (bisect.gated) queue.wait(gate.semaphore(), 1); |
| 279 | for (auto& [name, list] : lists) { | 302 | for (auto& [name, list] : lists) { |
| 280 | EXPECT(list.close()); | 303 | EXPECT(list.close()); |
| @@ -286,15 +309,15 @@ int run(vktest::Device& d, const char* vertex, const char* fragment, const Bisec | |||
| 286 | std::printf("%s: execute returned %d\n", name, int(result)); | 309 | std::printf("%s: execute returned %d\n", name, int(result)); |
| 287 | return 1; | 310 | return 1; |
| 288 | } | 311 | } |
| 289 | if (!bisect.gated && !queue.idle()) { | 312 | if (!bisect.gated && (!queue.idle() || lost())) { |
| 290 | std::printf("%s: vkQueueWaitIdle failed (device lost?)\n", name); | 313 | std::printf("%s: device lost\n", name); |
| 291 | return 1; | 314 | return 1; |
| 292 | } | 315 | } |
| 293 | } | 316 | } |
| 294 | if (bisect.gated) { | 317 | if (bisect.gated) { |
| 295 | EXPECT(gate.signal(1)); | 318 | EXPECT(gate.signal(1)); |
| 296 | if (!queue.idle()) { | 319 | if (!queue.idle() || lost()) { |
| 297 | std::printf("gated: vkQueueWaitIdle failed (device lost?)\n"); | 320 | std::printf("gated: device lost\n"); |
| 298 | return 1; | 321 | return 1; |
| 299 | } | 322 | } |
| 300 | } | 323 | } |
| @@ -414,13 +437,22 @@ int run(vktest::Device& d, const char* vertex, const char* fragment, const Bisec | |||
| 414 | EXPECT(replace.close()); | 437 | EXPECT(replace.close()); |
| 415 | const CommandList* fourth[] = {&replace}; | 438 | const CommandList* fourth[] = {&replace}; |
| 416 | EXPECT(queue.execute(fourth) == ReplayResult::success); | 439 | EXPECT(queue.execute(fourth) == ReplayResult::success); |
| 440 | |||
| 441 | // A resolve inside one active query, with no overlap. | ||
| 442 | CommandList single; | ||
| 443 | EXPECT(single.begin_query({a, occ, 3})); | ||
| 444 | EXPECT(single.resolve_queries({a, occ, 0, 1, dst_id, 128})); | ||
| 445 | EXPECT(single.end_query({a, occ, 3})); | ||
| 446 | EXPECT(single.close()); | ||
| 447 | const CommandList* fifth[] = {&single}; | ||
| 448 | EXPECT(queue.execute(fifth) == ReplayResult::success); | ||
| 417 | EXPECT(!schedule.overflow && schedule.next == schedule.extents.size()); | 449 | EXPECT(!schedule.overflow && schedule.next == schedule.extents.size()); |
| 418 | EXPECT(gate.signal(1)); | 450 | EXPECT(gate.signal(1)); |
| 419 | EXPECT(queue.idle()); | 451 | EXPECT(queue.idle()); |
| 420 | 452 | ||
| 421 | std::map<VkDeviceSize, std::uint64_t> expected = { | 453 | std::map<VkDeviceSize, std::uint64_t> expected = { |
| 422 | {8, 80}, {24, 80}, {32, 20}, {40, 84}, {48, 16}, {56, 0}, {64, 1}, {72, 80}, {80, 1}, | 454 | {8, 80}, {24, 80}, {32, 20}, {40, 84}, {48, 16}, {56, 0}, {64, 1}, {72, 80}, {80, 1}, |
| 423 | {88, 2 * bursts + 1}, {96, 1}, {112, 4}, {120, 0}, | 455 | {88, 2 * bursts + 1}, {96, 1}, {112, 4}, {120, 0}, {128, 4}, |
| 424 | }; | 456 | }; |
| 425 | if (fixture.statistics) expected[0] = 2 * bursts + 1; // the sum resolved inside the statistics query | 457 | if (fixture.statistics) expected[0] = 2 * bursts + 1; // the sum resolved inside the statistics query |
| 426 | for (VkDeviceSize offset = 0; offset < size; offset += 8) { | 458 | for (VkDeviceSize offset = 0; offset < size; offset += 8) { |
| @@ -460,7 +492,7 @@ int run(vktest::Device& d, const char* vertex, const char* fragment, const Bisec | |||
| 460 | static_cast<unsigned long long>(word(0, 0)), static_cast<unsigned long long>(word(0, 7))); | 492 | static_cast<unsigned long long>(word(0, 0)), static_cast<unsigned long long>(word(0, 7))); |
| 461 | } | 493 | } |
| 462 | std::printf("crossing 80/20; nested 84/16; %u segments summed; alternating binary results 1/1; " | 494 | std::printf("crossing 80/20; nested 84/16; %u segments summed; alternating binary results 1/1; " |
| 463 | "offsets and gated overwrites exact\n", | 495 | "resolve inside an active query 4; offsets and gated overwrites exact\n", |
| 464 | 2 * bursts + 1); | 496 | 2 * bursts + 1); |
| 465 | EXPECT(copy_control.check()); | 497 | EXPECT(copy_control.check()); |
| 466 | return 0; | 498 | return 0; |
| @@ -468,13 +500,15 @@ int run(vktest::Device& d, const char* vertex, const char* fragment, const Bisec | |||
| 468 | 500 | ||
| 469 | } // namespace | 501 | } // namespace |
| 470 | 502 | ||
| 471 | // vk_overlapping_occlusion_test <vert.spv> <frag.spv> [--bisect [--gated] [phase...]] | 503 | // vk_overlapping_occlusion_test <vert.spv> <frag.spv> [--bisect [--gated] [--no-draw] [--no-resolve] [phase...]] |
| 472 | int main(int argc, char** argv) { | 504 | int main(int argc, char** argv) { |
| 473 | EXPECT(argc >= 3); | 505 | EXPECT(argc >= 3); |
| 474 | Bisect bisect; | 506 | Bisect bisect; |
| 475 | for (int i = 3; i < argc; ++i) { | 507 | for (int i = 3; i < argc; ++i) { |
| 476 | if (std::strcmp(argv[i], "--bisect") == 0) bisect.enabled = true; | 508 | if (std::strcmp(argv[i], "--bisect") == 0) bisect.enabled = true; |
| 477 | else if (std::strcmp(argv[i], "--gated") == 0) bisect.gated = true; | 509 | else if (std::strcmp(argv[i], "--gated") == 0) bisect.gated = true; |
| 510 | else if (std::strcmp(argv[i], "--no-draw") == 0) bisect.no_draw = true; | ||
| 511 | else if (std::strcmp(argv[i], "--no-resolve") == 0) bisect.no_resolve = true; | ||
| 478 | else bisect.phases.emplace_back(argv[i]); | 512 | else bisect.phases.emplace_back(argv[i]); |
| 479 | } | 513 | } |
| 480 | EXPECT(argc == 3 || bisect.enabled); | 514 | EXPECT(argc == 3 || bisect.enabled); |
diff --git a/runtime/test/vk_pipeline_check.cpp b/runtime/test/vk_pipeline_check.cpp index bdefac894..f11cc37ff 100644 --- a/runtime/test/vk_pipeline_check.cpp +++ b/runtime/test/vk_pipeline_check.cpp | |||
| @@ -22,6 +22,12 @@ | |||
| 22 | // --cache-feedback count each stage's successful pipelines by VkPipelineCreationFeedback: hits (VALID and | 22 | // --cache-feedback count each stage's successful pipelines by VkPipelineCreationFeedback: hits (VALID and |
| 23 | // APPLICATION_PIPELINE_CACHE_HIT), no hit reported (VALID only) and unavailable (no VALID bit, or a | 23 | // APPLICATION_PIPELINE_CACHE_HIT), no hit reported (VALID only) and unavailable (no VALID bit, or a |
| 24 | // pre-1.3 device without VK_EXT_pipeline_creation_feedback). The three add up to the ok count. | 24 | // pre-1.3 device without VK_EXT_pipeline_creation_feedback). The three add up to the ok count. |
| 25 | // --isolate (POSIX only) check in child processes, --isolate-batch modules at a time (default 256), so a module | ||
| 26 | // that kills the driver (SIGFPE, SIGSEGV, ...) is recorded as failed ("MODULE CRASH") and the pass | ||
| 27 | // goes on. A crashed batch is bisected to the module. Children run one after the other and share | ||
| 28 | // cache.bin. Not compatible with --stats. | ||
| 29 | // test hook VK_PIPELINE_CHECK_SIMULATE_CRASH=<module name substring>[:SIGNAL] raises SIGNAL (default SIGFPE) | ||
| 30 | // just before the pipeline of a matching module is created. Only for testing --isolate. | ||
| 25 | #include "vulkan_loader.h" | 31 | #include "vulkan_loader.h" |
| 26 | #include "vk_device_pick.h" | 32 | #include "vk_device_pick.h" |
| 27 | #include "pipeline_cache_file.h" | 33 | #include "pipeline_cache_file.h" |
| @@ -32,7 +38,10 @@ | |||
| 32 | #include <cctype> | 38 | #include <cctype> |
| 33 | #include <charconv> | 39 | #include <charconv> |
| 34 | #include <chrono> | 40 | #include <chrono> |
| 41 | #include <cmath> | ||
| 35 | #include <condition_variable> | 42 | #include <condition_variable> |
| 43 | #include <csignal> | ||
| 44 | #include <cstdlib> | ||
| 36 | #include <cstdio> | 45 | #include <cstdio> |
| 37 | #include <cstring> | 46 | #include <cstring> |
| 38 | #include <fstream> | 47 | #include <fstream> |
| @@ -48,6 +57,13 @@ | |||
| 48 | #include <utility> | 57 | #include <utility> |
| 49 | #include <vector> | 58 | #include <vector> |
| 50 | 59 | ||
| 60 | #ifndef _WIN32 | ||
| 61 | #include <sys/wait.h> | ||
| 62 | #include <unistd.h> | ||
| 63 | #include <cerrno> | ||
| 64 | #include <filesystem> | ||
| 65 | #endif | ||
| 66 | |||
| 51 | static PFN_vkGetInstanceProcAddr gipa; | 67 | static PFN_vkGetInstanceProcAddr gipa; |
| 52 | 68 | ||
| 53 | struct VertexInputMeta { | 69 | struct VertexInputMeta { |
| @@ -275,11 +291,13 @@ struct JsonParser { | |||
| 275 | 291 | ||
| 276 | std::map<std::string, ShaderMeta> read_index(const std::string& path, std::string& err) { | 292 | std::map<std::string, ShaderMeta> read_index(const std::string& path, std::string& err) { |
| 277 | std::ifstream f(path, std::ios::binary); | 293 | std::ifstream f(path, std::ios::binary); |
| 278 | std::string s((std::istreambuf_iterator<char>(f)), {}); | ||
| 279 | std::map<std::string, ShaderMeta> out; | 294 | std::map<std::string, ShaderMeta> out; |
| 295 | if (!f) { err = "cannot open the file"; return out; } // a missing index must not read as an empty corpus | ||
| 296 | std::string s((std::istreambuf_iterator<char>(f)), {}); | ||
| 297 | if (f.bad()) { err = "read error"; return out; } | ||
| 280 | JsonParser p{s, 0}; | 298 | JsonParser p{s, 0}; |
| 281 | p.ws(); | 299 | p.ws(); |
| 282 | if (p.i >= s.size()) return out; | 300 | if (p.i >= s.size()) { err = "the file is empty (an intentionally empty index is {})"; return out; } |
| 283 | if (!p.consume('{')) { err = "expected '{' at byte " + std::to_string(p.i); return out; } | 301 | if (!p.consume('{')) { err = "expected '{' at byte " + std::to_string(p.i); return out; } |
| 284 | while (!p.error && p.i < s.size()) { | 302 | while (!p.error && p.i < s.size()) { |
| 285 | if (p.consume('}')) return out; | 303 | if (p.consume('}')) return out; |
| @@ -375,6 +393,116 @@ static_assert(feedback_outcome(VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT) == 1); | |||
| 375 | static_assert(feedback_outcome(VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT | | 393 | static_assert(feedback_outcome(VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT | |
| 376 | VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT) == 0); | 394 | VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT) == 0); |
| 377 | 395 | ||
| 396 | // Test hook (see the header): VK_PIPELINE_CHECK_SIMULATE_CRASH=<module name substring>[:SIGNAL]. | ||
| 397 | struct SimulatedCrash { | ||
| 398 | bool enabled = false; | ||
| 399 | std::string pattern; | ||
| 400 | int sig = SIGFPE; | ||
| 401 | }; | ||
| 402 | |||
| 403 | int signal_from_name(std::string n) { | ||
| 404 | for (char& c : n) c = static_cast<char>(std::toupper(static_cast<unsigned char>(c))); | ||
| 405 | if (n.rfind("SIG", 0) == 0) n = n.substr(3); | ||
| 406 | if (n == "FPE") return SIGFPE; | ||
| 407 | if (n == "SEGV") return SIGSEGV; | ||
| 408 | if (n == "ABRT") return SIGABRT; | ||
| 409 | if (n == "ILL") return SIGILL; | ||
| 410 | if (n == "TERM") return SIGTERM; | ||
| 411 | #ifndef _WIN32 | ||
| 412 | if (n == "BUS") return SIGBUS; | ||
| 413 | if (n == "KILL") return SIGKILL; | ||
| 414 | #endif | ||
| 415 | return 0; | ||
| 416 | } | ||
| 417 | |||
| 418 | SimulatedCrash read_simulated_crash() { | ||
| 419 | SimulatedCrash c; | ||
| 420 | const char* env = std::getenv("VK_PIPELINE_CHECK_SIMULATE_CRASH"); | ||
| 421 | if (!env || !*env) return c; | ||
| 422 | std::string v = env; | ||
| 423 | const size_t colon = v.rfind(':'); | ||
| 424 | if (colon != std::string::npos) { | ||
| 425 | if (const int sig = signal_from_name(v.substr(colon + 1))) { | ||
| 426 | c.sig = sig; | ||
| 427 | v.resize(colon); | ||
| 428 | } | ||
| 429 | } | ||
| 430 | c.enabled = true; | ||
| 431 | c.pattern = v; | ||
| 432 | return c; | ||
| 433 | } | ||
| 434 | |||
| 435 | #ifndef _WIN32 | ||
| 436 | std::string signal_label(int sig) { | ||
| 437 | switch (sig) { | ||
| 438 | case SIGFPE: return "SIGFPE"; | ||
| 439 | case SIGSEGV: return "SIGSEGV"; | ||
| 440 | case SIGABRT: return "SIGABRT"; | ||
| 441 | case SIGILL: return "SIGILL"; | ||
| 442 | case SIGBUS: return "SIGBUS"; | ||
| 443 | case SIGKILL: return "SIGKILL"; | ||
| 444 | case SIGTERM: return "SIGTERM"; | ||
| 445 | default: return "signal " + std::to_string(sig); | ||
| 446 | } | ||
| 447 | } | ||
| 448 | |||
| 449 | // --isolate: one child run of this executable over [start, start + count) of the stage-filtered list. | ||
| 450 | struct ChildRun { | ||
| 451 | bool ready = false; // reached the work loop (ISO-READY): Vulkan and the cache were set up | ||
| 452 | bool done = false; // finished the pass and saved the cache (ISO-DONE) | ||
| 453 | bool cache_ok = true; | ||
| 454 | int sig = 0; // killed by this signal | ||
| 455 | int status = 0; // exit status when it exited | ||
| 456 | std::string out; // its stdout | ||
| 457 | }; | ||
| 458 | |||
| 459 | ChildRun run_child(const std::string& exe, const std::string& dir, const std::vector<std::string>& pass, | ||
| 460 | const std::string& cache_path, size_t start, size_t count) { | ||
| 461 | ChildRun r; | ||
| 462 | std::vector<std::string> args = {exe, dir}; | ||
| 463 | if (!cache_path.empty()) args.push_back(cache_path); | ||
| 464 | for (const auto& a : pass) args.push_back(a); | ||
| 465 | args.insert(args.end(), {"--isolate-child", "--start", std::to_string(start), "--count", std::to_string(count)}); | ||
| 466 | std::vector<char*> argv; | ||
| 467 | for (auto& a : args) argv.push_back(a.data()); | ||
| 468 | argv.push_back(nullptr); | ||
| 469 | int fds[2]; | ||
| 470 | if (pipe(fds) != 0) { r.status = 127; return r; } | ||
| 471 | std::fflush(nullptr); | ||
| 472 | const pid_t pid = fork(); | ||
| 473 | if (pid < 0) { close(fds[0]); close(fds[1]); r.status = 127; return r; } | ||
| 474 | if (pid == 0) { | ||
| 475 | dup2(fds[1], 1); | ||
| 476 | close(fds[0]); close(fds[1]); | ||
| 477 | execv(exe.c_str(), argv.data()); | ||
| 478 | _exit(127); | ||
| 479 | } | ||
| 480 | close(fds[1]); | ||
| 481 | char buf[4096]; | ||
| 482 | for (;;) { | ||
| 483 | const ssize_t n = read(fds[0], buf, sizeof buf); | ||
| 484 | if (n > 0) r.out.append(buf, size_t(n)); | ||
| 485 | else if (n < 0 && errno == EINTR) continue; | ||
| 486 | else break; | ||
| 487 | } | ||
| 488 | close(fds[0]); | ||
| 489 | int st = 0; | ||
| 490 | while (waitpid(pid, &st, 0) < 0 && errno == EINTR) {} | ||
| 491 | if (WIFSIGNALED(st)) r.sig = WTERMSIG(st); | ||
| 492 | else r.status = WIFEXITED(st) ? WEXITSTATUS(st) : 1; | ||
| 493 | size_t pos = 0; | ||
| 494 | while (pos < r.out.size()) { | ||
| 495 | size_t e = r.out.find('\n', pos); | ||
| 496 | if (e == std::string::npos) e = r.out.size(); | ||
| 497 | const std::string_view line(r.out.data() + pos, e - pos); | ||
| 498 | if (line == "ISO-READY") r.ready = true; | ||
| 499 | else if (line.rfind("ISO-DONE", 0) == 0) { r.done = true; r.cache_ok = line.find("cache_ok=0") == std::string_view::npos; } | ||
| 500 | pos = e + 1; | ||
| 501 | } | ||
| 502 | return r; | ||
| 503 | } | ||
| 504 | #endif | ||
| 505 | |||
| 378 | } // namespace | 506 | } // namespace |
| 379 | 507 | ||
| 380 | int main(int argc, char** argv) { | 508 | int main(int argc, char** argv) { |
| @@ -382,7 +510,7 @@ int main(int argc, char** argv) { | |||
| 382 | std::fprintf(stderr, | 510 | std::fprintf(stderr, |
| 383 | "usage: vk_pipeline_check <spirv dir> [cache.bin] [--jobs N] [--start I] [--count N] [--slow SEC] " | 511 | "usage: vk_pipeline_check <spirv dir> [cache.bin] [--jobs N] [--start I] [--count N] [--slow SEC] " |
| 384 | "[--max-bytes N] [--large-module-bytes N] [--stage all|cs|graphics | --compute-only | --graphics-only] " | 512 | "[--max-bytes N] [--large-module-bytes N] [--stage all|cs|graphics | --compute-only | --graphics-only] " |
| 385 | "[--stats FILE] [--cache-feedback]\n"); | 513 | "[--stats FILE] [--cache-feedback] [--isolate [--isolate-batch N]]\n"); |
| 386 | return 2; | 514 | return 2; |
| 387 | } | 515 | } |
| 388 | std::setvbuf(stdout, nullptr, _IOLBF, 1 << 16); // failures reach a redirected log as they happen | 516 | std::setvbuf(stdout, nullptr, _IOLBF, 1 << 16); // failures reach a redirected log as they happen |
| @@ -392,40 +520,67 @@ int main(int argc, char** argv) { | |||
| 392 | size_t large_module_bytes = 4 * 1024 * 1024; | 520 | size_t large_module_bytes = 4 * 1024 * 1024; |
| 393 | double slow = 30.0; | 521 | double slow = 30.0; |
| 394 | std::string stage_filter = "all"; | 522 | std::string stage_filter = "all"; |
| 395 | bool cache_feedback = false; | 523 | bool cache_feedback = false, isolate = false, iso_child = false; |
| 524 | size_t isolate_batch = 256; | ||
| 396 | for (int i = 2; i < argc; i++) { | 525 | for (int i = 2; i < argc; i++) { |
| 397 | std::string a = argv[i]; | 526 | std::string a = argv[i]; |
| 398 | auto val = [&] { return i + 1 < argc ? std::string(argv[++i]) : std::string("0"); }; | 527 | auto value = [&]() -> std::string_view { |
| 399 | if (a == "--jobs") jobs = std::max(1u, uint32_t(std::stoul(val()))); | 528 | if (i + 1 == argc || std::string_view(argv[i + 1]).starts_with("--")) return {}; |
| 400 | else if (a == "--start") start = std::stoull(val()); | 529 | return argv[++i]; |
| 401 | else if (a == "--count") count = std::stoull(val()); | 530 | }; |
| 402 | else if (a == "--slow") slow = std::stod(val()); | 531 | auto number = [&](auto& dest) { |
| 403 | else if (a == "--stage") stage_filter = val(); | 532 | const auto text = value(); |
| 533 | if (text.empty()) return false; | ||
| 534 | const auto end = text.data() + text.size(); | ||
| 535 | const auto [ptr, ec] = std::from_chars(text.data(), end, dest); | ||
| 536 | return ec == std::errc{} && ptr == end; | ||
| 537 | }; | ||
| 538 | bool valid = true; | ||
| 539 | if (a == "--jobs") { | ||
| 540 | valid = number(jobs); | ||
| 541 | jobs = std::max(1u, jobs); | ||
| 542 | } else if (a == "--start") valid = number(start); | ||
| 543 | else if (a == "--count") valid = number(count); | ||
| 544 | else if (a == "--slow") valid = number(slow) && std::isfinite(slow) && slow >= 0.0; | ||
| 545 | else if (a == "--stage") valid = !(stage_filter = value()).empty(); | ||
| 404 | else if (a == "--compute-only") stage_filter = "cs"; | 546 | else if (a == "--compute-only") stage_filter = "cs"; |
| 405 | else if (a == "--graphics-only") stage_filter = "graphics"; | 547 | else if (a == "--graphics-only") stage_filter = "graphics"; |
| 406 | else if (a == "--max-bytes") max_bytes = std::stoull(val()); | 548 | else if (a == "--max-bytes") valid = number(max_bytes); |
| 407 | else if (a == "--large-module-bytes") { | 549 | else if (a == "--large-module-bytes") valid = number(large_module_bytes); |
| 408 | const std::string_view value = i + 1 < argc ? argv[++i] : ""; | 550 | else if (a == "--stats") valid = !(stats_path = value()).empty(); |
| 409 | const auto end = value.data() + value.size(); | ||
| 410 | const auto [ptr, ec] = std::from_chars(value.data(), end, large_module_bytes); | ||
| 411 | if (ec != std::errc{} || ptr != end) { | ||
| 412 | std::fprintf(stderr, "--large-module-bytes requires a non-negative byte count\n"); | ||
| 413 | return 2; | ||
| 414 | } | ||
| 415 | } | ||
| 416 | else if (a == "--stats") stats_path = val(); | ||
| 417 | else if (a == "--cache-feedback") cache_feedback = true; | 551 | else if (a == "--cache-feedback") cache_feedback = true; |
| 552 | else if (a == "--isolate") isolate = true; | ||
| 553 | else if (a == "--isolate-child") iso_child = true; // internal: the parent's child runs | ||
| 554 | else if (a == "--isolate-batch") { // parsed like the other numbers (#1735); at least one per batch | ||
| 555 | valid = number(isolate_batch); | ||
| 556 | isolate_batch = std::max<size_t>(1, isolate_batch); | ||
| 557 | } | ||
| 418 | else cache_path = a; | 558 | else cache_path = a; |
| 559 | if (!valid) { | ||
| 560 | std::fprintf(stderr, "%s requires a valid value\n", a.c_str()); | ||
| 561 | return 2; | ||
| 562 | } | ||
| 419 | } | 563 | } |
| 420 | if (stage_filter != "all" && stage_filter != "cs" && stage_filter != "graphics") { | 564 | if (stage_filter != "all" && stage_filter != "cs" && stage_filter != "graphics") { |
| 421 | std::fprintf(stderr, "unknown --stage '%s' (expected: all, cs, graphics)\n", stage_filter.c_str()); | 565 | std::fprintf(stderr, "unknown --stage '%s' (expected: all, cs, graphics)\n", stage_filter.c_str()); |
| 422 | return 2; | 566 | return 2; |
| 423 | } | 567 | } |
| 424 | 568 | ||
| 569 | if (isolate && !stats_path.empty()) { | ||
| 570 | std::fprintf(stderr, "--isolate cannot be combined with --stats\n"); | ||
| 571 | return 2; | ||
| 572 | } | ||
| 573 | #ifdef _WIN32 | ||
| 574 | if (isolate) { | ||
| 575 | std::fprintf(stderr, "--isolate is not supported on Windows (it needs fork/waitpid); run without it\n"); | ||
| 576 | return 2; | ||
| 577 | } | ||
| 578 | #endif | ||
| 579 | |||
| 425 | std::string index_err; | 580 | std::string index_err; |
| 426 | auto index = read_index(dir + "/index.json", index_err); | 581 | auto index = read_index(dir + "/index.json", index_err); |
| 427 | if (!index_err.empty()) { | 582 | if (!index_err.empty()) { |
| 428 | std::fprintf(stderr, "error: malformed JSON in %s/index.json: %s\n", dir.c_str(), index_err.c_str()); | 583 | std::fprintf(stderr, "error: cannot use %s/index.json: %s\n", dir.c_str(), index_err.c_str()); |
| 429 | return 2; | 584 | return 2; |
| 430 | } | 585 | } |
| 431 | std::fprintf(stderr, "%zu shaders in index\n", index.size()); | 586 | std::fprintf(stderr, "%zu shaders in index\n", index.size()); |
| @@ -441,6 +596,115 @@ int main(int argc, char** argv) { | |||
| 441 | const auto [lo, hi] = shader_slice(all.size(), start, count); | 596 | const auto [lo, hi] = shader_slice(all.size(), start, count); |
| 442 | const std::vector<Item> work(all.begin() + lo, all.begin() + hi); | 597 | const std::vector<Item> work(all.begin() + lo, all.begin() + hi); |
| 443 | 598 | ||
| 599 | #ifndef _WIN32 | ||
| 600 | if (isolate) { | ||
| 601 | // Parent: no Vulkan here. Run the check in child processes, one at a time, in batches of --isolate-batch | ||
| 602 | // modules. A child that dies mid-batch has its output discarded and the batch is bisected until the one | ||
| 603 | // module that kills the driver is found; the clean sub-runs partition the rest, so nothing is counted twice. | ||
| 604 | std::string exe = argv[0]; | ||
| 605 | std::error_code ec; | ||
| 606 | if (auto self = std::filesystem::read_symlink("/proc/self/exe", ec); !ec) exe = self.string(); | ||
| 607 | std::vector<std::string> pass = {"--jobs", std::to_string(jobs), "--slow", std::to_string(slow), "--stage", stage_filter, | ||
| 608 | "--max-bytes", std::to_string(max_bytes), | ||
| 609 | "--large-module-bytes", std::to_string(large_module_bytes)}; | ||
| 610 | if (cache_feedback) pass.push_back("--cache-feedback"); | ||
| 611 | struct Agg { uint32_t mod_ok = 0, mod_bad = 0, pipe_ok = 0, pipe_bad = 0, pipe_skip = 0, big = 0, crashed = 0, fb[3] = {}; }; | ||
| 612 | std::map<std::string, Agg> agg; | ||
| 613 | std::vector<std::string> crashes; | ||
| 614 | bool cache_ok = true, setup_failed = false; | ||
| 615 | size_t unreproduced = 0; | ||
| 616 | const auto t_iso = std::chrono::steady_clock::now(); | ||
| 617 | std::fprintf(stderr, "isolating %zu shaders [%zu, %zu) (stage=%s) in child processes, %zu per batch\n", | ||
| 618 | work.size(), lo, hi, stage_filter.c_str(), isolate_batch); | ||
| 619 | auto commit = [&](const ChildRun& r) { | ||
| 620 | size_t pos = 0; | ||
| 621 | while (pos < r.out.size()) { | ||
| 622 | size_t e = r.out.find('\n', pos); | ||
| 623 | if (e == std::string::npos) e = r.out.size(); | ||
| 624 | const std::string line = r.out.substr(pos, e - pos); | ||
| 625 | pos = e + 1; | ||
| 626 | // The parent prints one cache line at the end instead of one per child. | ||
| 627 | if (line == "ISO-READY" || line.rfind("ISO-DONE", 0) == 0 || line.rfind("pipeline cache: ", 0) == 0) continue; | ||
| 628 | if (line.rfind("ISO-RESULT ", 0) == 0) { | ||
| 629 | char st[16]; | ||
| 630 | unsigned v[9] = {}; | ||
| 631 | if (std::sscanf(line.c_str(), "ISO-RESULT %15s %u %u %u %u %u %u %u %u %u", st, v, v + 1, v + 2, v + 3, | ||
| 632 | v + 4, v + 5, v + 6, v + 7, v + 8) == 10) { | ||
| 633 | Agg& a = agg[st]; | ||
| 634 | a.mod_ok += v[0]; a.mod_bad += v[1]; a.pipe_ok += v[2]; a.pipe_bad += v[3]; a.pipe_skip += v[4]; | ||
| 635 | a.big += v[5]; a.fb[0] += v[6]; a.fb[1] += v[7]; a.fb[2] += v[8]; | ||
| 636 | } | ||
| 637 | continue; | ||
| 638 | } | ||
| 639 | std::printf("%s\n", line.c_str()); | ||
| 640 | } | ||
| 641 | std::fflush(stdout); | ||
| 642 | if (!r.cache_ok) cache_ok = false; | ||
| 643 | }; | ||
| 644 | // Returns the number of failures recorded for [s, s + n): crashed modules, or 1 for a crash that vanished. | ||
| 645 | auto bisect = [&](auto&& self, size_t s, size_t n) -> size_t { | ||
| 646 | if (setup_failed) return 0; | ||
| 647 | const ChildRun r = run_child(exe, dir, pass, cache_path, s, n); | ||
| 648 | if (r.done) { commit(r); return 0; } | ||
| 649 | if (!r.ready) { // died or exited before the work loop: not a module's fault | ||
| 650 | std::fputs(r.out.c_str(), stdout); | ||
| 651 | if (r.sig) std::fprintf(stderr, "error: a child process died during setup (%s)\n", signal_label(r.sig).c_str()); | ||
| 652 | else std::fprintf(stderr, "error: a child process failed during setup (exit status %d)\n", r.status); | ||
| 653 | setup_failed = true; | ||
| 654 | return 0; | ||
| 655 | } | ||
| 656 | const std::string why = r.sig ? "driver crashed: " + signal_label(r.sig) | ||
| 657 | : "driver exited with status " + std::to_string(r.status); | ||
| 658 | if (n == 1) { | ||
| 659 | const std::string& name = *all[s].first; | ||
| 660 | const std::string& st = all[s].second->stage; | ||
| 661 | std::printf("MODULE CRASH %s (%s, %s)\n", name.c_str(), st.c_str(), why.c_str()); | ||
| 662 | std::fflush(stdout); | ||
| 663 | crashes.push_back(name + " (" + st + ", " + why + ")"); | ||
| 664 | agg[st].pipe_bad++; | ||
| 665 | agg[st].crashed++; | ||
| 666 | return 1; | ||
| 667 | } | ||
| 668 | std::fprintf(stderr, "child over [%zu, %zu) died (%s); bisecting\n", s, s + n, why.c_str()); | ||
| 669 | const size_t half = n / 2; | ||
| 670 | size_t found = self(self, s, half); | ||
| 671 | found += self(self, s + half, n - half); | ||
| 672 | if (found == 0 && !setup_failed) { | ||
| 673 | std::printf("MODULE CRASH [%zu, %zu) not reproduced when split (%s); counted as failed\n", s, s + n, why.c_str()); | ||
| 674 | ++unreproduced; | ||
| 675 | return 1; | ||
| 676 | } | ||
| 677 | return found; | ||
| 678 | }; | ||
| 679 | for (size_t s = lo; s < hi && !setup_failed; s += isolate_batch) bisect(bisect, s, std::min(isolate_batch, hi - s)); | ||
| 680 | if (setup_failed) return 1; | ||
| 681 | bool failed = !crashes.empty() || unreproduced || !cache_ok; | ||
| 682 | for (const auto& [st, a] : agg) { | ||
| 683 | std::printf("%s: %u modules ok, %u failed\n", st.c_str(), a.mod_ok, a.mod_bad); | ||
| 684 | std::printf("%s pipelines: %u ok, %u failed, %u skipped\n", st.c_str(), a.pipe_ok, a.pipe_bad, a.pipe_skip); | ||
| 685 | if (a.crashed) std::printf(" %s crashed the driver: %u (counted as failed)\n", st.c_str(), a.crashed); | ||
| 686 | if (cache_feedback) | ||
| 687 | std::printf(" %s cache feedback: %u hits, %u no hit reported, %u unavailable\n", st.c_str(), a.fb[0], a.fb[1], a.fb[2]); | ||
| 688 | if (a.mod_bad || a.pipe_bad) failed = true; | ||
| 689 | } | ||
| 690 | uint32_t big_total = 0; | ||
| 691 | for (const auto& [st, a] : agg) big_total += a.big; | ||
| 692 | if (big_total) std::printf("big modules skipped: %u (limit %zu bytes)\n", big_total, max_bytes); | ||
| 693 | if (!crashes.empty()) { | ||
| 694 | std::printf("modules that crashed the driver: %zu\n", crashes.size()); | ||
| 695 | for (const auto& c : crashes) std::printf(" %s\n", c.c_str()); | ||
| 696 | } | ||
| 697 | if (unreproduced) std::printf("crashes not reproduced after splitting: %zu\n", unreproduced); | ||
| 698 | if (!cache_path.empty()) { | ||
| 699 | const auto sz = std::filesystem::file_size(cache_path, ec); | ||
| 700 | if (!ec) std::printf("pipeline cache: %ju bytes -> %s\n", static_cast<uintmax_t>(sz), cache_path.c_str()); | ||
| 701 | } | ||
| 702 | std::printf("wall time: %.1fs (isolated)\n", | ||
| 703 | std::chrono::duration<double>(std::chrono::steady_clock::now() - t_iso).count()); | ||
| 704 | return failed ? 1 : 0; | ||
| 705 | } | ||
| 706 | #endif | ||
| 707 | |||
| 444 | // Scan selected shaders to request only the optional extensions they actually use. | 708 | // Scan selected shaders to request only the optional extensions they actually use. |
| 445 | bool want_mesh = false, want_bary = false, want_lock = false, want_m8 = false, want_fma = false; | 709 | bool want_mesh = false, want_bary = false, want_lock = false, want_m8 = false, want_fma = false; |
| 446 | for (auto& [_, meta] : work) { | 710 | for (auto& [_, meta] : work) { |
| @@ -783,6 +1047,15 @@ int main(int argc, char** argv) { | |||
| 783 | if (n_done % 250 == 0) std::fprintf(stderr, " pipelines %u (%.0fs elapsed)\n", n_done, elapsed()); | 1047 | if (n_done % 250 == 0) std::fprintf(stderr, " pipelines %u (%.0fs elapsed)\n", n_done, elapsed()); |
| 784 | }; | 1048 | }; |
| 785 | 1049 | ||
| 1050 | const SimulatedCrash sim_crash = read_simulated_crash(); | ||
| 1051 | auto maybe_simulate_crash = [&](const std::string& name) { // test hook, see the header | ||
| 1052 | if (sim_crash.enabled && name.find(sim_crash.pattern) != std::string::npos) { | ||
| 1053 | std::fprintf(stderr, "simulating signal %d before the pipeline of %s\n", sim_crash.sig, name.c_str()); | ||
| 1054 | std::fflush(nullptr); | ||
| 1055 | std::raise(sim_crash.sig); | ||
| 1056 | } | ||
| 1057 | }; | ||
| 1058 | |||
| 786 | auto worker = [&] { | 1059 | auto worker = [&] { |
| 787 | for (size_t k; (k = next++) < work.size();) { | 1060 | for (size_t k; (k = next++) < work.size();) { |
| 788 | const std::string& name = *work[k].first; | 1061 | const std::string& name = *work[k].first; |
| @@ -846,6 +1119,7 @@ int main(int argc, char** argv) { | |||
| 846 | const auto t0 = std::chrono::steady_clock::now(); | 1119 | const auto t0 = std::chrono::steady_clock::now(); |
| 847 | { std::lock_guard<std::mutex> g(mu); inflight[std::this_thread::get_id()] = {name, t0}; } | 1120 | { std::lock_guard<std::mutex> g(mu); inflight[std::this_thread::get_id()] = {name, t0}; } |
| 848 | VkPipeline p = VK_NULL_HANDLE; | 1121 | VkPipeline p = VK_NULL_HANDLE; |
| 1122 | maybe_simulate_crash(name); | ||
| 849 | VkResult r = vkCreateComputePipelines(dev, cache, 1, &cpi, nullptr, &p); | 1123 | VkResult r = vkCreateComputePipelines(dev, cache, 1, &cpi, nullptr, &p); |
| 850 | const double sec = std::chrono::duration<double>(std::chrono::steady_clock::now() - t0).count(); | 1124 | const double sec = std::chrono::duration<double>(std::chrono::steady_clock::now() - t0).count(); |
| 851 | if (r == VK_SUCCESS) write_stats(name, stage, VK_SHADER_STAGE_COMPUTE_BIT, p); | 1125 | if (r == VK_SUCCESS) write_stats(name, stage, VK_SHADER_STAGE_COMPUTE_BIT, p); |
| @@ -1015,6 +1289,7 @@ int main(int argc, char** argv) { | |||
| 1015 | const auto t0 = std::chrono::steady_clock::now(); | 1289 | const auto t0 = std::chrono::steady_clock::now(); |
| 1016 | { std::lock_guard<std::mutex> g(mu); inflight[std::this_thread::get_id()] = {name, t0}; } | 1290 | { std::lock_guard<std::mutex> g(mu); inflight[std::this_thread::get_id()] = {name, t0}; } |
| 1017 | VkPipeline p = VK_NULL_HANDLE; | 1291 | VkPipeline p = VK_NULL_HANDLE; |
| 1292 | maybe_simulate_crash(name); | ||
| 1018 | VkResult r = vkCreateGraphicsPipelines(dev, cache, 1, &gpci, nullptr, &p); | 1293 | VkResult r = vkCreateGraphicsPipelines(dev, cache, 1, &gpci, nullptr, &p); |
| 1019 | const double sec = std::chrono::duration<double>(std::chrono::steady_clock::now() - t0).count(); | 1294 | const double sec = std::chrono::duration<double>(std::chrono::steady_clock::now() - t0).count(); |
| 1020 | if (r == VK_SUCCESS) write_stats(name, stage, stage_bit(stage), p); | 1295 | if (r == VK_SUCCESS) write_stats(name, stage, stage_bit(stage), p); |
| @@ -1032,6 +1307,8 @@ int main(int argc, char** argv) { | |||
| 1032 | } | 1307 | } |
| 1033 | } | 1308 | } |
| 1034 | }; | 1309 | }; |
| 1310 | if (iso_child) std::printf("ISO-READY\n"); | ||
| 1311 | std::fflush(stdout); | ||
| 1035 | std::vector<std::thread> pool; | 1312 | std::vector<std::thread> pool; |
| 1036 | for (uint32_t t = 0; t < jobs; t++) pool.emplace_back(worker); | 1313 | for (uint32_t t = 0; t < jobs; t++) pool.emplace_back(worker); |
| 1037 | // Watchdog: names every compile running past 60 s (about once a minute) and saves the cache every 10 minutes. | 1314 | // Watchdog: names every compile running past 60 s (about once a minute) and saves the cache every 10 minutes. |
| @@ -1070,6 +1347,20 @@ int main(int argc, char** argv) { | |||
| 1070 | for (auto& [st, _] : modules_bad) all_stages.insert(st); | 1347 | for (auto& [st, _] : modules_bad) all_stages.insert(st); |
| 1071 | for (auto& [st, _] : stats) all_stages.insert(st); | 1348 | for (auto& [st, _] : stats) all_stages.insert(st); |
| 1072 | 1349 | ||
| 1350 | if (iso_child) { // --isolate child: machine-readable counts; the parent prints the summary | ||
| 1351 | for (const auto& st : all_stages) { | ||
| 1352 | const StageStats* s = stats.count(st) ? &stats[st] : nullptr; | ||
| 1353 | uint32_t big = big_skipped.count(st) ? big_skipped[st] : 0; | ||
| 1354 | std::printf("ISO-RESULT %s %u %u %u %u %u %u %u %u %u\n", st.c_str(), modules_ok[st], modules_bad[st], | ||
| 1355 | s ? s->pipes_ok : 0u, s ? s->pipes_bad : 0u, s ? s->pipes_skipped : 0u, big, | ||
| 1356 | s ? s->feedback[0] : 0u, s ? s->feedback[1] : 0u, s ? s->feedback[2] : 0u); | ||
| 1357 | } | ||
| 1358 | const bool saved = save_cache(true); | ||
| 1359 | std::printf("ISO-DONE cache_ok=%d\n", saved ? 1 : 0); | ||
| 1360 | std::fflush(stdout); | ||
| 1361 | return saved ? 0 : 1; | ||
| 1362 | } | ||
| 1363 | |||
| 1073 | bool check_failed = false; | 1364 | bool check_failed = false; |
| 1074 | for (const auto& st : all_stages) { | 1365 | for (const auto& st : all_stages) { |
| 1075 | std::printf("%s: %u modules ok, %u failed\n", st.c_str(), modules_ok[st], modules_bad[st]); | 1366 | std::printf("%s: %u modules ok, %u failed\n", st.c_str(), modules_ok[st], modules_bad[st]); |
diff --git a/runtime/test/vk_presenter_sync_test.cpp b/runtime/test/vk_presenter_sync_test.cpp index 3748aeec7..8f5c7d7d0 100644 --- a/runtime/test/vk_presenter_sync_test.cpp +++ b/runtime/test/vk_presenter_sync_test.cpp | |||
| @@ -19,10 +19,14 @@ | |||
| 19 | #include "../src/vulkan_present.h" | 19 | #include "../src/vulkan_present.h" |
| 20 | 20 | ||
| 21 | #include <atomic> | 21 | #include <atomic> |
| 22 | #include <chrono> | ||
| 22 | #include <cmath> | 23 | #include <cmath> |
| 24 | #include <condition_variable> | ||
| 23 | #include <cstdint> | 25 | #include <cstdint> |
| 24 | #include <cstdio> | 26 | #include <cstdio> |
| 25 | #include <cstdlib> | 27 | #include <cstdlib> |
| 28 | #include <functional> | ||
| 29 | #include <mutex> | ||
| 26 | #include <string_view> | 30 | #include <string_view> |
| 27 | #include <thread> | 31 | #include <thread> |
| 28 | #include <vector> | 32 | #include <vector> |
| @@ -49,10 +53,12 @@ namespace driver { | |||
| 49 | PFN_vkGetInstanceProcAddr real_get_instance = nullptr; | 53 | PFN_vkGetInstanceProcAddr real_get_instance = nullptr; |
| 50 | PFN_vkGetDeviceProcAddr real_get_device = nullptr; | 54 | PFN_vkGetDeviceProcAddr real_get_device = nullptr; |
| 51 | PFN_vkQueueSubmit real_submit = nullptr; | 55 | PFN_vkQueueSubmit real_submit = nullptr; |
| 56 | PFN_vkQueuePresentKHR real_present = nullptr; | ||
| 52 | PFN_vkCmdPipelineBarrier real_barrier = nullptr; | 57 | PFN_vkCmdPipelineBarrier real_barrier = nullptr; |
| 53 | PFN_vkCmdCopyImageToBuffer real_copy_i2b = nullptr; | 58 | PFN_vkCmdCopyImageToBuffer real_copy_i2b = nullptr; |
| 54 | 59 | ||
| 55 | std::atomic<VkResult> fail_next_submit{VK_SUCCESS}; | 60 | std::atomic<VkResult> fail_next_submit{VK_SUCCESS}; |
| 61 | std::function<void()> on_next_present; | ||
| 56 | std::atomic<bool> observe_capture{false}; | 62 | std::atomic<bool> observe_capture{false}; |
| 57 | std::atomic<bool> saw_capture_waw{false}; | 63 | std::atomic<bool> saw_capture_waw{false}; |
| 58 | std::atomic<std::uint32_t> capture_copies{0}; | 64 | std::atomic<std::uint32_t> capture_copies{0}; |
| @@ -65,6 +71,15 @@ VKAPI_ATTR VkResult VKAPI_CALL queue_submit(VkQueue queue, std::uint32_t count, | |||
| 65 | return real_submit(queue, count, submits, fence); | 71 | return real_submit(queue, count, submits, fence); |
| 66 | } | 72 | } |
| 67 | 73 | ||
| 74 | VKAPI_ATTR VkResult VKAPI_CALL queue_present(VkQueue queue, const VkPresentInfoKHR* info) { | ||
| 75 | if (on_next_present) { | ||
| 76 | auto cb = std::move(on_next_present); | ||
| 77 | on_next_present = {}; | ||
| 78 | cb(); | ||
| 79 | } | ||
| 80 | return real_present(queue, info); | ||
| 81 | } | ||
| 82 | |||
| 68 | VKAPI_ATTR void VKAPI_CALL cmd_pipeline_barrier(VkCommandBuffer cb, VkPipelineStageFlags src_stage, | 83 | VKAPI_ATTR void VKAPI_CALL cmd_pipeline_barrier(VkCommandBuffer cb, VkPipelineStageFlags src_stage, |
| 69 | VkPipelineStageFlags dst_stage, VkDependencyFlags flags, | 84 | VkPipelineStageFlags dst_stage, VkDependencyFlags flags, |
| 70 | std::uint32_t mem_count, const VkMemoryBarrier* mem, | 85 | std::uint32_t mem_count, const VkMemoryBarrier* mem, |
| @@ -100,6 +115,7 @@ VKAPI_ATTR void VKAPI_CALL cmd_copy_image_to_buffer(VkCommandBuffer cb, VkImage | |||
| 100 | VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL get_device(VkDevice device, const char* name) { | 115 | VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL get_device(VkDevice device, const char* name) { |
| 101 | const std::string_view n = name; | 116 | const std::string_view n = name; |
| 102 | if (n == "vkQueueSubmit") return reinterpret_cast<PFN_vkVoidFunction>(queue_submit); | 117 | if (n == "vkQueueSubmit") return reinterpret_cast<PFN_vkVoidFunction>(queue_submit); |
| 118 | if (n == "vkQueuePresentKHR") return reinterpret_cast<PFN_vkVoidFunction>(queue_present); | ||
| 103 | if (n == "vkCmdPipelineBarrier") return reinterpret_cast<PFN_vkVoidFunction>(cmd_pipeline_barrier); | 119 | if (n == "vkCmdPipelineBarrier") return reinterpret_cast<PFN_vkVoidFunction>(cmd_pipeline_barrier); |
| 104 | if (n == "vkCmdCopyImageToBuffer") return reinterpret_cast<PFN_vkVoidFunction>(cmd_copy_image_to_buffer); | 120 | if (n == "vkCmdCopyImageToBuffer") return reinterpret_cast<PFN_vkVoidFunction>(cmd_copy_image_to_buffer); |
| 105 | return real_get_device(device, name); | 121 | return real_get_device(device, name); |
| @@ -114,6 +130,7 @@ void install(PFN_vkGetInstanceProcAddr instance_proc, VkInstance instance, VkDev | |||
| 114 | real_get_instance = instance_proc; | 130 | real_get_instance = instance_proc; |
| 115 | real_get_device = reinterpret_cast<PFN_vkGetDeviceProcAddr>(instance_proc(instance, "vkGetDeviceProcAddr")); | 131 | real_get_device = reinterpret_cast<PFN_vkGetDeviceProcAddr>(instance_proc(instance, "vkGetDeviceProcAddr")); |
| 116 | real_submit = reinterpret_cast<PFN_vkQueueSubmit>(real_get_device(device, "vkQueueSubmit")); | 132 | real_submit = reinterpret_cast<PFN_vkQueueSubmit>(real_get_device(device, "vkQueueSubmit")); |
| 133 | real_present = reinterpret_cast<PFN_vkQueuePresentKHR>(real_get_device(device, "vkQueuePresentKHR")); | ||
| 117 | real_barrier = reinterpret_cast<PFN_vkCmdPipelineBarrier>(real_get_device(device, "vkCmdPipelineBarrier")); | 134 | real_barrier = reinterpret_cast<PFN_vkCmdPipelineBarrier>(real_get_device(device, "vkCmdPipelineBarrier")); |
| 118 | real_copy_i2b = reinterpret_cast<PFN_vkCmdCopyImageToBuffer>(real_get_device(device, "vkCmdCopyImageToBuffer")); | 135 | real_copy_i2b = reinterpret_cast<PFN_vkCmdCopyImageToBuffer>(real_get_device(device, "vkCmdCopyImageToBuffer")); |
| 119 | } | 136 | } |
| @@ -193,15 +210,52 @@ int main() { | |||
| 193 | EXPECT(presenter.ok()); | 210 | EXPECT(presenter.ok()); |
| 194 | EXPECT(presenter.enable_capture()); | 211 | EXPECT(presenter.enable_capture()); |
| 195 | 212 | ||
| 196 | // 1. Failed vkQueueSubmit must NOT commit the UNDEFINED -> GENERAL transition in LayoutTracker. | 213 | // 1. Failed vkQueueSubmit must NOT commit the UNDEFINED -> GENERAL transition in LayoutTracker (O(1) rollback |
| 214 | // even with many live tracked textures), and tracker_mutex_ must be released before vkQueuePresentKHR. | ||
| 215 | for (ResourceId extra = 1000; extra < 1512; ++extra) | ||
| 216 | context.add_resource(extra, side_rb, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL); | ||
| 197 | EXPECT(context.layout(1, 0) == VK_IMAGE_LAYOUT_UNDEFINED); | 217 | EXPECT(context.layout(1, 0) == VK_IMAGE_LAYOUT_UNDEFINED); |
| 198 | driver::fail_next_submit.store(VK_ERROR_OUT_OF_HOST_MEMORY); | 218 | driver::fail_next_submit.store(VK_ERROR_OUT_OF_HOST_MEMORY); |
| 199 | EXPECT(presenter.present(1, true) == VK_ERROR_OUT_OF_HOST_MEMORY); | 219 | EXPECT(presenter.present(1, true) == VK_ERROR_OUT_OF_HOST_MEMORY); |
| 200 | EXPECT(context.layout(1, 0) == VK_IMAGE_LAYOUT_UNDEFINED); | 220 | EXPECT(context.layout(1, 0) == VK_IMAGE_LAYOUT_UNDEFINED); |
| 201 | 221 | EXPECT(context.layout(1000, 0) == VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL); | |
| 202 | // Next present succeeds, runs the deferred zero-fill, and commits GENERAL. | 222 | |
| 203 | EXPECT(presenter.present(1, true) == VK_SUCCESS); | 223 | // Next present succeeds, runs the deferred zero-fill, commits GENERAL, and unlocks tracker_mutex_ before |
| 224 | // vkQueuePresentKHR so other threads' emit() / layout() calls are not blocked by presentation. | ||
| 225 | std::mutex sync_mutex; | ||
| 226 | std::condition_variable sync_cv; | ||
| 227 | bool reader_started = false; | ||
| 228 | bool read_done = false; | ||
| 229 | VkImageLayout seen_during_present = VK_IMAGE_LAYOUT_UNDEFINED; | ||
| 230 | bool unblocked_during_present = false; | ||
| 231 | std::thread reader; | ||
| 232 | driver::on_next_present = [&] { | ||
| 233 | reader = std::thread([&] { | ||
| 234 | { | ||
| 235 | std::lock_guard lk(sync_mutex); | ||
| 236 | reader_started = true; | ||
| 237 | } | ||
| 238 | sync_cv.notify_all(); | ||
| 239 | const VkImageLayout layout = context.layout(1, 0); | ||
| 240 | { | ||
| 241 | std::lock_guard lk(sync_mutex); | ||
| 242 | seen_during_present = layout; | ||
| 243 | read_done = true; | ||
| 244 | } | ||
| 245 | sync_cv.notify_all(); | ||
| 246 | }); | ||
| 247 | std::unique_lock lk(sync_mutex); | ||
| 248 | const bool started = sync_cv.wait_for(lk, std::chrono::seconds(2), [&] { return reader_started; }); | ||
| 249 | unblocked_during_present = | ||
| 250 | started && sync_cv.wait_for(lk, std::chrono::milliseconds(500), [&] { return read_done; }); | ||
| 251 | }; | ||
| 252 | const VkResult present_rc = presenter.present(1, true); | ||
| 253 | if (reader.joinable()) reader.join(); | ||
| 254 | EXPECT(present_rc == VK_SUCCESS); | ||
| 255 | EXPECT(unblocked_during_present); | ||
| 256 | EXPECT(seen_during_present == VK_IMAGE_LAYOUT_GENERAL); | ||
| 204 | EXPECT(context.layout(1, 0) == VK_IMAGE_LAYOUT_GENERAL); | 257 | EXPECT(context.layout(1, 0) == VK_IMAGE_LAYOUT_GENERAL); |
| 258 | for (ResourceId extra = 1000; extra < 1512; ++extra) context.remove_resource(extra); | ||
| 205 | std::vector<std::uint8_t> pixels; | 259 | std::vector<std::uint8_t> pixels; |
| 206 | VkExtent2D ext{}; | 260 | VkExtent2D ext{}; |
| 207 | VkFormat fmt = VK_FORMAT_UNDEFINED; | 261 | VkFormat fmt = VK_FORMAT_UNDEFINED; |
diff --git a/runtime/test/vk_test_device.h b/runtime/test/vk_test_device.h index 635a3107b..1e54a9487 100644 --- a/runtime/test/vk_test_device.h +++ b/runtime/test/vk_test_device.h | |||
| @@ -1,10 +1,12 @@ | |||
| 1 | // Shared setup for the GPU tests of the D3D12 layer: a Vulkan 1.3 device with dynamicRendering, synchronization2, | 1 | // Shared setup for the GPU tests of the D3D12 layer: a Vulkan 1.3 device (or 1.2 with VK_KHR_dynamic_rendering and |
| 2 | // timelineSemaphore and separateDepthStencilLayouts, images, buffers and one-shot submissions. | 2 | // VK_KHR_synchronization2) with dynamicRendering, synchronization2, timelineSemaphore and |
| 3 | // separateDepthStencilLayouts, images, buffers and one-shot submissions. | ||
| 3 | // Set LEONIDA_VK_VALIDATION=1 to run under VK_LAYER_KHRONOS_validation; Device::validation_errors() counts errors. | 4 | // Set LEONIDA_VK_VALIDATION=1 to run under VK_LAYER_KHRONOS_validation; Device::validation_errors() counts errors. |
| 4 | #pragma once | 5 | #pragma once |
| 5 | 6 | ||
| 6 | #include "vulkan_loader.h" | 7 | #include "vulkan_loader.h" |
| 7 | #include "../src/vulkan_device_filter.h" | 8 | #include "../src/vulkan_device_filter.h" |
| 9 | #include "../src/vulkan13_features.h" | ||
| 8 | #include "vk_device_pick.h" | 10 | #include "vk_device_pick.h" |
| 9 | #include "../src/subgroup_size.h" | 11 | #include "../src/subgroup_size.h" |
| 10 | 12 | ||
| @@ -82,6 +84,12 @@ public: | |||
| 82 | VkDevice device = VK_NULL_HANDLE; | 84 | VkDevice device = VK_NULL_HANDLE; |
| 83 | VkQueue queue = VK_NULL_HANDLE; | 85 | VkQueue queue = VK_NULL_HANDLE; |
| 84 | std::uint32_t family = 0; | 86 | std::uint32_t family = 0; |
| 87 | // Set before initialize(): how many queues of `family` to create (fewer if the family has fewer). `queues` holds the | ||
| 88 | // handles; queues[0] == queue. A test that wants distinct VkQueues for its D3D12 queues passes them on as | ||
| 89 | // VulkanDeviceInfo::command_queues when there is more than one. | ||
| 90 | std::uint32_t queue_count_wanted = 1; | ||
| 91 | std::uint32_t family_queue_count = 1; // the family's queueCount, known after the device is chosen | ||
| 92 | std::vector<VkQueue> queues; | ||
| 85 | bool validation = false; | 93 | bool validation = false; |
| 86 | bool bc = false; // textureCompressionBC enabled | 94 | bool bc = false; // textureCompressionBC enabled |
| 87 | VkPhysicalDeviceFeatures enabled{}; // the core features enabled on `device` | 95 | VkPhysicalDeviceFeatures enabled{}; // the core features enabled on `device` |
| @@ -134,9 +142,10 @@ public: | |||
| 134 | reinterpret_cast<PFN_vkDestroyInstance>(instance_proc(instance, "vkDestroyInstance"))(instance, nullptr); | 142 | reinterpret_cast<PFN_vkDestroyInstance>(instance_proc(instance, "vkDestroyInstance"))(instance, nullptr); |
| 135 | } | 143 | } |
| 136 | 144 | ||
| 145 | // A Vulkan 1.3 function falls back to its KHR name on a 1.2 device. | ||
| 137 | template<typename F> | 146 | template<typename F> |
| 138 | F fn(const char* name) const { | 147 | F fn(const char* name) const { |
| 139 | return reinterpret_cast<F>(device_proc(device, name)); | 148 | return reinterpret_cast<F>(leonida::device_proc_or_khr(device_proc, device, name)); |
| 140 | } | 149 | } |
| 141 | 150 | ||
| 142 | template<typename F> | 151 | template<typename F> |
| @@ -263,10 +272,16 @@ public: | |||
| 263 | if (result != VK_SUCCESS) return failure("vkEnumeratePhysicalDevices", result); | 272 | if (result != VK_SUCCESS) return failure("vkEnumeratePhysicalDevices", result); |
| 264 | VkPhysicalDeviceProperties chosen{}; | 273 | VkPhysicalDeviceProperties chosen{}; |
| 265 | int best_rank = -1; | 274 | int best_rank = -1; |
| 275 | const auto features2_of = instance_fn<PFN_vkGetPhysicalDeviceFeatures2>("vkGetPhysicalDeviceFeatures2"); | ||
| 276 | const auto device_extensions_of = | ||
| 277 | instance_fn<PFN_vkEnumerateDeviceExtensionProperties>("vkEnumerateDeviceExtensionProperties"); | ||
| 278 | leonida::Vulkan13Features candidate13; | ||
| 266 | for (auto candidate : devices) { | 279 | for (auto candidate : devices) { |
| 267 | VkPhysicalDeviceProperties props{}; | 280 | VkPhysicalDeviceProperties props{}; |
| 268 | properties_of(candidate, &props); | 281 | properties_of(candidate, &props); |
| 269 | if (props.apiVersion < VK_API_VERSION_1_3 || !leonida::vulkan_device_wanted(props.deviceName)) continue; | 282 | if (!leonida::vulkan_device_wanted(props.deviceName)) continue; |
| 283 | candidate13.query(candidate, props.apiVersion, features2_of, device_extensions_of); | ||
| 284 | if (!candidate13.usable()) continue; | ||
| 270 | std::uint32_t family_count = 0; | 285 | std::uint32_t family_count = 0; |
| 271 | families_of(candidate, &family_count, nullptr); | 286 | families_of(candidate, &family_count, nullptr); |
| 272 | std::vector<VkQueueFamilyProperties> families(family_count); | 287 | std::vector<VkQueueFamilyProperties> families(family_count); |
| @@ -277,8 +292,10 @@ public: | |||
| 277 | rank > best_rank) { | 292 | rank > best_rank) { |
| 278 | physical = candidate; | 293 | physical = candidate; |
| 279 | family = i; | 294 | family = i; |
| 295 | family_queue_count = families[i].queueCount; | ||
| 280 | chosen = props; | 296 | chosen = props; |
| 281 | best_rank = rank; | 297 | best_rank = rank; |
| 298 | v13_.choose(candidate13); | ||
| 282 | } | 299 | } |
| 283 | break; | 300 | break; |
| 284 | } | 301 | } |
| @@ -286,22 +303,25 @@ public: | |||
| 286 | if (!physical) { | 303 | if (!physical) { |
| 287 | if (const std::string filter = leonida::vulkan_device_filter(); !filter.empty()) { | 304 | if (const std::string filter = leonida::vulkan_device_filter(); !filter.empty()) { |
| 288 | // A filter that matches nothing fails the test instead of skipping it. | 305 | // A filter that matches nothing fails the test instead of skipping it. |
| 289 | std::fprintf(stderr, "LEONIDA_VK_DEVICE=%s: no Vulkan 1.3 device with a graphics queue matches\n", | 306 | std::fprintf(stderr, |
| 307 | "LEONIDA_VK_DEVICE=%s: no Vulkan 1.3 device (or 1.2 with VK_KHR_dynamic_rendering and " | ||
| 308 | "VK_KHR_synchronization2) with a graphics queue matches\n", | ||
| 290 | filter.c_str()); | 309 | filter.c_str()); |
| 291 | return DeviceStatus::failed; | 310 | return DeviceStatus::failed; |
| 292 | } | 311 | } |
| 293 | std::fprintf(stderr, "no Vulkan 1.3 device with a graphics queue\n"); | 312 | std::fprintf(stderr, "no Vulkan 1.3 device (or 1.2 with VK_KHR_dynamic_rendering and " |
| 313 | "VK_KHR_synchronization2) with a graphics queue\n"); | ||
| 294 | return DeviceStatus::unavailable; | 314 | return DeviceStatus::unavailable; |
| 295 | } | 315 | } |
| 296 | std::printf("device: %s%s\n", chosen.deviceName, validation ? " (validation on)" : ""); | 316 | std::printf("device: %s%s%s\n", chosen.deviceName, v13_.core ? "" : " (Vulkan 1.2 + KHR extensions)", |
| 317 | validation ? " (validation on)" : ""); | ||
| 297 | 318 | ||
| 298 | VkPhysicalDeviceVulkan13Features features13{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES}; | 319 | VkPhysicalDeviceVulkan11Features features11{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES}; |
| 299 | VkPhysicalDeviceVulkan11Features features11{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES, &features13}; | ||
| 300 | VkPhysicalDeviceVulkan12Features features12{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES, &features11}; | 320 | VkPhysicalDeviceVulkan12Features features12{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES, &features11}; |
| 301 | VkPhysicalDeviceFeatures2 features{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, &features12}; | 321 | VkPhysicalDeviceFeatures2 features{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, &features12}; |
| 302 | instance_fn<PFN_vkGetPhysicalDeviceFeatures2>("vkGetPhysicalDeviceFeatures2")(physical, &features); | 322 | features2_of(physical, &features); |
| 303 | if (!features13.dynamicRendering || !features13.synchronization2 || !features12.timelineSemaphore || | 323 | if (!features12.timelineSemaphore || !features12.separateDepthStencilLayouts || |
| 304 | !features12.separateDepthStencilLayouts || !features12.bufferDeviceAddress) { | 324 | !features12.bufferDeviceAddress) { |
| 305 | std::fprintf(stderr, "the device lacks dynamicRendering, synchronization2, timelineSemaphore or " | 325 | std::fprintf(stderr, "the device lacks dynamicRendering, synchronization2, timelineSemaphore or " |
| 306 | "separateDepthStencilLayouts\n"); | 326 | "separateDepthStencilLayouts\n"); |
| 307 | return DeviceStatus::unavailable; | 327 | return DeviceStatus::unavailable; |
| @@ -327,14 +347,8 @@ public: | |||
| 327 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT}; | 347 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT}; |
| 328 | enable_conditional.conditionalRendering = VK_TRUE; | 348 | enable_conditional.conditionalRendering = VK_TRUE; |
| 329 | 349 | ||
| 330 | VkPhysicalDeviceVulkan13Features enable13{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES, | ||
| 331 | conditional_rendering ? &enable_conditional : nullptr}; | ||
| 332 | enable13.dynamicRendering = VK_TRUE; | ||
| 333 | enable13.synchronization2 = VK_TRUE; | ||
| 334 | enable13.subgroupSizeControl = features13.subgroupSizeControl; | ||
| 335 | enable13.computeFullSubgroups = features13.computeFullSubgroups; | ||
| 336 | leonida::query_subgroup_size_caps(instance_fn<PFN_vkGetPhysicalDeviceProperties2>("vkGetPhysicalDeviceProperties2"), | 350 | leonida::query_subgroup_size_caps(instance_fn<PFN_vkGetPhysicalDeviceProperties2>("vkGetPhysicalDeviceProperties2"), |
| 337 | physical, features13.subgroupSizeControl, features13.computeFullSubgroups, | 351 | physical, v13_.subgroup_size_control, v13_.compute_full_subgroups, |
| 338 | subgroup); | 352 | subgroup); |
| 339 | std::printf("subgroup sizes: %u..%u (default %u), requirable in stages 0x%x, subgroupSizeControl %s, " | 353 | std::printf("subgroup sizes: %u..%u (default %u), requirable in stages 0x%x, subgroupSizeControl %s, " |
| 340 | "computeFullSubgroups %s\n", | 354 | "computeFullSubgroups %s\n", |
| @@ -342,7 +356,8 @@ public: | |||
| 342 | subgroup.subgroup_size_control ? "on" : "off", subgroup.compute_full_subgroups ? "on" : "off"); | 356 | subgroup.subgroup_size_control ? "on" : "off", subgroup.compute_full_subgroups ? "on" : "off"); |
| 343 | // shaderDrawParameters, where available: translated vertex shaders will read BaseVertex and BaseInstance once PR 436 | 357 | // shaderDrawParameters, where available: translated vertex shaders will read BaseVertex and BaseInstance once PR 436 |
| 344 | // (zero-based VS ids) is in; harmless before. | 358 | // (zero-based VS ids) is in; harmless before. |
| 345 | VkPhysicalDeviceVulkan11Features enable11{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES, &enable13}; | 359 | VkPhysicalDeviceVulkan11Features enable11{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES, |
| 360 | v13_.enable(conditional_rendering ? &enable_conditional : nullptr)}; | ||
| 346 | enable11.shaderDrawParameters = features11.shaderDrawParameters; | 361 | enable11.shaderDrawParameters = features11.shaderDrawParameters; |
| 347 | VkPhysicalDeviceVulkan12Features enable12{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES, &enable11}; | 362 | VkPhysicalDeviceVulkan12Features enable12{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES, &enable11}; |
| 348 | enable12.timelineSemaphore = VK_TRUE; | 363 | enable12.timelineSemaphore = VK_TRUE; |
| @@ -369,11 +384,11 @@ public: | |||
| 369 | enable12.samplerFilterMinmax = sampler_filter_minmax; | 384 | enable12.samplerFilterMinmax = sampler_filter_minmax; |
| 370 | enable12.bufferDeviceAddress = VK_TRUE; | 385 | enable12.bufferDeviceAddress = VK_TRUE; |
| 371 | 386 | ||
| 372 | const float priority = 1.0f; | 387 | const std::vector<float> priority(std::max(1u, std::min(queue_count_wanted, family_queue_count)), 1.0f); |
| 373 | VkDeviceQueueCreateInfo queue_info{VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO}; | 388 | VkDeviceQueueCreateInfo queue_info{VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO}; |
| 374 | queue_info.queueFamilyIndex = family; | 389 | queue_info.queueFamilyIndex = family; |
| 375 | queue_info.queueCount = 1; | 390 | queue_info.queueCount = std::max(1u, std::min(queue_count_wanted, family_queue_count)); |
| 376 | queue_info.pQueuePriorities = &priority; | 391 | queue_info.pQueuePriorities = priority.data(); |
| 377 | VkPhysicalDeviceFeatures enable{}; | 392 | VkPhysicalDeviceFeatures enable{}; |
| 378 | enable.textureCompressionBC = features.features.textureCompressionBC; // BC uploads, where available | 393 | enable.textureCompressionBC = features.features.textureCompressionBC; // BC uploads, where available |
| 379 | enable.shaderInt64 = features.features.shaderInt64; // translated shaders declare Int64 (index features) | 394 | enable.shaderInt64 = features.features.shaderInt64; // translated shaders declare Int64 (index features) |
| @@ -399,8 +414,8 @@ public: | |||
| 399 | instance_fn<PFN_vkGetPhysicalDeviceFeatures2>("vkGetPhysicalDeviceFeatures2")(physical, &query); | 414 | instance_fn<PFN_vkGetPhysicalDeviceFeatures2>("vkGetPhysicalDeviceFeatures2")(physical, &query); |
| 400 | image_view_min_lod = min_lod.minLod == VK_TRUE; | 415 | image_view_min_lod = min_lod.minLod == VK_TRUE; |
| 401 | if (image_view_min_lod) { | 416 | if (image_view_min_lod) { |
| 402 | min_lod.pNext = enable13.pNext; | 417 | min_lod.pNext = *v13_.next(); |
| 403 | enable13.pNext = &min_lod; | 418 | *v13_.next() = &min_lod; |
| 404 | } | 419 | } |
| 405 | } | 420 | } |
| 406 | VkPhysicalDeviceHostImageCopyFeaturesEXT host_copy{ | 421 | VkPhysicalDeviceHostImageCopyFeaturesEXT host_copy{ |
| @@ -413,8 +428,8 @@ public: | |||
| 413 | } | 428 | } |
| 414 | const char* host_image_copy_name = VK_EXT_HOST_IMAGE_COPY_EXTENSION_NAME; | 429 | const char* host_image_copy_name = VK_EXT_HOST_IMAGE_COPY_EXTENSION_NAME; |
| 415 | if (host_image_copy) { | 430 | if (host_image_copy) { |
| 416 | host_copy.pNext = enable13.pNext; // after the conditional rendering features, if any | 431 | host_copy.pNext = *v13_.next(); // after the conditional rendering features, if any |
| 417 | enable13.pNext = &host_copy; | 432 | *v13_.next() = &host_copy; |
| 418 | } | 433 | } |
| 419 | 434 | ||
| 420 | #ifdef VK_KHR_SHADER_FMA_EXTENSION_NAME | 435 | #ifdef VK_KHR_SHADER_FMA_EXTENSION_NAME |
| @@ -427,8 +442,8 @@ public: | |||
| 427 | instance_fn<PFN_vkGetPhysicalDeviceFeatures2>("vkGetPhysicalDeviceFeatures2")(physical, &query); | 442 | instance_fn<PFN_vkGetPhysicalDeviceFeatures2>("vkGetPhysicalDeviceFeatures2")(physical, &query); |
| 428 | shader_fma = fma_features.shaderFmaFloat32 == VK_TRUE; | 443 | shader_fma = fma_features.shaderFmaFloat32 == VK_TRUE; |
| 429 | if (shader_fma) { | 444 | if (shader_fma) { |
| 430 | fma_features.pNext = enable13.pNext; | 445 | fma_features.pNext = *v13_.next(); |
| 431 | enable13.pNext = &fma_features; | 446 | *v13_.next() = &fma_features; |
| 432 | } | 447 | } |
| 433 | } | 448 | } |
| 434 | #endif | 449 | #endif |
| @@ -442,6 +457,7 @@ public: | |||
| 442 | device_info.pEnabledFeatures = &enable; | 457 | device_info.pEnabledFeatures = &enable; |
| 443 | enabled = enable; | 458 | enabled = enable; |
| 444 | std::vector<const char*> device_extensions; | 459 | std::vector<const char*> device_extensions; |
| 460 | v13_.add_extensions(device_extensions); | ||
| 445 | if (image_view_min_lod) device_extensions.push_back(VK_EXT_IMAGE_VIEW_MIN_LOD_EXTENSION_NAME); | 461 | if (image_view_min_lod) device_extensions.push_back(VK_EXT_IMAGE_VIEW_MIN_LOD_EXTENSION_NAME); |
| 446 | if (conditional_rendering) device_extensions.push_back(conditional_extension); | 462 | if (conditional_rendering) device_extensions.push_back(conditional_extension); |
| 447 | if (host_image_copy) device_extensions.push_back(host_image_copy_name); | 463 | if (host_image_copy) device_extensions.push_back(host_image_copy_name); |
| @@ -462,8 +478,8 @@ public: | |||
| 462 | VkPhysicalDeviceFeatures2 query{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, &swapchain_m1}; | 478 | VkPhysicalDeviceFeatures2 query{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, &swapchain_m1}; |
| 463 | instance_fn<PFN_vkGetPhysicalDeviceFeatures2>("vkGetPhysicalDeviceFeatures2")(physical, &query); | 479 | instance_fn<PFN_vkGetPhysicalDeviceFeatures2>("vkGetPhysicalDeviceFeatures2")(physical, &query); |
| 464 | if (swapchain_m1.swapchainMaintenance1 == VK_TRUE) { | 480 | if (swapchain_m1.swapchainMaintenance1 == VK_TRUE) { |
| 465 | swapchain_m1.pNext = enable13.pNext; | 481 | swapchain_m1.pNext = *v13_.next(); |
| 466 | enable13.pNext = &swapchain_m1; | 482 | *v13_.next() = &swapchain_m1; |
| 467 | device_extensions.push_back(name); | 483 | device_extensions.push_back(name); |
| 468 | swapchain_maintenance1 = true; | 484 | swapchain_maintenance1 = true; |
| 469 | } | 485 | } |
| @@ -478,7 +494,10 @@ public: | |||
| 478 | result = instance_fn<PFN_vkCreateDevice>("vkCreateDevice")(physical, &device_info, nullptr, &device); | 494 | result = instance_fn<PFN_vkCreateDevice>("vkCreateDevice")(physical, &device_info, nullptr, &device); |
| 479 | if (result != VK_SUCCESS) return failure("vkCreateDevice", result); | 495 | if (result != VK_SUCCESS) return failure("vkCreateDevice", result); |
| 480 | device_proc = instance_fn<PFN_vkGetDeviceProcAddr>("vkGetDeviceProcAddr"); | 496 | device_proc = instance_fn<PFN_vkGetDeviceProcAddr>("vkGetDeviceProcAddr"); |
| 481 | fn<PFN_vkGetDeviceQueue>("vkGetDeviceQueue")(device, family, 0, &queue); | 497 | queues.resize(queue_info.queueCount); |
| 498 | for (std::uint32_t i = 0; i < queue_info.queueCount; ++i) | ||
| 499 | fn<PFN_vkGetDeviceQueue>("vkGetDeviceQueue")(device, family, i, &queues[i]); | ||
| 500 | queue = queues[0]; | ||
| 482 | instance_fn<PFN_vkGetPhysicalDeviceMemoryProperties>("vkGetPhysicalDeviceMemoryProperties")(physical, | 501 | instance_fn<PFN_vkGetPhysicalDeviceMemoryProperties>("vkGetPhysicalDeviceMemoryProperties")(physical, |
| 483 | &memory_); | 502 | &memory_); |
| 484 | VkCommandPoolCreateInfo pool{VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO}; | 503 | VkCommandPoolCreateInfo pool{VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO}; |
| @@ -628,6 +647,7 @@ private: | |||
| 628 | VkDebugUtilsMessengerEXT messenger_ = VK_NULL_HANDLE; | 647 | VkDebugUtilsMessengerEXT messenger_ = VK_NULL_HANDLE; |
| 629 | VkCommandPool pool_ = VK_NULL_HANDLE; | 648 | VkCommandPool pool_ = VK_NULL_HANDLE; |
| 630 | VkPhysicalDeviceMemoryProperties memory_{}; | 649 | VkPhysicalDeviceMemoryProperties memory_{}; |
| 650 | leonida::Vulkan13Features v13_; // the chosen device's dynamicRendering/synchronization2 path | ||
| 631 | std::vector<std::pair<VkImage, VkDeviceMemory>> images_; | 651 | std::vector<std::pair<VkImage, VkDeviceMemory>> images_; |
| 632 | std::vector<std::pair<VkBuffer, VkDeviceMemory>> buffers_; | 652 | std::vector<std::pair<VkBuffer, VkDeviceMemory>> buffers_; |
| 633 | }; | 653 | }; |
diff --git a/runtime/test/vk_xdxr_build_test.cpp b/runtime/test/vk_xdxr_build_test.cpp index 136f49f68..1f4686869 100644 --- a/runtime/test/vk_xdxr_build_test.cpp +++ b/runtime/test/vk_xdxr_build_test.cpp | |||
| @@ -6,10 +6,12 @@ | |||
| 6 | // | 6 | // |
| 7 | // Cases: one triangle; five (two levels); 1000 random triangles; an indexed R16 grid with a 16-byte vertex stride; | 7 | // Cases: one triangle; five (two levels); 1000 random triangles; an indexed R16 grid with a 16-byte vertex stride; |
| 8 | // R32 indices with R32G32 vertices; a geometry transform; two geometries with an inactive (NaN) triangle; no | 8 | // R32 indices with R32G32 vertices; a geometry transform; two geometries with an inactive (NaN) triangle; no |
| 9 | // triangles; 5000 triangles (three radix-sort tiles); and a TLAS of four instances (rotated and scaled, one with mask 0, one with no BLAS). | 9 | // triangles; 5000 triangles (many radix-sort tiles); updates (refits) in place and into another buffer; clones and a |
| 10 | // compaction (CopyRaytracingAccelerationStructure) with the postbuild size; a TLAS of four instances (rotated and scaled, one with mask 0, one with no BLAS). | ||
| 10 | // Exit 77 when there is no Vulkan device with bufferDeviceAddress. | 11 | // Exit 77 when there is no Vulkan device with bufferDeviceAddress. |
| 11 | // `vk_xdxr_build_test <out dir> <triangles>` instead times BLAS builds of that many random triangles (wall clock of | 12 | // `vk_xdxr_build_test <out dir> <triangles>` instead times BLAS builds of that many random triangles (wall clock of |
| 12 | // one submission each, after one warm-up; result and scratch in device-local memory) and writes nothing. | 13 | // one submission each, after one warm-up; result and scratch in device-local memory), then in-place updates |
| 14 | // (refits) of the same structure, and writes nothing. | ||
| 13 | #include "vk_test_device.h" | 15 | #include "vk_test_device.h" |
| 14 | #include "../src/xdxr_build.h" | 16 | #include "../src/xdxr_build.h" |
| 15 | 17 | ||
| @@ -117,9 +119,12 @@ struct Built { | |||
| 117 | std::vector<Tri> tris; | 119 | std::vector<Tri> tris; |
| 118 | }; | 120 | }; |
| 119 | 121 | ||
| 122 | // With `moved` (the same geometries with new vertex positions) the BLAS is then updated: refitted in place, or with | ||
| 123 | // `into_other` into a second buffer, in which case the untouched source is written too, as <name>_source. | ||
| 120 | int build_blas(vktest::Device& gpu, XdxrBuilder& builder, const std::string& dir, const std::string& name, | 124 | int build_blas(vktest::Device& gpu, XdxrBuilder& builder, const std::string& dir, const std::string& name, |
| 121 | const std::vector<Geometry>& geometries, Built& built, unsigned rays = 0) { | 125 | const std::vector<Geometry>& geometries, Built& built, unsigned rays = 0, |
| 122 | std::vector<Buffer> keep; | 126 | const std::vector<Geometry>* moved = nullptr, bool into_other = false) { |
| 127 | std::vector<Buffer> keep, vertex_buffers; | ||
| 123 | std::vector<XdxrTriangles> descs; | 128 | std::vector<XdxrTriangles> descs; |
| 124 | std::uint32_t total = 0; | 129 | std::uint32_t total = 0; |
| 125 | for (std::size_t g = 0; g < geometries.size(); ++g) { | 130 | for (std::size_t g = 0; g < geometries.size(); ++g) { |
| @@ -134,6 +139,7 @@ int build_blas(vktest::Device& gpu, XdxrBuilder& builder, const std::string& dir | |||
| 134 | d.triangle_count = geo.triangle_count; | 139 | d.triangle_count = geo.triangle_count; |
| 135 | d.flags = 1; | 140 | d.flags = 1; |
| 136 | keep.push_back(v); | 141 | keep.push_back(v); |
| 142 | vertex_buffers.push_back(v); | ||
| 137 | if (!geo.indices.empty()) { | 143 | if (!geo.indices.empty()) { |
| 138 | Buffer ib = make(gpu, geo.indices.size() * 4); | 144 | Buffer ib = make(gpu, geo.indices.size() * 4); |
| 139 | EXPECT(ib.buffer); | 145 | EXPECT(ib.buffer); |
| @@ -170,13 +176,41 @@ int build_blas(vktest::Device& gpu, XdxrBuilder& builder, const std::string& dir | |||
| 170 | return recorded; | 176 | return recorded; |
| 171 | })); | 177 | })); |
| 172 | built.address = base; | 178 | built.address = base; |
| 173 | const auto* bytes = static_cast<const char*>(dst.map) + (base - dst.address); | 179 | auto dump = [&](const std::string& case_name, const Buffer& buffer, std::uint64_t at, const std::vector<Tri>& tris) { |
| 174 | EXPECT(write_file(dir + "/" + name + ".bin", bytes, layout.size)); | 180 | const auto* bytes = static_cast<const char*>(buffer.map) + (at - buffer.address); |
| 175 | const std::string json = "{\"kind\": \"blas\", \"address\": " + std::to_string(base) + | 181 | const std::string json = "{\"kind\": \"blas\", \"address\": " + std::to_string(at) + |
| 176 | (rays ? ", \"rays\": " + std::to_string(rays) : std::string()) + | 182 | (rays ? ", \"rays\": " + std::to_string(rays) : std::string()) + |
| 177 | ", \"triangles\": " + tris_json(built.tris) + "}\n"; | 183 | ", \"triangles\": " + tris_json(tris) + "}\n"; |
| 178 | EXPECT(write_file(dir + "/" + name + ".json", json.data(), json.size())); | 184 | return write_file(dir + "/" + case_name + ".bin", bytes, layout.size) && |
| 179 | std::printf("%s: %u triangles, %u bytes, %u nodes\n", name.c_str(), total, layout.size, layout.nodes); | 185 | write_file(dir + "/" + case_name + ".json", json.data(), json.size()); |
| 186 | }; | ||
| 187 | if (!moved) { | ||
| 188 | EXPECT(dump(name, dst, base, built.tris)); | ||
| 189 | std::printf("%s: %u triangles, %u bytes, %u nodes\n", name.c_str(), total, layout.size, layout.nodes); | ||
| 190 | return 0; | ||
| 191 | } | ||
| 192 | // the update: new positions in the same vertex buffers, then a refit of the structure just built | ||
| 193 | EXPECT(moved->size() == geometries.size()); | ||
| 194 | std::vector<Tri> moved_tris; | ||
| 195 | for (std::size_t g = 0; g < moved->size(); ++g) { | ||
| 196 | EXPECT((*moved)[g].vertex_data.size() == geometries[g].vertex_data.size()); | ||
| 197 | std::memcpy(vertex_buffers[g].map, (*moved)[g].vertex_data.data(), (*moved)[g].vertex_data.size() * 4); | ||
| 198 | expand((*moved)[g], std::uint32_t(g), moved_tris); | ||
| 199 | } | ||
| 200 | Buffer other = into_other ? make(gpu, layout.size + 256) : Buffer{}; | ||
| 201 | const std::uint64_t target = into_other ? (other.address + 255) & ~std::uint64_t(255) : base; | ||
| 202 | EXPECT(!into_other || other.buffer); | ||
| 203 | EXPECT(gpu.run([&](VkCommandBuffer cb) { | ||
| 204 | recorded = builder.record_blas(cb, layout, descs, target, scratch.address, base); | ||
| 205 | barrier_to_host(gpu, cb); | ||
| 206 | return recorded; | ||
| 207 | })); | ||
| 208 | if (into_other) EXPECT(dump(name + "_source", dst, base, built.tris)); // a refit must not touch its source | ||
| 209 | EXPECT(dump(name, into_other ? other : dst, target, moved_tris)); | ||
| 210 | built.tris = moved_tris; | ||
| 211 | built.address = target; | ||
| 212 | std::printf("%s: %u triangles refitted %s, %u bytes\n", name.c_str(), total, | ||
| 213 | into_other ? "into another buffer" : "in place", layout.size); | ||
| 180 | return 0; | 214 | return 0; |
| 181 | } | 215 | } |
| 182 | 216 | ||
| @@ -234,8 +268,17 @@ int main(int argc, char** argv) { | |||
| 234 | const double ms = std::chrono::duration<double, std::milli>(std::chrono::steady_clock::now() - t0).count(); | 268 | const double ms = std::chrono::duration<double, std::milli>(std::chrono::steady_clock::now() - t0).count(); |
| 235 | if (rep) best = std::min(best, ms); | 269 | if (rep) best = std::min(best, ms); |
| 236 | } | 270 | } |
| 237 | std::printf("%u triangles: %.2f ms (best of 3), result %u bytes, scratch %llu bytes, sort size %u\n", n, best, | 271 | double refit = 1e30; // an update of the structure just built, in place |
| 238 | layout.size, static_cast<unsigned long long>(layout.scratch), layout.sort_size); | 272 | for (int rep = 0; rep < 4; ++rep) { |
| 273 | const auto t0 = std::chrono::steady_clock::now(); | ||
| 274 | EXPECT(gpu.run([&](VkCommandBuffer cb) { | ||
| 275 | return builder.record_blas(cb, layout, {d}, dst.address, scratch.address, dst.address); | ||
| 276 | })); | ||
| 277 | const double ms = std::chrono::duration<double, std::milli>(std::chrono::steady_clock::now() - t0).count(); | ||
| 278 | if (rep) refit = std::min(refit, ms); | ||
| 279 | } | ||
| 280 | std::printf("%u triangles: %.2f ms (best of 3), refit %.2f ms, result %u bytes, scratch %llu bytes, sort size %u\n", | ||
| 281 | n, best, refit, layout.size, static_cast<unsigned long long>(layout.scratch), layout.sort_size); | ||
| 239 | return 0; | 282 | return 0; |
| 240 | } | 283 | } |
| 241 | 284 | ||
| @@ -287,10 +330,33 @@ int main(int argc, char** argv) { | |||
| 287 | b.vertex_data[3 * 3 * 7] = std::nanf(""); // triangle 7 of geometry 1: inactive | 330 | b.vertex_data[3 * 3 * 7] = std::nanf(""); // triangle 7 of geometry 1: inactive |
| 288 | if (build_blas(gpu, builder, dir, "blas_two_geometries", {a, b}, multi)) return 1; | 331 | if (build_blas(gpu, builder, dir, "blas_two_geometries", {a, b}, multi)) return 1; |
| 289 | if (build_blas(gpu, builder, dir, "blas_empty", {}, empty)) return 1; | 332 | if (build_blas(gpu, builder, dir, "blas_empty", {}, empty)) return 1; |
| 290 | // three radix-sort tiles of 2048, the last one partial (fewer rays: the reference's brute force is slow) | 333 | // many radix-sort tiles (RADIX_TILE elements each), the last one partial (fewer rays: the brute force is slow) |
| 291 | Built tiles; | 334 | Built tiles; |
| 292 | if (build_blas(gpu, builder, dir, "blas_three_sort_tiles", {soup(5000)}, tiles, 200)) return 1; | 335 | if (build_blas(gpu, builder, dir, "blas_three_sort_tiles", {soup(5000)}, tiles, 200)) return 1; |
| 293 | 336 | ||
| 337 | // Updates. Every triangle moves (its own offset, and a stretch), so each box changes; the tree is kept. | ||
| 338 | auto move = [&](Geometry g, float amount) { | ||
| 339 | std::uniform_real_distribution<float> d(-amount, amount); | ||
| 340 | const std::uint32_t floats = g.stride / 4; | ||
| 341 | for (std::size_t v = 0; v + 2 < g.vertex_data.size(); v += floats) { | ||
| 342 | const float dx = d(rng), dy = d(rng); | ||
| 343 | g.vertex_data[v] = g.vertex_data[v] * 1.25f + dx; | ||
| 344 | g.vertex_data[v + 1] = g.vertex_data[v + 1] * 0.8f + dy; | ||
| 345 | if (!g.xy) g.vertex_data[v + 2] += d(rng); | ||
| 346 | } | ||
| 347 | return g; | ||
| 348 | }; | ||
| 349 | { | ||
| 350 | Built refitted; | ||
| 351 | const Geometry big = soup(3000); // the radix-sort path | ||
| 352 | const std::vector<Geometry> after = {move(big, 1.5f)}; | ||
| 353 | if (build_blas(gpu, builder, dir, "blas_refit_in_place", {big}, refitted, 300, &after)) return 1; | ||
| 354 | Built copied; | ||
| 355 | const Geometry g = grid(12, 4, false); // R32 indices, stride 16; the small-sort path | ||
| 356 | const std::vector<Geometry> after_grid = {move(g, 0.3f)}; | ||
| 357 | if (build_blas(gpu, builder, dir, "blas_refit_into_other", {g}, copied, 0, &after_grid, true)) return 1; | ||
| 358 | } | ||
| 359 | |||
| 294 | // TLAS: instances over blas_random and blas_grid_u16_stride16. An instance names its BLAS by a 40-bit address | 360 | // TLAS: instances over blas_random and blas_grid_u16_stride16. An instance names its BLAS by a 40-bit address |
| 295 | // (256-byte units in 32 bits), as on the console; device addresses can be wider (llvmpipe's are host pointers). | 361 | // (256-byte units in 32 bits), as on the console; device addresses can be wider (llvmpipe's are host pointers). |
| 296 | // The instances hold application-style addresses, device address - bias, as the layer's address window does. | 362 | // The instances hold application-style addresses, device address - bias, as the layer's address window does. |
| @@ -338,6 +404,95 @@ int main(int argc, char** argv) { | |||
| 338 | } | 404 | } |
| 339 | json += "]}\n"; | 405 | json += "]}\n"; |
| 340 | EXPECT(write_file(dir + "/tlas.json", json.data(), json.size())); | 406 | EXPECT(write_file(dir + "/tlas.json", json.data(), json.size())); |
| 407 | |||
| 408 | // The TLAS updated in place: every instance moves and turns; the masked and the BLAS-less ones stay so. | ||
| 409 | Inst moved_insts[sizeof insts / sizeof insts[0]]; | ||
| 410 | std::memcpy(moved_insts, insts, sizeof insts); | ||
| 411 | const float c2 = std::cos(1.9f), s2 = std::sin(1.9f); | ||
| 412 | const float turned[12] = {c2, 0, s2, 4, 0, 1, 0, -3, -s2, 0, c2, 2}; | ||
| 413 | std::memcpy(moved_insts[0].m, turned, sizeof turned); | ||
| 414 | moved_insts[1].m[3] -= 7; | ||
| 415 | moved_insts[1].m[7] += 5; | ||
| 416 | moved_insts[2].m[11] -= 4; | ||
| 417 | for (std::uint32_t i = 0; i < count; ++i) std::memcpy(static_cast<char*>(descs.map) + 64 * i, moved_insts[i].m, 48); | ||
| 418 | EXPECT(gpu.run([&](VkCommandBuffer cb) { | ||
| 419 | recorded = builder.record_tlas(cb, layout, descs.address, base, scratch.address, bias, base); | ||
| 420 | barrier_to_host(gpu, cb); | ||
| 421 | return recorded; | ||
| 422 | })); | ||
| 423 | EXPECT(write_file(dir + "/tlas_refit.bin", static_cast<const char*>(dst.map) + (base - dst.address), layout.size)); | ||
| 424 | std::string json2 = "{\"kind\": \"tlas\", \"address\": " + std::to_string(base) + ", \"bias\": " + | ||
| 425 | std::to_string(bias) + ", \"blas\": [\"blas_random\", \"blas_grid_u16_stride16\"], \"instances\": ["; | ||
| 426 | for (std::uint32_t i = 0; i < count; ++i) { | ||
| 427 | json2 += i ? ", {" : "{"; | ||
| 428 | json2 += "\"transform\": ["; | ||
| 429 | for (int k = 0; k < 12; ++k) json2 += (k ? ", " : "") + num(moved_insts[i].m[k]); | ||
| 430 | json2 += "], \"mask\": " + std::to_string(moved_insts[i].id_mask >> 24) + ", \"blas\": " + | ||
| 431 | std::to_string(moved_insts[i].which) + "}"; | ||
| 432 | } | ||
| 433 | json2 += "]}\n"; | ||
| 434 | EXPECT(write_file(dir + "/tlas_refit.json", json2.data(), json2.size())); | ||
| 435 | |||
| 436 | // CopyRaytracingAccelerationStructure: a clone of blas_random, its COMPACTED_SIZE (postbuild), a compaction into | ||
| 437 | // a buffer of exactly that size, and a clone of the refitted TLAS. The copies are position-independent. | ||
| 438 | { | ||
| 439 | XdxrLayout blas_layout; | ||
| 440 | EXPECT(blas_layout.compute(1000, false)); | ||
| 441 | Buffer clone = make(gpu, blas_layout.size + 256), info = make(gpu, 16); | ||
| 442 | EXPECT(clone.buffer && info.buffer); | ||
| 443 | const std::uint64_t clone_at = (clone.address + 255) & ~std::uint64_t(255); | ||
| 444 | std::memset(info.map, 0xab, 16); | ||
| 445 | EXPECT(gpu.run([&](VkCommandBuffer cb) { | ||
| 446 | const bool ok = builder.record_copy(cb, random.address, clone_at, blas_layout.size) && | ||
| 447 | builder.record_postbuild(cb, random.address, info.address) && | ||
| 448 | builder.record_postbuild(cb, clone_at, info.address + 8); | ||
| 449 | barrier_to_host(gpu, cb); | ||
| 450 | return ok; | ||
| 451 | })); | ||
| 452 | std::uint64_t compacted = 0, clone_size = 0; | ||
| 453 | std::memcpy(&compacted, info.map, 8); | ||
| 454 | std::memcpy(&clone_size, static_cast<char*>(info.map) + 8, 8); | ||
| 455 | EXPECT(compacted == blas_layout.size); // a build is exactly its layout's size | ||
| 456 | EXPECT(clone_size == compacted); | ||
| 457 | auto dump_blas = [&](const std::string& name, const Buffer& b, std::uint64_t at, std::size_t bytes) { | ||
| 458 | const std::string j = "{\"kind\": \"blas\", \"address\": " + std::to_string(at) + | ||
| 459 | ", \"triangles\": " + tris_json(random.tris) + "}\n"; | ||
| 460 | return write_file(dir + "/" + name + ".bin", static_cast<const char*>(b.map) + (at - b.address), bytes) && | ||
| 461 | write_file(dir + "/" + name + ".json", j.data(), j.size()); | ||
| 462 | }; | ||
| 463 | EXPECT(dump_blas("blas_clone", clone, clone_at, blas_layout.size)); | ||
| 464 | // COMPACT into exactly the compacted size; a guard word after it must survive | ||
| 465 | Buffer packed = make(gpu, std::size_t(compacted) + 256 + 4); | ||
| 466 | EXPECT(packed.buffer); | ||
| 467 | const std::uint64_t packed_at = (packed.address + 255) & ~std::uint64_t(255); | ||
| 468 | const std::uint32_t guard = 0x600dc0deu; | ||
| 469 | std::memcpy(static_cast<char*>(packed.map) + (packed_at - packed.address) + compacted, &guard, 4); | ||
| 470 | EXPECT(gpu.run([&](VkCommandBuffer cb) { | ||
| 471 | const bool ok = builder.record_copy(cb, clone_at, packed_at, compacted + 4); // more room than needed | ||
| 472 | barrier_to_host(gpu, cb); | ||
| 473 | return ok; | ||
| 474 | })); | ||
| 475 | std::uint32_t after = 0; | ||
| 476 | std::memcpy(&after, static_cast<char*>(packed.map) + (packed_at - packed.address) + compacted, 4); | ||
| 477 | EXPECT(after == guard); // the copy stops at the source's own size | ||
| 478 | EXPECT(dump_blas("blas_compacted", packed, packed_at, std::size_t(compacted))); | ||
| 479 | |||
| 480 | Buffer tclone = make(gpu, layout.size + 256); | ||
| 481 | EXPECT(tclone.buffer); | ||
| 482 | const std::uint64_t tclone_at = (tclone.address + 255) & ~std::uint64_t(255); | ||
| 483 | EXPECT(gpu.run([&](VkCommandBuffer cb) { | ||
| 484 | const bool ok = builder.record_copy(cb, base, tclone_at, layout.size); | ||
| 485 | barrier_to_host(gpu, cb); | ||
| 486 | return ok; | ||
| 487 | })); | ||
| 488 | EXPECT(write_file(dir + "/tlas_refit_clone.bin", static_cast<const char*>(tclone.map) + (tclone_at - tclone.address), | ||
| 489 | layout.size)); | ||
| 490 | std::string json3 = json2; | ||
| 491 | json3.replace(json3.find(std::to_string(base)), std::to_string(base).size(), std::to_string(tclone_at)); | ||
| 492 | EXPECT(write_file(dir + "/tlas_refit_clone.json", json3.data(), json3.size())); | ||
| 493 | std::printf("copies: blas_clone, blas_compacted (%llu bytes), tlas_refit_clone\n", | ||
| 494 | static_cast<unsigned long long>(compacted)); | ||
| 495 | } | ||
| 341 | std::printf("tlas: %u instances, %u bytes\nvk_xdxr_build_test: built every case\n", count, layout.size); | 496 | std::printf("tlas: %u instances, %u bytes\nvk_xdxr_build_test: built every case\n", count, layout.size); |
| 342 | return 0; | 497 | return 0; |
| 343 | } | 498 | } |
diff --git a/runtime/test/xgameruntime_test.cpp b/runtime/test/xgameruntime_test.cpp index ac36f40d9..8f5057662 100644 --- a/runtime/test/xgameruntime_test.cpp +++ b/runtime/test/xgameruntime_test.cpp | |||
| @@ -51,8 +51,36 @@ using AsyncCompleteFn = void(__stdcall*)(XAsyncBlock*, HRESULT, size_t); | |||
| 51 | using AsyncResultSizeFn = HRESULT(__stdcall*)(XAsyncBlock*, size_t*); | 51 | using AsyncResultSizeFn = HRESULT(__stdcall*)(XAsyncBlock*, size_t*); |
| 52 | using AsyncResultFn = HRESULT(__stdcall*)(XAsyncBlock*, const void*, size_t, void*, size_t*); | 52 | using AsyncResultFn = HRESULT(__stdcall*)(XAsyncBlock*, const void*, size_t, void*, size_t*); |
| 53 | 53 | ||
| 54 | struct XVersion { | ||
| 55 | union { | ||
| 56 | struct { | ||
| 57 | uint16_t major; | ||
| 58 | uint16_t minor; | ||
| 59 | uint16_t build; | ||
| 60 | uint16_t revision; | ||
| 61 | }; | ||
| 62 | uint64_t Value; | ||
| 63 | }; | ||
| 64 | }; | ||
| 65 | static_assert(sizeof(XVersion) == 8, "XVersion must be 8 bytes per GDK spec"); | ||
| 66 | |||
| 67 | struct XSystemAnalyticsInfo { | ||
| 68 | XVersion osVersion; | ||
| 69 | XVersion hostingOsVersion; | ||
| 70 | char family[64]; | ||
| 71 | char form[64]; | ||
| 72 | }; | ||
| 73 | static_assert(sizeof(XSystemAnalyticsInfo) == 144, "XSystemAnalyticsInfo must be 144 bytes per GDK spec"); | ||
| 74 | |||
| 75 | using AnalyticsInfoFn = XSystemAnalyticsInfo(__stdcall*)(); | ||
| 76 | using PackageIdentifierFn = HRESULT(__stdcall*)(size_t, char*); | ||
| 77 | using PackageMountPathFn = HRESULT(__stdcall*)(void*, size_t, char*); | ||
| 78 | using PackagedProcessFn = bool(__stdcall*)(); | ||
| 79 | |||
| 54 | const char* const kNames[] = { | 80 | const char* const kNames[] = { |
| 55 | "XGameRuntimeInitialize", "XGameRuntimeUninitialize", "XSystemGetDeviceType", "XSystemGetConsoleId", | 81 | "XGameRuntimeInitialize", "XGameRuntimeUninitialize", "XSystemGetDeviceType", "XSystemGetConsoleId", |
| 82 | "XSystemGetAnalyticsInfo", "XPackageGetCurrentProcessPackageIdentifier", "XPackageGetMountPath", | ||
| 83 | "XPackageIsPackagedProcess", | ||
| 56 | "XTaskQueueCreate", "XTaskQueueCreateComposite", "XTaskQueueGetPort", "XTaskQueueDuplicateHandle", | 84 | "XTaskQueueCreate", "XTaskQueueCreateComposite", "XTaskQueueGetPort", "XTaskQueueDuplicateHandle", |
| 57 | "XTaskQueueCloseHandle", "XTaskQueueTerminate", "XTaskQueueDispatch", "XTaskQueueSubmitCallback", | 85 | "XTaskQueueCloseHandle", "XTaskQueueTerminate", "XTaskQueueDispatch", "XTaskQueueSubmitCallback", |
| 58 | "XTaskQueueSubmitDelayedCallback", "XTaskQueueRegisterWaiter", "XTaskQueueUnregisterWaiter", | 86 | "XTaskQueueSubmitDelayedCallback", "XTaskQueueRegisterWaiter", "XTaskQueueUnregisterWaiter", |
| @@ -182,6 +210,89 @@ void check_run_time_load() { | |||
| 182 | void* out = reinterpret_cast<void*>(1); | 210 | void* out = reinterpret_cast<void*>(1); |
| 183 | check(query(&some_class, some_class, &out) == static_cast<HRESULT>(0x80070032) && out == nullptr, | 211 | check(query(&some_class, some_class, &out) == static_cast<HRESULT>(0x80070032) && out == nullptr, |
| 184 | "QueryApiImpl refuses a class it doesn't provide yet (HRESULT 0x80070032) and clears the out pointer"); | 212 | "QueryApiImpl refuses a class it doesn't provide yet (HRESULT 0x80070032) and clears the out pointer"); |
| 213 | |||
| 214 | // XThreadingImpl and XErrorImpl, driven the way xgameruntime.lib's thunks in the package's DLLs do: QueryApiImpl | ||
| 215 | // with the class id as both ids, one vtable slot with `this` first, then Release (slot 2). | ||
| 216 | const GUID threading = {0x073b7dcb, 0x1fcf, 0x4030, {0x94, 0xbe, 0xe3, 0xc9, 0xeb, 0x62, 0x34, 0x28}}; | ||
| 217 | const GUID error_cls = {0x8ca467f7, 0x22e8, 0x4096, {0x84, 0x56, 0xbb, 0x8a, 0xa1, 0x3f, 0x79, 0xd8}}; | ||
| 218 | using Fn = void*; | ||
| 219 | auto slot = [](void* obj, int index) { return (*static_cast<Fn* const*>(obj))[index]; }; | ||
| 220 | auto release = [&](void* obj) { reinterpret_cast<ULONG(STDMETHODCALLTYPE*)(void*)>(slot(obj, 2))(obj); }; | ||
| 221 | auto get = [&](const GUID& cls) { | ||
| 222 | void* p = nullptr; | ||
| 223 | return query(&cls, cls, &p) == S_OK ? p : nullptr; | ||
| 224 | }; | ||
| 225 | void* t = get(threading); | ||
| 226 | check(t != nullptr, "QueryApiImpl hands out XThreadingImpl for its class id"); | ||
| 227 | if (t) { | ||
| 228 | void* again = get(threading); | ||
| 229 | check(again == t, "XThreadingImpl is one process-wide object"); | ||
| 230 | release(again); | ||
| 231 | XTaskQueueHandle queue = nullptr; | ||
| 232 | using Create = HRESULT(STDMETHODCALLTYPE*)(void*, XTaskQueueDispatchMode, XTaskQueueDispatchMode, | ||
| 233 | XTaskQueueHandle*); | ||
| 234 | check(reinterpret_cast<Create>(slot(t, 12))(t, XTaskQueueDispatchMode::Manual, XTaskQueueDispatchMode::Manual, | ||
| 235 | &queue) == S_OK && queue, | ||
| 236 | "slot 12 is XTaskQueueCreate"); | ||
| 237 | static std::atomic<int> s_ran{0}; | ||
| 238 | using Submit = HRESULT(STDMETHODCALLTYPE*)(void*, XTaskQueueHandle, XTaskQueuePort, void*, | ||
| 239 | XTaskQueueCallback*); | ||
| 240 | XTaskQueueCallback* cb = [](void* ctx, bool canceled) { | ||
| 241 | if (!canceled) static_cast<std::atomic<int>*>(ctx)->fetch_add(1); | ||
| 242 | }; | ||
| 243 | check(reinterpret_cast<Submit>(slot(t, 18))(t, queue, XTaskQueuePort::Work, &s_ran, cb) == S_OK, | ||
| 244 | "slot 18 is XTaskQueueSubmitCallback"); | ||
| 245 | using Dispatch = bool(STDMETHODCALLTYPE*)(void*, XTaskQueueHandle, XTaskQueuePort, uint32_t); | ||
| 246 | check(reinterpret_cast<Dispatch>(slot(t, 16))(t, queue, XTaskQueuePort::Work, 0) && s_ran.load() == 1, | ||
| 247 | "slot 16 is XTaskQueueDispatch: the callback ran on the work port"); | ||
| 248 | XTaskQueueHandle dup = nullptr; | ||
| 249 | using Dup = HRESULT(STDMETHODCALLTYPE*)(void*, XTaskQueueHandle, XTaskQueueHandle*); | ||
| 250 | check(reinterpret_cast<Dup>(slot(t, 15))(t, queue, &dup) == S_OK && dup, | ||
| 251 | "slot 15 is XTaskQueueDuplicateHandle"); | ||
| 252 | using Close = void(STDMETHODCALLTYPE*)(void*, XTaskQueueHandle); | ||
| 253 | reinterpret_cast<Close>(slot(t, 17))(t, dup); | ||
| 254 | reinterpret_cast<Close>(slot(t, 17))(t, queue); | ||
| 255 | using SetSensitive = HRESULT(STDMETHODCALLTYPE*)(void*, bool); | ||
| 256 | using IsSensitive = bool(STDMETHODCALLTYPE*)(void*); | ||
| 257 | check(reinterpret_cast<SetSensitive>(slot(t, 27))(t, true) == S_OK && | ||
| 258 | reinterpret_cast<IsSensitive>(slot(t, 30))(t) && | ||
| 259 | reinterpret_cast<SetSensitive>(slot(t, 27))(t, false) == S_OK && | ||
| 260 | !reinterpret_cast<IsSensitive>(slot(t, 30))(t), | ||
| 261 | "slots 27 and 30 set and read this thread's time-sensitive flag"); | ||
| 262 | void* unk = nullptr; | ||
| 263 | const GUID iunknown = {0, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, 0x46}}; | ||
| 264 | using QI = HRESULT(STDMETHODCALLTYPE*)(void*, REFIID, void**); | ||
| 265 | check(reinterpret_cast<QI>(slot(t, 0))(t, iunknown, &unk) == S_OK && unk == t && | ||
| 266 | reinterpret_cast<QI>(slot(t, 0))(t, error_cls, &unk) == E_NOINTERFACE && !unk, | ||
| 267 | "QueryInterface answers IUnknown and the class id, not another class"); | ||
| 268 | release(t); | ||
| 269 | release(t); | ||
| 270 | } | ||
| 271 | void* e = get(error_cls); | ||
| 272 | check(e != nullptr, "QueryApiImpl hands out XErrorImpl for its class id"); | ||
| 273 | if (e) { | ||
| 274 | struct Seen { | ||
| 275 | HRESULT hr; | ||
| 276 | char msg[32]; | ||
| 277 | } seen{}; | ||
| 278 | using Callback = bool(CALLBACK*)(HRESULT, const char*, void*); | ||
| 279 | Callback on_error = [](HRESULT hr, const char* msg, void* ctx) { | ||
| 280 | auto* s = static_cast<Seen*>(ctx); | ||
| 281 | s->hr = hr; | ||
| 282 | strncpy_s(s->msg, msg ? msg : "", _TRUNCATE); | ||
| 283 | return true; | ||
| 284 | }; | ||
| 285 | using SetCallback = void(STDMETHODCALLTYPE*)(void*, Callback, void*); | ||
| 286 | using Report = void(STDMETHODCALLTYPE*)(void*, HRESULT, const char*); | ||
| 287 | reinterpret_cast<SetCallback>(slot(e, 4))(e, on_error, &seen); | ||
| 288 | reinterpret_cast<Report>(slot(e, 3))(e, E_FAIL, "offline test"); | ||
| 289 | check(seen.hr == E_FAIL && std::strcmp(seen.msg, "offline test") == 0, | ||
| 290 | "slot 3 is XErrorReport and reaches the callback slot 4 (XErrorSetCallback) set"); | ||
| 291 | reinterpret_cast<SetCallback>(slot(e, 4))(e, nullptr, nullptr); | ||
| 292 | using SetOptions = HRESULT(STDMETHODCALLTYPE*)(void*, uint32_t, uint32_t); | ||
| 293 | check(reinterpret_cast<SetOptions>(slot(e, 5))(e, 0, 0) == S_OK, "slot 5 is XErrorSetOptions"); | ||
| 294 | release(e); | ||
| 295 | } | ||
| 185 | check(uninit_api() == S_OK, "UninitializeApiImpl succeeds"); | 296 | check(uninit_api() == S_OK, "UninitializeApiImpl succeeds"); |
| 186 | 297 | ||
| 187 | HMODULE k32 = load_w(L"kernel32.dll"); | 298 | HMODULE k32 = load_w(L"kernel32.dll"); |
| @@ -229,6 +340,53 @@ int main() { | |||
| 229 | check(console_id(sizeof(id), id, &used) == S_OK && used == 39 && std::strlen(id) == 38, | 340 | check(console_id(sizeof(id), id, &used) == S_OK && used == 39 && std::strlen(id) == 38, |
| 230 | "XSystemGetConsoleId fills 39 bytes (38 characters and the terminator)"); | 341 | "XSystemGetConsoleId fills 39 bytes (38 characters and the terminator)"); |
| 231 | 342 | ||
| 343 | auto analytics_info = get<AnalyticsInfoFn>("XSystemGetAnalyticsInfo"); | ||
| 344 | XSystemAnalyticsInfo info = analytics_info(); | ||
| 345 | check(info.osVersion.major == 10 && info.osVersion.minor == 0 && info.osVersion.build == 22000 && | ||
| 346 | info.osVersion.revision == 0, | ||
| 347 | "XSystemGetAnalyticsInfo returns osVersion 10.0.22000.0"); | ||
| 348 | check(info.hostingOsVersion.major == 10 && info.hostingOsVersion.minor == 0 && | ||
| 349 | info.hostingOsVersion.build == 22000 && info.hostingOsVersion.revision == 0, | ||
| 350 | "XSystemGetAnalyticsInfo returns hostingOsVersion 10.0.22000.0"); | ||
| 351 | check(std::strcmp(info.family, "Xbox") == 0, "XSystemGetAnalyticsInfo returns family 'Xbox'"); | ||
| 352 | check(std::strcmp(info.form, "Xbox Series X") == 0, "XSystemGetAnalyticsInfo returns form 'Xbox Series X'"); | ||
| 353 | |||
| 354 | auto package_id = get<PackageIdentifierFn>("XPackageGetCurrentProcessPackageIdentifier"); | ||
| 355 | check(package_id(0, nullptr) == E_INVALIDARG, "XPackageGetCurrentProcessPackageIdentifier rejects null buffer and size 0"); | ||
| 356 | char pkg_id[64] = {}; | ||
| 357 | check(package_id(0, pkg_id) == E_INVALIDARG, "XPackageGetCurrentProcessPackageIdentifier rejects size 0 with buffer"); | ||
| 358 | check(package_id(10, nullptr) == E_INVALIDARG, "XPackageGetCurrentProcessPackageIdentifier rejects null pointer with size"); | ||
| 359 | check(package_id(16, pkg_id) == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), | ||
| 360 | "XPackageGetCurrentProcessPackageIdentifier rejects insufficient buffer"); | ||
| 361 | check(package_id(sizeof(pkg_id), pkg_id) == S_OK && std::strlen(pkg_id) == 32, | ||
| 362 | "XPackageGetCurrentProcessPackageIdentifier fills 33-byte package identifier"); | ||
| 363 | |||
| 364 | SetEnvironmentVariableA("LEONIDA_PACKAGE_ID", "CustomTestPackageId_123456789012"); | ||
| 365 | check(package_id(sizeof(pkg_id), pkg_id) == S_OK && | ||
| 366 | std::strcmp(pkg_id, "CustomTestPackageId_123456789012") == 0, | ||
| 367 | "XPackageGetCurrentProcessPackageIdentifier respects LEONIDA_PACKAGE_ID override"); | ||
| 368 | SetEnvironmentVariableA("LEONIDA_PACKAGE_ID", nullptr); | ||
| 369 | |||
| 370 | auto mount_path = get<PackageMountPathFn>("XPackageGetMountPath"); | ||
| 371 | check(mount_path(nullptr, 0, nullptr) == E_INVALIDARG, "XPackageGetMountPath rejects null buffer and size 0"); | ||
| 372 | char mnt_path[MAX_PATH] = {}; | ||
| 373 | check(mount_path(nullptr, 0, mnt_path) == E_INVALIDARG, "XPackageGetMountPath rejects size 0 with buffer"); | ||
| 374 | check(mount_path(nullptr, 10, nullptr) == E_INVALIDARG, "XPackageGetMountPath rejects null pointer with size"); | ||
| 375 | |||
| 376 | SetEnvironmentVariableA("LEONIDA_GAME_DIR", "C:\\LeonidaGameDir"); | ||
| 377 | check(mount_path(nullptr, 5, mnt_path) == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), | ||
| 378 | "XPackageGetMountPath rejects insufficient buffer"); | ||
| 379 | check(mount_path(nullptr, sizeof(mnt_path), mnt_path) == S_OK && | ||
| 380 | std::strcmp(mnt_path, "C:\\LeonidaGameDir") == 0, | ||
| 381 | "XPackageGetMountPath returns configured game directory"); | ||
| 382 | SetEnvironmentVariableA("LEONIDA_GAME_DIR", nullptr); | ||
| 383 | |||
| 384 | auto is_packaged = get<PackagedProcessFn>("XPackageIsPackagedProcess"); | ||
| 385 | check(is_packaged() == true, "XPackageIsPackagedProcess returns true by default"); | ||
| 386 | SetEnvironmentVariableA("LEONIDA_PACKAGED", "0"); | ||
| 387 | check(is_packaged() == false, "XPackageIsPackagedProcess respects LEONIDA_PACKAGED=0 override"); | ||
| 388 | SetEnvironmentVariableA("LEONIDA_PACKAGED", nullptr); | ||
| 389 | |||
| 232 | // Work on the thread pool, completions dispatched by the "game loop" on this thread. | 390 | // Work on the thread pool, completions dispatched by the "game loop" on this thread. |
| 233 | auto create = get<QueueCreateFn>("XTaskQueueCreate"); | 391 | auto create = get<QueueCreateFn>("XTaskQueueCreate"); |
| 234 | auto close = get<QueueCloseFn>("XTaskQueueCloseHandle"); | 392 | auto close = get<QueueCloseFn>("XTaskQueueCloseHandle"); |
diff --git a/runtime/test/xs_proxy_mock_test.cpp b/runtime/test/xs_proxy_mock_test.cpp index 429261e98..f115b6655 100644 --- a/runtime/test/xs_proxy_mock_test.cpp +++ b/runtime/test/xs_proxy_mock_test.cpp | |||
| @@ -70,7 +70,7 @@ namespace xs = rt::d3d12_xs; | |||
| 70 | 70 | ||
| 71 | // ---- Mocks ---- | 71 | // ---- Mocks ---- |
| 72 | 72 | ||
| 73 | enum class Kind { device, queue, fence, resource }; | 73 | enum class Kind { device, queue, fence, resource, allocator }; |
| 74 | 74 | ||
| 75 | constexpr unsigned kMockSlots = 128; | 75 | constexpr unsigned kMockSlots = 128; |
| 76 | constexpr std::uint64_t kFenceHandle = 0x1000, kResourceHandle = 0x2000; // the handles the mock device opens | 76 | constexpr std::uint64_t kFenceHandle = 0x1000, kResourceHandle = 0x2000; // the handles the mock device opens |
| @@ -84,6 +84,7 @@ struct Mock { | |||
| 84 | long refs; | 84 | long refs; |
| 85 | int device_level; // device: highest ID3D12DeviceN it answers (0 = ID3D12Device only) | 85 | int device_level; // device: highest ID3D12DeviceN it answers (0 = ID3D12Device only) |
| 86 | bool fence1; // fence: answers ID3D12Fence1; device: the fences it makes do | 86 | bool fence1; // fence: answers ID3D12Fence1; device: the fences it makes do |
| 87 | bool allocator_tag; // allocator: answers kLeonidaCommandAllocatorTag; device: the allocators it makes do | ||
| 87 | bool create_null; // device: creation returns create_result with no object | 88 | bool create_null; // device: creation returns create_result with no object |
| 88 | HRESULT create_result; // device: what creation returns (S_OK makes the object) | 89 | HRESULT create_result; // device: what creation returns (S_OK makes the object) |
| 89 | Mock* last_child; // device: the object its last creation or open made | 90 | Mock* last_child; // device: the object its last creation or open made |
| @@ -126,6 +127,9 @@ bool mock_has(const Mock* m, REFIID iid) { | |||
| 126 | case Kind::fence: | 127 | case Kind::fence: |
| 127 | return IsEqualIID(iid, __uuidof(ID3D12Fence)) || (m->fence1 && IsEqualIID(iid, __uuidof(ID3D12Fence1))); | 128 | return IsEqualIID(iid, __uuidof(ID3D12Fence)) || (m->fence1 && IsEqualIID(iid, __uuidof(ID3D12Fence1))); |
| 128 | case Kind::resource: return IsEqualIID(iid, __uuidof(ID3D12Resource)); | 129 | case Kind::resource: return IsEqualIID(iid, __uuidof(ID3D12Resource)); |
| 130 | case Kind::allocator: | ||
| 131 | return IsEqualIID(iid, __uuidof(ID3D12CommandAllocator)) || | ||
| 132 | (m->allocator_tag && IsEqualIID(iid, xs::kLeonidaCommandAllocatorTag)); | ||
| 129 | default: return false; | 133 | default: return false; |
| 130 | } | 134 | } |
| 131 | } | 135 | } |
| @@ -148,6 +152,7 @@ HRESULT mock_create(Mock* device, Kind kind, std::uint64_t riid, std::uint64_t o | |||
| 148 | if (device->create_null || FAILED(device->create_result)) return device->create_result; | 152 | if (device->create_null || FAILED(device->create_result)) return device->create_result; |
| 149 | Mock* child = new_mock(kind); | 153 | Mock* child = new_mock(kind); |
| 150 | child->fence1 = device->fence1; | 154 | child->fence1 = device->fence1; |
| 155 | child->allocator_tag = device->allocator_tag; | ||
| 151 | device->last_child = child; | 156 | device->last_child = child; |
| 152 | return mock_query(child, reinterpret_cast<const IID*>(riid), out); | 157 | return mock_query(child, reinterpret_cast<const IID*>(riid), out); |
| 153 | } | 158 | } |
| @@ -163,6 +168,7 @@ std::uint64_t mock_call(Mock* m, unsigned slot, const std::uint64_t* words) { | |||
| 163 | if (m->kind == Kind::device) { | 168 | if (m->kind == Kind::device) { |
| 164 | switch (slot) { | 169 | switch (slot) { |
| 165 | case 8: return static_cast<std::uint32_t>(mock_create(m, Kind::queue, a2, a3)); // CreateCommandQueue | 170 | case 8: return static_cast<std::uint32_t>(mock_create(m, Kind::queue, a2, a3)); // CreateCommandQueue |
| 171 | case 9: return static_cast<std::uint32_t>(mock_create(m, Kind::allocator, a2, a3)); // CreateCmdAllocator | ||
| 166 | case 75: return static_cast<std::uint32_t>(mock_create(m, Kind::queue, a3, a4)); // CreateCommandQueue1 | 172 | case 75: return static_cast<std::uint32_t>(mock_create(m, Kind::queue, a3, a4)); // CreateCommandQueue1 |
| 167 | case 36: return static_cast<std::uint32_t>(mock_create(m, Kind::fence, a3, a4)); // CreateFence | 173 | case 36: return static_cast<std::uint32_t>(mock_create(m, Kind::fence, a3, a4)); // CreateFence |
| 168 | case 32: // OpenSharedHandle | 174 | case 32: // OpenSharedHandle |
| @@ -248,10 +254,11 @@ const IID kDevice1Iid = __uuidof(ID3D12Device1); | |||
| 248 | const D3D12_COMMAND_QUEUE_DESC kQueueDesc{}; | 254 | const D3D12_COMMAND_QUEUE_DESC kQueueDesc{}; |
| 249 | 255 | ||
| 250 | // A device proxy over a new mock device. The proxy takes the mock's one reference. | 256 | // A device proxy over a new mock device. The proxy takes the mock's one reference. |
| 251 | void* make_device(Mock*& mock, int level, bool fence1) { | 257 | void* make_device(Mock*& mock, int level, bool fence1, bool allocator_tag = true) { |
| 252 | mock = new_mock(Kind::device); | 258 | mock = new_mock(Kind::device); |
| 253 | mock->device_level = level; | 259 | mock->device_level = level; |
| 254 | mock->fence1 = fence1; | 260 | mock->fence1 = fence1; |
| 261 | mock->allocator_tag = allocator_tag; | ||
| 255 | mock->refs = 1; | 262 | mock->refs = 1; |
| 256 | void* device = nullptr; | 263 | void* device = nullptr; |
| 257 | if (FAILED(xs::create_device_proxy(reinterpret_cast<ID3D12Device*>(mock), __uuidof(ID3D12Device), &device))) | 264 | if (FAILED(xs::create_device_proxy(reinterpret_cast<ID3D12Device*>(mock), __uuidof(ID3D12Device), &device))) |
| @@ -563,7 +570,85 @@ int check_alloc_failures() { | |||
| 563 | return 0; | 570 | return 0; |
| 564 | } | 571 | } |
| 565 | 572 | ||
| 566 | // ---- 6. The refused tail and the guard region ---- | 573 | // ---- 6. Command allocators (device slot 9) ---- |
| 574 | |||
| 575 | int check_allocators() { | ||
| 576 | const IID allocator_iid = __uuidof(ID3D12CommandAllocator); | ||
| 577 | // An allocator that answers Leonida's tag (its lists resolve a proxy) comes back wrapped. | ||
| 578 | { | ||
| 579 | Mock* mock = nullptr; | ||
| 580 | void* device = make_device(mock, 9, true, true); | ||
| 581 | EXPECT(device); | ||
| 582 | const unsigned long device_refs = xs::device_proxy_ref_count(device); | ||
| 583 | void* allocator = nullptr; | ||
| 584 | EXPECT(hr_of(raw(device, 9, D3D12_COMMAND_LIST_TYPE_DIRECT, word(&allocator_iid), word(&allocator))) == S_OK); | ||
| 585 | Mock* const real = mock->last_child; | ||
| 586 | EXPECT(xs::is_allocator_proxy(allocator) && word(xs::allocator_proxy_real_allocator(allocator)) == word(real)); | ||
| 587 | EXPECT(mock->args[9][0] == D3D12_COMMAND_LIST_TYPE_DIRECT && real->refs == 1); | ||
| 588 | EXPECT(xs::allocator_proxy_slot_count(allocator) == 9 && xs::device_proxy_ref_count(device) == device_refs + 1); | ||
| 589 | // Reset (slot 8) reaches the real allocator; every slot past it up to the table end is refused. | ||
| 590 | EXPECT(hr_of(raw(allocator, 8)) == S_OK && real->calls[8] == 1); | ||
| 591 | for (unsigned slot = 9; slot < xs::allocator_proxy_table_size(); ++slot) | ||
| 592 | EXPECT(hr_of(raw(allocator, slot)) == E_NOTIMPL && real->calls[slot] == 0); | ||
| 593 | // The tag and the real object stay hidden: QueryInterface answers only the modelled interfaces. | ||
| 594 | void* found = reinterpret_cast<void*>(1); | ||
| 595 | EXPECT(hr_of(raw(allocator, 0, word(&xs::kLeonidaCommandAllocatorTag), word(&found))) == E_NOINTERFACE && | ||
| 596 | !found); | ||
| 597 | EXPECT(hr_of(raw(allocator, 0, word(&allocator_iid), word(&found))) == S_OK && found == allocator); | ||
| 598 | EXPECT(release(found) == 1); | ||
| 599 | // An allocator is a pageable: MakeResident gives the real runtime the real allocator. | ||
| 600 | const std::uint64_t objects[1] = {word(allocator)}; | ||
| 601 | EXPECT(hr_of(raw(device, 34, 1, word(objects))) == S_OK && mock->array[34][0] == word(real)); | ||
| 602 | EXPECT(release(allocator) == 0 && real->refs == 0); | ||
| 603 | EXPECT(xs::device_proxy_ref_count(device) == device_refs); | ||
| 604 | // Null IID, null output, a failing or empty creation, an IID the allocator lacks. | ||
| 605 | void* out = reinterpret_cast<void*>(1); | ||
| 606 | EXPECT(hr_of(raw(device, 9, 0, 0, word(&out))) == E_POINTER && !out); | ||
| 607 | EXPECT(hr_of(raw(device, 9, 0, word(&allocator_iid), 0)) == S_FALSE); // the device's own answer | ||
| 608 | mock->create_result = E_OUTOFMEMORY; | ||
| 609 | out = reinterpret_cast<void*>(1); | ||
| 610 | EXPECT(hr_of(raw(device, 9, 0, word(&allocator_iid), word(&out))) == E_OUTOFMEMORY && !out); | ||
| 611 | mock->create_result = S_OK; | ||
| 612 | mock->create_null = true; | ||
| 613 | out = reinterpret_cast<void*>(1); | ||
| 614 | EXPECT(hr_of(raw(device, 9, 0, word(&allocator_iid), word(&out))) == E_FAIL && !out); | ||
| 615 | mock->create_null = false; | ||
| 616 | const IID fence_iid = __uuidof(ID3D12Fence); | ||
| 617 | out = reinterpret_cast<void*>(1); | ||
| 618 | EXPECT(hr_of(raw(device, 9, 0, word(&fence_iid), word(&out))) == E_NOINTERFACE && !out); | ||
| 619 | EXPECT(mock->last_child->refs == 0); | ||
| 620 | // A refused allocation for the proxy: E_OUTOFMEMORY, and the real allocator is released. | ||
| 621 | g_fail_news = 1; | ||
| 622 | out = reinterpret_cast<void*>(1); | ||
| 623 | const HRESULT starved = hr_of(raw(device, 9, 0, word(&allocator_iid), word(&out))); | ||
| 624 | g_fail_news = 0; | ||
| 625 | EXPECT(starved == E_OUTOFMEMORY && !out && mock->last_child->refs == 0); | ||
| 626 | EXPECT(xs::device_proxy_ref_count(device) == device_refs); | ||
| 627 | EXPECT(release(device) == 0 && mock->refs == 0); | ||
| 628 | } | ||
| 629 | // An allocator without the tag (a PC runtime allocator, whose lists could not resolve a proxy) comes back as it | ||
| 630 | // is, as the interface asked for. | ||
| 631 | { | ||
| 632 | Mock* mock = nullptr; | ||
| 633 | void* device = make_device(mock, 9, true, false); | ||
| 634 | EXPECT(device); | ||
| 635 | void* allocator = nullptr; | ||
| 636 | EXPECT(hr_of(raw(device, 9, 0, word(&allocator_iid), word(&allocator))) == S_OK); | ||
| 637 | EXPECT(allocator == mock->last_child && !xs::is_allocator_proxy(allocator) && mock->last_child->refs == 1); | ||
| 638 | Mock* const real = mock->last_child; | ||
| 639 | EXPECT(release(allocator) == 0 && real->refs == 0); | ||
| 640 | const IID fence_iid = __uuidof(ID3D12Fence); | ||
| 641 | void* out = reinterpret_cast<void*>(1); | ||
| 642 | EXPECT(hr_of(raw(device, 9, 0, word(&fence_iid), word(&out))) == E_NOINTERFACE && !out); | ||
| 643 | EXPECT(mock->last_child->refs == 0); | ||
| 644 | EXPECT(release(device) == 0 && mock->refs == 0); | ||
| 645 | } | ||
| 646 | std::printf("%s: allocators answering Leonida's tag are wrapped (Reset forwarded, tail refused, residency " | ||
| 647 | "unwrapped, references balanced); others come back unwrapped; failures leave no reference\n", g_label); | ||
| 648 | return 0; | ||
| 649 | } | ||
| 650 | |||
| 651 | // ---- 7. The refused tail and the guard region ---- | ||
| 567 | 652 | ||
| 568 | int check_tail(bool want_guarded) { | 653 | int check_tail(bool want_guarded) { |
| 569 | Mock* mock = nullptr; | 654 | Mock* mock = nullptr; |
| @@ -686,7 +771,7 @@ int main(int argc, char** argv) { | |||
| 686 | if (argc == 2) return run_fault_mode(argv[1]); | 771 | if (argc == 2) return run_fault_mode(argv[1]); |
| 687 | if (argc != 1) return 2; | 772 | if (argc != 1) return 2; |
| 688 | if (check_tail(true) || check_levels() || check_fence1() || check_create_failures() || check_open_shared() || | 773 | if (check_tail(true) || check_levels() || check_fence1() || check_create_failures() || check_open_shared() || |
| 689 | check_alloc_failures()) | 774 | check_alloc_failures() || check_allocators()) |
| 690 | return 1; | 775 | return 1; |
| 691 | std::printf("xs_proxy_mock_test: PASS (%d allocations refused on purpose)\n", g_failed_news); | 776 | std::printf("xs_proxy_mock_test: PASS (%d allocations refused on purpose)\n", g_failed_news); |
| 692 | return 0; | 777 | return 0; |