Skip to content

Tests: isolate the streamed-texture recheck fixture - #2603

Open
philip-roy-jones wants to merge 1 commit into
xcl-dev:mainfrom
philip-roy-jones:tests-isolate-stream-recheck
Open

philip-roy-jones wants to merge 1 commit into
xcl-dev:mainfrom
philip-roy-jones:tests-isolate-stream-recheck

Conversation

@philip-roy-jones

Copy link
Copy Markdown
Contributor

Part of #42. The streaming-milestone test from #2029 published a pending integer key in the same texture table that parallel GPU tests upload from. The RX 580 suite aborted when an upload treated that key as an ID3D12Resource. An RTX 3060 run reported the same address. Independent report

What is in it

  • In title_textures.rs, run the existing milestone assertions in their own libtest process. Its synthetic resources and frame numbers are private even if an assertion fails.

Tested

  • Radeon RX 580, driver 31.0.21925.1001, Ryzen 7 7700X, Windows 11 Pro 26200, Rust 1.100.0, debug, SDK DXC 1.8.2502.11.
  • cargo build --locked --workspace and cargo test --locked --workspace --no-run passed on both revisions. The GPU queue ran cargo test --locked --workspace --no-fail-fast -- --test-threads=4. After the library process exited 0xc0000005, the runner isolated its tests in batches. Skips are included in the harness's passed count.
Revision Passed Failed Ignored Crashed individually SKIPPED
main b49be18 1367 66 47 2 69
head 88c0f14 1367 66 47 2 69
  • A temporary CPU observer waited until the fake resource was pending at frame 104, then read the parent process's table. It observed the entry on main (1 passed, 1 failed). On the updated fixture the entry was private and both tests passed. The observer performed no GPU upload.
  • Both revisions had the same failing and crashing tests. The 66 failures comprised 41 device-removal errors, 24 E_INVALIDARGs and one sparse-window assertion. The sparse test passed in a fresh head process. Parallel stdout split some SKIPPED messages across lines. The table includes all 69 distinct names recovered from the raw logs.
Tests that reported SKIPPED

Both revisions

  • gpu::dxil::core_tests::s_setreg_b32_mode_bit3_does_not_underflow
  • gpu::dxil::geometry_tests::gpu_geometry_direct_records
  • gpu::dxil::graphics::tests::emitted_ms_primitive_attribute_reaches_the_pixel_shader
  • gpu::dxil::graphics::tests::emitted_ms_ps_draw_a_triangle
  • gpu::dxil::lower::saveexec_tests::gpu_direct_wave32_saveexec_and_wrexec
  • gpu::dxil::lower_wide::rcp_d_tests::gpu_direct_rcp_f64_and_rsq_f64_edges
  • gpu::dxil::module::split::tests::dispatch_chain_divergent_forward_edges_3d
  • gpu::dxil::module::split::tests::dispatch_chain_oversized_loop_matches_whole
  • gpu::dxil::module::split::tests::dispatch_chain_payload_skips_middle_piece
  • gpu::dxil::module::split::tests::dispatch_chain_payload_survives_reused_edge_slot
  • gpu::dxil::module::split::tests::dispatch_chain_wave32_live_loops
  • gpu::dxil::module::split::tests::dispatch_chain_wave64_live_loops_and_exchange
  • gpu::dxil::ops_tests::approximate_float_unary_ops_are_within_tolerance
  • gpu::dxil::ops_tests::bfrev_i64_of_a_uniform_product_matches_cpu
  • gpu::dxil::ops_tests::derivatives_in_compute_run
  • gpu::dxil::ops_tests::dot4_add_u8_packed_matches_cpu
  • gpu::dxil::ops_tests::doubles_match_cpu
  • gpu::dxil::ops_tests::exact_float_unary_ops_match_cpu
  • gpu::dxil::ops_tests::float_binary_tertiary_and_half_conversions_match_cpu
  • gpu::dxil::ops_tests::groupshared_barrier_and_atomics_run
  • gpu::dxil::ops_tests::half_precision_overloads_run
  • gpu::dxil::ops_tests::i1_to_i64_sign_extension_and_shift_match_cpu
  • gpu::dxil::ops_tests::int64_bit_ops_match_cpu
  • gpu::dxil::ops_tests::integer_ops_match_cpu
  • gpu::dxil::ops_tests::raw_and_structured_buffer_atomics_run
  • gpu::dxil::ops_tests::texture_ops_run
  • gpu::dxil::ops_tests::typed_buffer_ops_run
  • gpu::dxil::ops_tests::uaddc_and_usubb_match_cpu
  • gpu::dxil::ops_tests::uav_array_3d_stores_loads_and_texture_atomics_run
  • gpu::dxil::ops_tests::wave_ops_match_cpu
  • gpu::dxil::prelude::fclass_const_tests::gpu_direct_v_cmp_class_f32_const_mask_validates_and_matches_isa
  • gpu::dxil::tests::blocks_are_written_in_reverse_post_order
  • gpu::recomp::lower::tests::a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu
  • gpu::recomp::lower::tests::a_compute_program_agrees_with_the_hlsl_path_on_the_gpu
  • gpu::recomp::lower::tests::coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu
  • gpu::recomp::lower::tests::cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu
  • gpu::recomp::lower::tests::the_lowering_agrees_with_the_hlsl_path_on_the_gpu
  • gpu::recomp::lower::tests::the_split_form_agrees_with_the_wave64_lowering_on_the_gpu
  • gpu::recomp::lower::tests::the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu
  • gpu::recomp::lower_dxil::tests::a_branch_on_a_mixed_mask_matches_the_hlsl_path_on_the_gpu
  • gpu::recomp::lower_dxil::tests::a_bridged_instruction_may_write_to_the_entry_block
  • gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier
  • gpu::recomp::lower_dxil::tests::a_bridged_v_cmpx_keeps_the_lanes_outside_exec_out
  • gpu::recomp::lower_dxil::tests::a_per_lane_2d_or_3d_group_runs_on_the_gpu
  • gpu::recomp::lower_dxil::tests::a_per_lane_compute_program_runs_on_the_gpu
  • gpu::recomp::lower_dxil::tests::a_per_lane_program_with_four_memory_windows_runs_on_the_gpu
  • gpu::recomp::lower_dxil::tests::coalesced_foreign_runs_agree_on_the_gpu
  • gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu
  • gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu
  • gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu
  • gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu
  • gpu::recomp::lower_dxil::tests::gpu_frexp_exp_f32_denorm_per_lane
  • gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu
  • gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu
  • gpu::recomp::lower_dxil::tests::native_wave_branches_on_the_gpu
  • gpu::recomp::lower_dxil::tests::per_lane_kernels_run_on_the_gpu
  • gpu::recomp::lower_dxil::tests::split_wave64_dead_scc_skips_exchange_barrier
  • gpu::recomp::lower_dxil::tests::split_wave64_wave_branches_on_the_gpu
  • gpu::recomp::lower_dxil::tests::the_runtime_path_takes_the_split_form
  • gpu::recomp::tests::gpu_geometry_mode_es_gs_strip
  • gpu::recomp::tests::gpu_geometry_mode_es_gs_strip_with_branches
  • gpu::recomp::tests::gpu_mesh_mode_two_passes
  • heap_window_out_of_memory_falls_back_to_the_switch_form
  • hle::d3d12x::real::passthrough_mesh_stream_accepts_a_triangle_driver_blob
  • offline_split_compute_pipeline_is_reused_by_a_second_process
  • shaders::tests::pso_measurement_compiles_an_exact_synthetic_record
  • split_compute_prefers_the_offline_whole_pipeline
  • the title under the debug layer (dred: false)
  • the title under the debug layer (dred: true)

