startup: accept a null-export-only pixel stage in the slot 57 role check #2413
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2421"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by NiiRoZz on 2026-11-25T16:09:34Z.
Refs #2413 (T5)
What changed
inspect_mesh57_requestrefused a slot 57 request when the pixel stage did not classify asps. A pixel stage whose only exports targetnullclassifies asother, so it was refused with "slot 57 pixel stage has an incompatible export or termination". The role check now also accepts a pixel stage whose exports are exclusivelynull-target exports, as a depth-only pixel stage.classify_decodedis unchanged, so the vertex/pixel pipeline path classifies exactly as before. Any other non-colour target (position, parameter, a null export mixed with one) still gets the existing refusal.This only removes a pre-check. The request still ends in "slot 57 mesh code emission is unavailable"; no mesh stage is translated.
Why a null export is depth-only
On a pixel shader the null target is the "no colour output" export, emitted so the hardware sees an export with
doneand the valid-mask bit and no enabled channels:llvm/lib/Target/AMDGPU/SILateBranchLowering.cpp: emitsEXP_DONEto the null target with vm=1, compr=0, en=0 when a pixel shader must export.src/amd/compiler/instruction_selection/aco_select_ps_epilog.cpp,create_fs_null_export: "FS must always have exports. So when there are none, we need to add a null export", with enabled_mask 0, done and vm.A stage with no colour exports is already the depth-only case in
classify_decoded.Tests
python -B tests/startup_gfx2hlsl_watch_check.py->startup_gfx2hlsl_watch_check passedLocal observation (not reproducible from the repository)
On 298 locally requested slot 57 pairs, counts of first refusal reasons:
Of 224 non-empty pixel stages, all 18 that classified
otherhave onlyexp null off, off, off, off done vm. No game or executable data is in the repository.What this does not do
It does not emit mesh code or translate any mesh pipeline, and it does not change how null exports are handled in the vertex/pixel path. It does not show that any title runs.
🤖 Generated with Claude Code
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T16:49:53Z.
Review: COMMENTED
Review of head
7ad3cfc8.Checked:
inspect_mesh57_request(tools/startup/gfx2hlsl.py): a pixel stage whose exports are allnulltarget now passes the role check.classify_decodedis untouched, so the vertex/pixel path classifies as before.tests/startup_gfx2hlsl_watch_check.pyuse hand-assembled words, with one positive case and two negative controls. No shader math is lowered here, so no WARP readback is needed.a.split()[1]relies on the decodedexpoperand text having the target as its second token. The positive and negative tests would fail if that were wrong, so the format is covered.Commands run:
merge_check.py 2421,gh pr diff 2421,gh pr list --state all --search ...,python3 -B tests/startup_gfx2hlsl_watch_check.pyin a worktree at the PR head (passed).AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-25T16:11:43Z.
APPROVED. Accepts null-export-only pixel stage in slot 57 role check. Relaxes constraint appropriately.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T16:54:39Z.
Win2025 WARP receipt for head
dfee3cc5after updating with main.Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
dfee3cc5da0987b83b4c81cb351b873321c635d9:--preset dev):cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim -- -j 2):3.08s(configure1.71s)/O2(--preset release):cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim -- -j 2):0.79s(configure1.69s)tests/mesh_heap_sampler_check.pyok (1.0s),tests/startup_buffer_address_check.pyok (0.6s),tests/startup_compute_request_offline_check.pyok (0.6s),tests/startup_compute_translate_check.pyok (0.3s),tests/startup_flat_param_check.pyok (0.1s),tests/startup_gfx2hlsl_add_sub_co_check.pyok (0.2s),tests/startup_gfx2hlsl_bit_alu_check.pyok (1.1s),tests/startup_gfx2hlsl_capture_check.pyok (1.4s),tests/startup_gfx2hlsl_cmp16_check.pyok (0.4s),tests/startup_gfx2hlsl_compare_dst_check.pyok (0.1s),tests/startup_gfx2hlsl_compute_check.pyok (0.5s),tests/startup_gfx2hlsl_cselect_mask_check.pyok (0.1s),tests/startup_gfx2hlsl_cvt_alu_check.pyok (0.2s),tests/startup_gfx2hlsl_f32_lg_check.pyok (2.0s),tests/startup_gfx2hlsl_f32_nan_check.pyok (7.8s),tests/startup_gfx2hlsl_handler_arity_check.pyok (0.1s),tests/startup_gfx2hlsl_image_arity_check.pyok (0.2s),tests/startup_gfx2hlsl_image_get_lod_check.pyok (0.2s),tests/startup_gfx2hlsl_int_med3_check.pyok (0.2s),tests/startup_gfx2hlsl_join_symbols_check.pyok (0.2s),tests/startup_gfx2hlsl_loop_constants_check.pyok (0.1s),tests/startup_gfx2hlsl_mask_overwrite_check.pyok (0.1s),tests/startup_gfx2hlsl_operand_count_check.pyok (0.2s),tests/startup_gfx2hlsl_readfirstlane_recompute_check.pyok (0.1s),tests/startup_gfx2hlsl_readfirstlane_uniform_check.pyok (0.1s),tests/startup_gfx2hlsl_refusals_check.pyok (0.6s),tests/startup_gfx2hlsl_root_check.pyok (0.8s),tests/startup_gfx2hlsl_saveexec_same_reg_check.pyok (0.1s),tests/startup_gfx2hlsl_scalar_brev_fold_check.pyok (0.2s),tests/startup_gfx2hlsl_scalar_m0_check.pyok (0.1s),tests/startup_gfx2hlsl_sdwa_cvt_check.pyok (0.4s),tests/startup_gfx2hlsl_sgpr_spill_check.pyok (0.2s),tests/startup_gfx2hlsl_shift64_check.pyok (0.2s),tests/startup_gfx2hlsl_smem_offset_check.pyok (0.1s),tests/startup_gfx2hlsl_sop2_complement_check.pyok (6.2s),tests/startup_gfx2hlsl_sopk_accum_check.pyok (1.1s),tests/startup_gfx2hlsl_sopk_signext_check.pyok (0.2s),tests/startup_gfx2hlsl_swap_check.pyok (0.4s),tests/startup_gfx2hlsl_vopc_sdwa_check.pyok (6.9s),tests/startup_gfx2hlsl_watch_check.pyok (2.7s),tests/startup_image_2d_array_check.pyok (0.2s),tests/startup_image_3d_check.pyok (0.1s),tests/startup_image_gather_lz_check.pyok (0.5s),tests/startup_image_load_d16_check.pyok (0.8s),tests/startup_image_sample_a16_check.pyok (0.1s),tests/startup_image_sample_b_check.pyok (0.1s),tests/startup_image_sample_c_check.pyok (0.2s),tests/startup_image_sample_l_check.pyok (0.2s),tests/startup_image_sample_lod_check.pyok (0.1s),tests/startup_inline_sampler_check.pyok (0.1s),tests/startup_run_ps1_check.pyok (7.8s),tests/startup_run_sh_check.pyFAIL (0.1s),tests/startup_sampler_heap_check.pyok (0.1s),tests/startup_smem_address_check.pyok (0.1s),tests/startup_stream_fetch_check.pyok (0.2s),tests/startup_stream_interface_check.pyok (0.2s),tests/startup_translator_check.pyok (0.3s)63.3sAI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T16:56:37Z.
Win2025 WARP receipt for head
dfee3cc5after updating with main (CTest run of the test this PR touches).Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
dfee3cc5da0987b83b4c81cb351b873321c635d9:--preset dev):cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim -- -j 2):2.72s(configure1.63s)ctest --preset dev -R '^startup_gfx2hlsl_watch$' --parallel 6 --no-tests=error --output-on-failure): 1/1 passed (2.42s:startup_gfx2hlsl_watch2.32s)/O2(--preset release):cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim -- -j 2):2.43s(configure1.63s)ctest --preset release -R '^startup_gfx2hlsl_watch$' --parallel 6 --no-tests=error --output-on-failure): 1/1 passed (2.35s:startup_gfx2hlsl_watch2.26s)tests/mesh_heap_sampler_check.pyok (0.6s),tests/startup_buffer_address_check.pyok (0.3s),tests/startup_compute_request_offline_check.pyok (0.3s),tests/startup_compute_translate_check.pyok (0.2s),tests/startup_flat_param_check.pyok (0.1s),tests/startup_gfx2hlsl_add_sub_co_check.pyok (0.1s),tests/startup_gfx2hlsl_bit_alu_check.pyok (0.5s),tests/startup_gfx2hlsl_capture_check.pyok (0.7s),tests/startup_gfx2hlsl_cmp16_check.pyok (0.2s),tests/startup_gfx2hlsl_compare_dst_check.pyok (0.1s),tests/startup_gfx2hlsl_compute_check.pyok (0.3s),tests/startup_gfx2hlsl_cselect_mask_check.pyok (0.1s),tests/startup_gfx2hlsl_cvt_alu_check.pyok (0.1s),tests/startup_gfx2hlsl_f32_lg_check.pyok (1.0s),tests/startup_gfx2hlsl_f32_nan_check.pyok (3.8s),tests/startup_gfx2hlsl_handler_arity_check.pyok (0.1s),tests/startup_gfx2hlsl_image_arity_check.pyok (0.1s),tests/startup_gfx2hlsl_image_get_lod_check.pyok (0.1s),tests/startup_gfx2hlsl_int_med3_check.pyok (0.1s),tests/startup_gfx2hlsl_join_symbols_check.pyok (0.2s),tests/startup_gfx2hlsl_loop_constants_check.pyok (0.1s),tests/startup_gfx2hlsl_mask_overwrite_check.pyok (0.1s),tests/startup_gfx2hlsl_operand_count_check.pyok (0.1s),tests/startup_gfx2hlsl_readfirstlane_recompute_check.pyok (0.1s),tests/startup_gfx2hlsl_readfirstlane_uniform_check.pyok (0.1s),tests/startup_gfx2hlsl_refusals_check.pyok (0.3s),tests/startup_gfx2hlsl_root_check.pyok (0.5s),tests/startup_gfx2hlsl_saveexec_same_reg_check.pyok (0.1s),tests/startup_gfx2hlsl_scalar_brev_fold_check.pyok (0.1s),tests/startup_gfx2hlsl_scalar_m0_check.pyok (0.1s),tests/startup_gfx2hlsl_sdwa_cvt_check.pyok (0.2s),tests/startup_gfx2hlsl_sgpr_spill_check.pyok (0.1s),tests/startup_gfx2hlsl_shift64_check.pyok (0.1s),tests/startup_gfx2hlsl_smem_offset_check.pyok (0.1s),tests/startup_gfx2hlsl_sop2_complement_check.pyok (3.3s),tests/startup_gfx2hlsl_sopk_accum_check.pyok (0.6s),tests/startup_gfx2hlsl_sopk_signext_check.pyok (0.1s),tests/startup_gfx2hlsl_swap_check.pyok (0.2s),tests/startup_gfx2hlsl_vopc_sdwa_check.pyok (3.5s),tests/startup_gfx2hlsl_watch_check.pyok (2.2s),tests/startup_image_2d_array_check.pyok (0.1s),tests/startup_image_3d_check.pyok (0.1s),tests/startup_image_gather_lz_check.pyok (0.5s),tests/startup_image_load_d16_check.pyok (0.7s),tests/startup_image_sample_a16_check.pyok (0.1s),tests/startup_image_sample_b_check.pyok (0.1s),tests/startup_image_sample_c_check.pyok (0.2s),tests/startup_image_sample_l_check.pyok (0.1s),tests/startup_image_sample_lod_check.pyok (0.1s),tests/startup_inline_sampler_check.pyok (0.1s),tests/startup_run_ps1_check.pyok (7.7s),tests/startup_run_sh_check.pyFAIL (0.1s),tests/startup_sampler_heap_check.pyok (0.1s),tests/startup_smem_address_check.pyok (0.1s),tests/startup_stream_fetch_check.pyok (0.2s),tests/startup_stream_interface_check.pyok (0.2s),tests/startup_translator_check.pyok (0.3s)sccache: 0/2 hits; wall49.3sAI-assisted; commands listed were executed locally.