mirror of
https://github.com/par274/sharpemu.git
synced 2026-07-16 03:00:57 +00:00
SharpEmu.Tools.ShaderDump feeds hand-assembled Gen5 (gfx10) instruction words — cross-checked against LLVM's AMDGPU target definitions — through the real Gen5ShaderTranslator -> Gen5SpirvTranslator pipeline via reflection (no emulator source changes; the project is not in the main solution) and dumps the resulting vertex/compute SPIR-V blobs for inspection with spirv-val / spirv-dis. Each bundled program carries an expectation: fmac/muls/sopp-hints/exec must decode and emit both stages, while sopp-mode (s_round_mode, s_denorm_mode) pins the loud unknown-sopp decode failure those FP MODE writes must keep producing until their semantics are modeled (#108). Any unexpected outcome makes the tool exit non-zero, so it can gate scripts or CI. The exec program computes real ALU results and stores them with buffer_store_dword, toggling EXEC off and on around a pair of stores; its exec-cs.spv blob is designed for numeric verification on a real Vulkan device (follow-up tool). All dumped blobs pass spirv-val --target-env vulkan1.3. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
11 KiB
11 KiB