Regression run

All changed lines are inside the unit test in title_textures.rs. Please apply the test-only label to this revision after reviewing the diff.

Not tested

No retail title run or RDNA2 hardware run for this test-only change.

AI use

Codex, GPT-6.2 Astra, max reasoning effort, implemented the fixture isolation, verified it, wrote this description and opened this PR on Philip's instruction. Claude Code with Claude Opus 5.5 identified the original RX 580 abort. Reviewed on Philip's behalf.

The scheduling test marks an integer fixture key pending in TEXTURES.
A concurrent GPU upload can then use it as a COM resource. Run the
existing milestone assertions in an exact child libtest so its pending
uploads and synthetic frame numbers stay in their own process.

A synchronized CPU observer saw the pending entry in the parent on
b49be18. With this change it saw no entry while the same milestone was
pending in the child.

Assisted-by: Codex (GPT-6.2 Astra)
@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 26 ignored.

Thanks!

— Devin

@fromthemoonx

Copy link
Copy Markdown

Passes on NVIDIA with the whole suite, and the moved test runs in its own process as intended. A clean run to set beside the RX 580 table: no device removals here.

Tested: 88c0f14 merged onto main b49be18 (clean). RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug.

result
cargo test --workspace --no-fail-fast -- --test-threads=4 1435 passed, 0 failed, 47 ignored; 25 SKIPPED lines (no wave64, refused per-lane forms)
stream_recheck_schedule_catches_late_writes_and_resets_milestones through the parent (child spawned), 30 runs 30 of 30
hle::d3d12x::title_textures:: (19 tests), --test-threads=8, 30 runs 30 of 30
hle::d3d12x:: (lib test binary), --test-threads=12, 25 runs 23 clean; 2 failed on list_x::tests::a_dispatch_with_a_pipeline_still_building_waits_at_the_submit, a known parallel flake on main (#2118), not this PR; no crash

I have not seen the original 0xc0000005 on this card on main either, so this run does not show the fix; it shows the change keeps the test passing and does not disturb the rest.

Not tested: AMD, a release build.

AI use: Claude Code (Claude Opus 5.5) ran the suite and the repeats, and wrote this report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants