Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
da047d5
runtime: opt-in immediate slot 57 mesh for indirect DispatchMesh
cursoragent Nov 28, 2026
aaf9c8a
runtime: limit derived mesh forwarding to slot 57 profile misses
cursoragent Nov 28, 2026
71a1e47
runtime: compile derived slot 57 meshes without the native frontend
cursoragent Nov 29, 2026
24b5b53
runtime: count every DispatchMesh derive refusal by reason
cursoragent Nov 29, 2026
9edb8c9
runtime: match mesh derive reasons by text, not address
cursoragent Nov 29, 2026
92ca511
runtime: bind one derived mesh constant and reuse slot 55 bases
cursoragent Nov 29, 2026
577e5db
runtime: name unknown slot 55 tags and record root parameter types
cursoragent Nov 29, 2026
44ccc91
runtime: bind a derived mesh only when the program matches
cursoragent Nov 29, 2026
6c93fc6
runtime: include mesh stage helpers in the device object
cursoragent Nov 29, 2026
46be843
tests: give the five-parameter derived root distinct registers
cursoragent Nov 29, 2026
0f69e4e
runtime: prove wave64 before a derived mesh is forwarded
cursoragent Nov 29, 2026
45f9045
Merge origin/main into derived-mesh slice (slot 57)
SimSalabimse Nov 29, 2026
35b3ca2
startup: copy measured slot 57 spans when shader dump is enabled
cursoragent Nov 30, 2026
eefab5d
startup: opt-in slot 57 mesh bounds from the record allocation
cursoragent Nov 30, 2026
0d739d1
startup: carry decoded depth and stencil for derived slot 57 meshes
cursoragent Nov 30, 2026
8905a42
startup: accept the derived mesh record multiply chain
cursoragent Nov 30, 2026
452d946
startup: record a raw buffer load as the derived mesh record word
cursoragent Nov 30, 2026
efc11e8
startup: include the mesh exchange header at file scope
cursoragent Nov 30, 2026
1fa9864
Merge upstream/main into derived-mesh slice (slot 57)
SimSalabimse Nov 30, 2026
e8d65c1
startup: accept one to eight color targets on a derived mesh
cursoragent Nov 30, 2026
db4eb57
runtime: pass the full state block A to the mesh blend reader
SimSalabimse Nov 30, 2026
ec5d89b
startup: accept a depth-only derived mesh when depth or stencil is used
cursoragent Nov 30, 2026
6aeeff0
startup: add an opt-in unproven stride for the derived record group
cursoragent Nov 30, 2026
291adf0
mesh: lower v_sub_nc_u32 and sibling integer ALU ops
cursoragent Nov 30, 2026
ca648f3
Merge remote-tracking branch 'r0y00/main' into local/mesh57-bounds
cursoragent Nov 30, 2026
c4ca321
Merge branch 'cursor/mesh-ei-first-slice' into local/mesh57-bounds
cursoragent Nov 30, 2026
949add3
mesh: refuse an out-of-range derived root parameter
cursoragent Nov 30, 2026
83684cf
mesh: lower a scalar readfirstlane on a whole wave
cursoragent Dec 1, 2026
9fd871c
Merge remote-tracking branch 'r0y00/main' into local/mesh57-bounds
cursoragent Dec 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2000,6 +2000,82 @@ foreach(backend IN ITEMS warp hardware)
set_tests_properties(startup_mesh_xmem_writer_${backend} PROPERTIES TIMEOUT 60 SKIP_RETURN_CODE 77
ENVIRONMENT "X2W_MESH86_FIXTURE_XMEM=$<TARGET_FILE:xmem_shim>")
endforeach()
add_executable(mesh57_derive_alloc_check tests/mesh57_derive_alloc_check.cpp src/gfx1013_isa.cpp)
target_include_directories(mesh57_derive_alloc_check PRIVATE src src/startup_stubs)
target_compile_features(mesh57_derive_alloc_check PRIVATE cxx_std_17)
add_test(NAME mesh57_derive_alloc COMMAND mesh57_derive_alloc_check)

add_executable(mesh57_record_bounds_check tests/mesh57_record_bounds_check.cpp src/gfx1013_isa.cpp)
target_include_directories(mesh57_record_bounds_check PRIVATE src src/startup_stubs)
target_compile_features(mesh57_record_bounds_check PRIVATE cxx_std_17)
add_test(NAME mesh57_record_bounds COMMAND mesh57_record_bounds_check)

add_executable(mesh57_group_exchange_check tests/mesh57_group_exchange_check.cpp)
target_include_directories(mesh57_group_exchange_check PRIVATE src src/startup_stubs)
target_compile_features(mesh57_group_exchange_check PRIVATE cxx_std_17)
add_test(NAME mesh57_group_exchange COMMAND mesh57_group_exchange_check)

add_executable(mesh57_experiment_stride_check tests/mesh57_experiment_stride_check.cpp)
target_include_directories(mesh57_experiment_stride_check PRIVATE src)
target_compile_features(mesh57_experiment_stride_check PRIVATE cxx_std_17)
add_test(NAME mesh57_experiment_stride COMMAND mesh57_experiment_stride_check)

add_executable(mesh57_derived_depth_check tests/mesh57_derived_depth_check.cpp src/gfx1013_isa.cpp)
target_include_directories(mesh57_derived_depth_check PRIVATE src)
target_compile_features(mesh57_derived_depth_check PRIVATE cxx_std_17)
add_test(NAME mesh57_derived_depth COMMAND mesh57_derived_depth_check)

add_executable(mesh57_integer_alu_check tests/mesh57_integer_alu_check.cpp src/gfx1013_isa.cpp)
target_include_directories(mesh57_integer_alu_check PRIVATE src)
target_compile_features(mesh57_integer_alu_check PRIVATE cxx_std_17)
add_test(NAME mesh57_integer_alu COMMAND mesh57_integer_alu_check "${CMAKE_SOURCE_DIR}")

add_executable(mesh57_block_a_check tests/mesh57_block_a_check.cpp)
target_include_directories(mesh57_block_a_check PRIVATE src/startup_stubs)
target_compile_features(mesh57_block_a_check PRIVATE cxx_std_17)
add_test(NAME mesh57_block_a COMMAND mesh57_block_a_check "${CMAKE_SOURCE_DIR}")

add_executable(mesh57_root_bounds_check tests/mesh57_root_bounds_check.cpp)
target_include_directories(mesh57_root_bounds_check PRIVATE src src/startup_stubs)
target_compile_features(mesh57_root_bounds_check PRIVATE cxx_std_17)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
target_compile_options(mesh57_root_bounds_check PRIVATE -D_GLIBCXX_ASSERTIONS)
endif()
# Clang's ASan runtime is not installed in every Linux image. GCC's is.
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(mesh57_root_bounds_check PRIVATE
-fsanitize=address,undefined -fno-omit-frame-pointer)
target_link_options(mesh57_root_bounds_check PRIVATE -fsanitize=address,undefined)
endif()
add_test(NAME mesh57_root_bounds COMMAND mesh57_root_bounds_check "${CMAKE_SOURCE_DIR}")

add_executable(mesh57_readfirstlane_check tests/mesh57_readfirstlane_check.cpp)
target_include_directories(mesh57_readfirstlane_check PRIVATE src src/startup_stubs)
target_compile_features(mesh57_readfirstlane_check PRIVATE cxx_std_17)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
target_compile_options(mesh57_readfirstlane_check PRIVATE -D_GLIBCXX_ASSERTIONS)
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(mesh57_readfirstlane_check PRIVATE
-fsanitize=address,undefined -fno-omit-frame-pointer)
target_link_options(mesh57_readfirstlane_check PRIVATE -fsanitize=address,undefined)
endif()
add_test(NAME mesh57_readfirstlane COMMAND mesh57_readfirstlane_check "${CMAKE_SOURCE_DIR}")

add_executable(mesh57_span_dump_check tests/mesh57_span_dump_check.cpp)
target_include_directories(mesh57_span_dump_check PRIVATE src)
target_compile_features(mesh57_span_dump_check PRIVATE cxx_std_17)
foreach(scenario IN ITEMS unset copied mismatch not-pointer not-readable other)
add_test(NAME mesh57_span_dump_${scenario}
COMMAND mesh57_span_dump_check ${scenario} "${CMAKE_SOURCE_DIR}")
set_tests_properties(mesh57_span_dump_${scenario} PROPERTIES TIMEOUT 30)
endforeach()
if(EXISTS "${INTAKE_PYTHON}")
add_test(NAME mesh57_span_report COMMAND "${INTAKE_PYTHON}" -B
"${CMAKE_CURRENT_SOURCE_DIR}/tools/startup/mesh57_span_report.py" --self-test)
set_tests_properties(mesh57_span_report PROPERTIES TIMEOUT 30)
endif()

