mirror of
https://github.com/par274/sharpemu.git
synced 2026-07-22 19:06:15 +08:00
[Tools] Add synthetic shader dump tool for the Gen5 translator (#111)
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>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<!--
|
||||
Copyright (C) 2026 SharpEmu Emulator Project
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
-->
|
||||
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<!-- Standalone dev tool: opt out of the repo-wide lock-file requirement
|
||||
so no packages.lock.json is generated or committed for it. -->
|
||||
<RestorePackagesWithLockFile>false</RestorePackagesWithLockFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\SharpEmu.Libs\SharpEmu.Libs.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user