gpu: add clean-room AMD RDNA2 (XS2 / GFX10.3) disassembler and HLSL/DXBC shader lifter #51
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Freminet--ScarlettX!51
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-51"
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?
@ma30ih on GitHub · 2026-11-24 22:49 UTC · original
ma30ih:feat/rdna2-xs2-shader-lifter→main· +2975 −40 · 12 files · 1 commits · openSummary
Adds a clean-room AMD RDNA2 (GFX10.3)
XS2container parser, instruction decoder/disassembler, control-flow graph builder, and HLSL-to-DXBC shader lifter underscarlettx::gpu, wiringXS2\0shader translation intoTranslateXboxShaderToPcandd3d12_xsPSO creation.Changes
XS2Decoder & Lifter (include/scarlettx/gpu/rdna2_xs2.h,src/gpu/rdna2_xs2.cpp):ParseXs2Container/BuildXs2Containersupporting stages, wave modes (Wave32/Wave64), SGPR/VGPR counts, compute[numthreads], and CBV/SRV/UAV/vertex input bindings.SOP2,SOP1,SOPK,SOPC,SOPP,VOP2,VOP1,VOPC,VOP3,SMEM,MUBUF,FLAT, andEXP(with 32-bit inline literals and modifiers).BuildRdna2Cfg) and structured HLSL emission (LiftXs2ToHlsl/LiftXs2ToDxbcviaCompileHlslToDxbcto SM 5.0 / 5.1).d3d12_xsIntegration (include/scarlettx/gpu/shader_ir.h,src/gpu/shader_ir.cpp,src/shims/d3d12_xs_shim.cpp):StatusCode::UnsupportedFormatforXS2\0inTranslateXboxShaderToPcwithLiftXs2ToDxbc, and populateddisassembly_summary/lifted_hlslmetadata.ProxyCreateGraphicsPipelineStateandProxyCreateComputePipelineStateto liftXS2\0shaders before creating hostID3D12PipelineStateobjects.tests/test_rdna2_xs2.cpp,tests/test_shader_pipeline.cpp,tools/generate_status.py,CMakeLists.txt):test_rdna2_xs2verifying GFX10.3 decoding/disassembly, multi-block CFG branching (S_CBRANCH_SCC1,S_BRANCH,V_CNDMASK_B32), and live D3D12 WARP Compute & Graphics execution.test_shader_pipelinefor realXS2\0lifting and truncated-header error handling, and regenerated status reports (RDNA2 XS2 Shader Lifting:8 of 16/50%).Verification
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release && cmake --build build(MSVC 19.51 x64): 0 errors, 0 warnings.ctest --test-dir build --output-on-failure: 27/27 passed (100%).View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.