get_filename_component(DXC_BIN_DIR "${DXC_EXECUTABLE}" DIRECTORY)
file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/x2w-dxc-dir.txt" CONTENT "${DXC_BIN_DIR}\n")

Expand All @@ -2008,6 +2084,18 @@ if(TARGET compile_dxil AND EXISTS "${DXC_BIN_DIR}/dxcompiler.dll" AND EXISTS "${
add_test(NAME native_fixed_mesh57_${backend} COMMAND startup_indirect_draw_indexed ${backend} mesh)
set_tests_properties(native_fixed_mesh57_${backend} PROPERTIES TIMEOUT 60 SKIP_RETURN_CODE 77
ENVIRONMENT "X2W_TEST_NATIVE_MESH57=1;X2W_NATIVE_SHADERS=${DXC_BIN_DIR}")
foreach(mode derived derived-off derived-bad derived-depth derived-reviewed derived-untranslated derived-root derived-root-unset derived-root-zero derived-root-sgpr derived-root-heap derived-root-five derived-root-table derived-slot55 derived-slot55-mask derived-slot55-isolate derived-slot55-base)
add_test(NAME startup_indirect_mesh_${mode}_${backend}
COMMAND startup_indirect_draw_indexed ${backend} mesh-${mode})
set_tests_properties(startup_indirect_mesh_${mode}_${backend} PROPERTIES TIMEOUT 60 SKIP_RETURN_CODE 77
ENVIRONMENT "X2W_NATIVE_SHADERS=${DXC_BIN_DIR}")
endforeach()
foreach(mode derived-dxc derived-dxc-reviewed)
add_test(NAME startup_indirect_mesh_${mode}_${backend}
COMMAND startup_indirect_draw_indexed ${backend} mesh-${mode})
set_tests_properties(startup_indirect_mesh_${mode}_${backend} PROPERTIES TIMEOUT 60 SKIP_RETURN_CODE 77
ENVIRONMENT "X2W_MESH57_DXC_DIR=${DXC_BIN_DIR}")
endforeach()
add_test(NAME native_mesh_guarded_allocation_${backend} COMMAND startup_indirect_draw_indexed ${backend} mesh)
set_tests_properties(native_mesh_guarded_allocation_${backend} PROPERTIES TIMEOUT 60 SKIP_RETURN_CODE 77
ENVIRONMENT "X2W_TEST_NATIVE_MESH57=1;X2W_TEST_NATIVE_MESH57_GUARDED_ALLOC=1;X2W_NATIVE_SHADERS=${DXC_BIN_DIR}")
Expand Down
4 changes: 2 additions & 2 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"d3d12_sdk_check", "era_heap_check", "xmem_shim", "offscreen_check", "startup_list_copy", "startup_list_copy_check",
"cpu_fuzz_lifted", "cpu_fuzz_lifted_o2", "pe_map", "intake_candidate",
"archive_gpu_reader", "archive_codec_gpu", "archive_texture_gpu_lifted", "startup_launch_probe",
"compile_dxil", "startup_indirect_dispatch", "startup_indirect_draw_indexed", "startup_present_readback_check",
"compile_dxil", "startup_indirect_dispatch", "startup_indirect_draw_indexed", "mesh57_derive_alloc_check", "startup_present_readback_check",
"startup_present_planes", "startup_present_composite_warp",
"xmem_shim_test_controls", "startup_stub_xcrdapi", "startup_stub_xcrdapi_break_window_control",
"xmem_run_break_readers_check", "xmem_run_break_readers_control", "xmem_cross_call_merge_check",
Expand All @@ -50,7 +50,7 @@
"displayName": "Windows pull request smoke tests",
"filter": {
"include": {
"name": "^(bcpack_all_formats(_golden_control)?|startup_bcpack_storage|desktop_root_signature|era_heap_(allocation|failure)|xmem_shim_mapped_pages|cpu_aot_fuzz_smoke|cpu_archive_texture_gpu_warp|dual_uav_warp|spirv_.*_warp|static_exe_intake|descriptor_heap_paging(_swapped)?_warp|startup_launch|startup_mesh57_real_shape|startup_mesh57_runtime(_[a-z]+)?_warp|native_fixed_mesh57_published_pair(_refusal)?_warp|startup_tools_lint|startup_gfx2hlsl_cvt_off_f32_i4_controls|startup_gfx2hlsl_sad_hi_msad_controls|startup_indirect_(dispatch|count_split|draw(_indexed)?|mesh(_xmem_arguments(_skip_wait)?)?|counts_control)_warp|startup_indirect_(dispatch|constants|count)_inline_warp|startup_inline_retire_(on|control)_warp|startup_resource_retire_title_inline_warp_debug0|startup_table_lock_(control_)?warp|startup_indirect_mesh_lease_warp_dual(-trace(-disabled)?)?|startup_indirect_mesh_cache_heap(_wide)?_warp|runtime_mesh86_cache_cli_check|startup_shader_cache_key|startup_present_readback|startup_present_planes(_control)?|startup_present_composite_(warp|overlay_removed_control_warp)|startup_mesh_title_snapshot_warp|startup_list_copy_(warp|title_snapshot_warp|validation(_[a-z_]+_control)?)|xmem_(run_break_readers|cross_call_merge|placeholder_split|map_split_first)(_[a-z_]+)?|startup_dstorage_break_window(_[a-z_]+)?|xmem_page_runs_device(_join)?_warp|linear_buffer_backing_share_warp|startup_stage_package|startup_compute_packed_d16_x_uav_reference|native_.*_(ir|dxil|controls)|native_direct_mesh|startup_triage_run)$"
"name": "^(bcpack_all_formats(_golden_control)?|startup_bcpack_storage|desktop_root_signature|era_heap_(allocation|failure)|xmem_shim_mapped_pages|cpu_aot_fuzz_smoke|cpu_archive_texture_gpu_warp|dual_uav_warp|spirv_.*_warp|static_exe_intake|descriptor_heap_paging(_swapped)?_warp|startup_launch|startup_mesh57_real_shape|mesh57_derive_alloc|mesh57_block_a|mesh57_root_bounds|mesh57_readfirstlane|startup_mesh57_runtime(_[a-z]+)?_warp|native_fixed_mesh57_published_pair(_refusal)?_warp|startup_tools_lint|startup_gfx2hlsl_cvt_off_f32_i4_controls|startup_gfx2hlsl_sad_hi_msad_controls|startup_indirect_(dispatch|count_split|draw(_indexed)?|mesh(_xmem_arguments(_skip_wait)?)?|counts_control)_warp|startup_indirect_mesh_derived([-a-z0-9]+)?_warp|startup_indirect_(dispatch|constants|count)_inline_warp|startup_inline_retire_(on|control)_warp|startup_resource_retire_title_inline_warp_debug0|startup_table_lock_(control_)?warp|startup_indirect_mesh_lease_warp_dual(-trace(-disabled)?)?|startup_indirect_mesh_cache_heap(_wide)?_warp|runtime_mesh86_cache_cli_check|startup_shader_cache_key|startup_present_readback|startup_present_planes(_control)?|startup_present_composite_(warp|overlay_removed_control_warp)|startup_mesh_title_snapshot_warp|startup_list_copy_(warp|title_snapshot_warp|validation(_[a-z_]+_control)?)|xmem_(run_break_readers|cross_call_merge|placeholder_split|map_split_first)(_[a-z_]+)?|startup_dstorage_break_window(_[a-z_]+)?|xmem_page_runs_device(_join)?_warp|linear_buffer_backing_share_warp|startup_stage_package|startup_compute_packed_d16_x_uav_reference|native_.*_(ir|dxil|controls)|native_direct_mesh|startup_triage_run)$"
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion docs/experiments.md
Original file line number Diff line number Diff line change
Expand Up @@ -10353,7 +10353,7 @@ The direct C++ mesh frontend lowers `v_or3_b32` and sign-extends the immediate
in `s_movk_i32`. OR and XOR with `-1` retain uniformity information for a
following CNDMASK and READFIRSTLANE when the input masks are proven uniform over
the current EXEC mask. The
`native_direct_mesh` fixture checks these forms and rejects a varying input mask.
`native_direct_mesh` fixture checks these forms. A varying input mask becomes `WaveReadLaneFirst` when that read runs for the whole wave, and a per-lane EXEC still refuses it.

For an LDS-free mesh stage with a proven flat-thread-zero allocation arm,
the C++ frontend shares that lane's counts, synchronizes the group, then
Expand Down
Loading
Loading