Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
42750a74f8 | ||
|
3ab0a71c7b | ||
|
6e784e0aca | ||
|
5a0aa074b6 | ||
|
93aa40f1fb | ||
|
bedee64af5 | ||
|
86931cc3f1 | ||
|
2be8b6ea45 |
12
.github/workflows/build.yml
vendored
12
.github/workflows/build.yml
vendored
@@ -3,10 +3,6 @@ name: Build job
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
concurrency:
|
||||
group: pr-builds-${{ github.event.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
POWERSHELL_TELEMETRY_OPTOUT: 1
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||
@@ -54,7 +50,11 @@ jobs:
|
||||
run: dotnet build -c "${{ matrix.configuration }}" -p:Version="${{ env.RYUJINX_BASE_VERSION }}" -p:SourceRevisionId="${{ steps.git_short_hash.outputs.result }}" -p:ExtraDefineConstants=DISABLE_UPDATER
|
||||
|
||||
- name: Test
|
||||
run: dotnet test --no-build -c "${{ matrix.configuration }}"
|
||||
uses: TSRBerry/unstable-commands@v1
|
||||
with:
|
||||
commands: dotnet test --no-build -c "${{ matrix.configuration }}"
|
||||
timeout-minutes: 10
|
||||
retry-codes: 139
|
||||
|
||||
- name: Publish Ryujinx
|
||||
run: dotnet publish -c "${{ matrix.configuration }}" -r "${{ matrix.DOTNET_RUNTIME_IDENTIFIER }}" -o ./publish -p:Version="${{ env.RYUJINX_BASE_VERSION }}" -p:DebugType=embedded -p:SourceRevisionId="${{ steps.git_short_hash.outputs.result }}" -p:ExtraDefineConstants=DISABLE_UPDATER src/Ryujinx --self-contained true
|
||||
@@ -141,4 +141,4 @@ jobs:
|
||||
with:
|
||||
name: ava-ryujinx-${{ matrix.configuration }}-${{ env.RYUJINX_BASE_VERSION }}+${{ steps.git_short_hash.outputs.result }}-macos_universal
|
||||
path: "publish_ava/*.tar.gz"
|
||||
if: github.event_name == 'pull_request'
|
||||
if: github.event_name == 'pull_request'
|
||||
|
28
.github/workflows/checks.yml
vendored
28
.github/workflows/checks.yml
vendored
@@ -40,23 +40,23 @@ jobs:
|
||||
run: |
|
||||
dotnet format whitespace --verify-no-changes --report ./whitespace-report.json -v d
|
||||
|
||||
# For some unknown reason this step sometimes fails with exit code 139 (segfault?),
|
||||
# so in that case we'll try again (3 tries max).
|
||||
- name: Run dotnet format style
|
||||
run: |
|
||||
dotnet format style --severity info --verify-no-changes --report ./style-report.json -v d
|
||||
uses: TSRBerry/unstable-commands@v1
|
||||
with:
|
||||
commands: dotnet format style --severity info --verify-no-changes --report ./style-report.json -v d
|
||||
timeout-minutes: 5
|
||||
retry-codes: 139
|
||||
|
||||
# For some reason this step sometimes fails with exit code 139 (segfault?),
|
||||
# so should that be the case we'll try again (3 tries max).
|
||||
# For some unknown reason this step sometimes fails with exit code 139 (segfault?),
|
||||
# so in that case we'll try again (3 tries max).
|
||||
- name: Run dotnet format analyzers
|
||||
run: |
|
||||
attempt=0
|
||||
exit_code=139
|
||||
until [ $attempt -ge 3 ] || [ $exit_code -ne 139 ]; do
|
||||
((attempt+=1))
|
||||
exit_code=0
|
||||
echo "Attempt: ${attempt}/3"
|
||||
dotnet format analyzers --severity info --verify-no-changes --report ./analyzers-report.json -v d || exit_code=$?
|
||||
done
|
||||
exit $exit_code
|
||||
uses: TSRBerry/unstable-commands@v1
|
||||
with:
|
||||
commands: dotnet format analyzers --severity info --verify-no-changes --report ./analyzers-report.json -v d
|
||||
timeout-minutes: 5
|
||||
retry-codes: 139
|
||||
|
||||
- name: Upload report
|
||||
if: failure()
|
||||
|
1
.github/workflows/pr_triage.yml
vendored
1
.github/workflows/pr_triage.yml
vendored
@@ -28,6 +28,7 @@ jobs:
|
||||
dot: true
|
||||
|
||||
- name: Assign reviewers
|
||||
if: ! github.event.pull_request.draft
|
||||
run: |
|
||||
pip3 install PyGithub
|
||||
python3 .github/update_reviewers.py ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${{ github.event.pull_request.number }} .github/reviewers.yml
|
||||
|
@@ -12,7 +12,7 @@
|
||||
<PackageVersion Include="Avalonia.Svg.Skia" Version="0.10.18" />
|
||||
<PackageVersion Include="CommandLineParser" Version="2.9.1" />
|
||||
<PackageVersion Include="Concentus" Version="1.1.7" />
|
||||
<PackageVersion Include="DiscordRichPresence" Version="1.1.3.18" />
|
||||
<PackageVersion Include="DiscordRichPresence" Version="1.2.1.24" />
|
||||
<PackageVersion Include="DynamicData" Version="7.14.2" />
|
||||
<PackageVersion Include="FluentAvaloniaUI" Version="1.4.5" />
|
||||
<PackageVersion Include="GtkSharp.Dependencies" Version="1.1.1" />
|
||||
|
@@ -330,6 +330,7 @@ namespace ARMeilleure.Decoders
|
||||
SetA64("011111100x110000110010xxxxxxxxxx", InstName.Fmaxnmp_S, InstEmit.Fmaxnmp_S, OpCodeSimd.Create);
|
||||
SetA64("0>1011100<1xxxxx110001xxxxxxxxxx", InstName.Fmaxnmp_V, InstEmit.Fmaxnmp_V, OpCodeSimdReg.Create);
|
||||
SetA64("0110111000110000110010xxxxxxxxxx", InstName.Fmaxnmv_V, InstEmit.Fmaxnmv_V, OpCodeSimd.Create);
|
||||
SetA64("011111100x110000111110xxxxxxxxxx", InstName.Fmaxp_S, InstEmit.Fmaxp_S, OpCodeSimd.Create);
|
||||
SetA64("0>1011100<1xxxxx111101xxxxxxxxxx", InstName.Fmaxp_V, InstEmit.Fmaxp_V, OpCodeSimdReg.Create);
|
||||
SetA64("0110111000110000111110xxxxxxxxxx", InstName.Fmaxv_V, InstEmit.Fmaxv_V, OpCodeSimd.Create);
|
||||
SetA64("000111100x1xxxxx010110xxxxxxxxxx", InstName.Fmin_S, InstEmit.Fmin_S, OpCodeSimdReg.Create);
|
||||
@@ -339,6 +340,7 @@ namespace ARMeilleure.Decoders
|
||||
SetA64("011111101x110000110010xxxxxxxxxx", InstName.Fminnmp_S, InstEmit.Fminnmp_S, OpCodeSimd.Create);
|
||||
SetA64("0>1011101<1xxxxx110001xxxxxxxxxx", InstName.Fminnmp_V, InstEmit.Fminnmp_V, OpCodeSimdReg.Create);
|
||||
SetA64("0110111010110000110010xxxxxxxxxx", InstName.Fminnmv_V, InstEmit.Fminnmv_V, OpCodeSimd.Create);
|
||||
SetA64("011111101x110000111110xxxxxxxxxx", InstName.Fminp_S, InstEmit.Fminp_S, OpCodeSimd.Create);
|
||||
SetA64("0>1011101<1xxxxx111101xxxxxxxxxx", InstName.Fminp_V, InstEmit.Fminp_V, OpCodeSimdReg.Create);
|
||||
SetA64("0110111010110000111110xxxxxxxxxx", InstName.Fminv_V, InstEmit.Fminv_V, OpCodeSimd.Create);
|
||||
SetA64("010111111xxxxxxx0001x0xxxxxxxxxx", InstName.Fmla_Se, InstEmit.Fmla_Se, OpCodeSimdRegElemF.Create);
|
||||
|
@@ -883,6 +883,31 @@ namespace ARMeilleure.Instructions
|
||||
}
|
||||
}
|
||||
|
||||
public static void Fmaxp_S(ArmEmitterContext context)
|
||||
{
|
||||
if (Optimizations.UseAdvSimd)
|
||||
{
|
||||
InstEmitSimdHelperArm64.EmitScalarUnaryOpF(context, Intrinsic.Arm64FmaxpS);
|
||||
}
|
||||
else if (Optimizations.FastFP && Optimizations.UseSse41)
|
||||
{
|
||||
EmitSse2ScalarPairwiseOpF(context, (op1, op2) =>
|
||||
{
|
||||
return EmitSse41ProcessNaNsOpF(context, (op1, op2) =>
|
||||
{
|
||||
return EmitSse2VectorMaxMinOpF(context, op1, op2, isMax: true);
|
||||
}, scalar: true, op1, op2);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
EmitScalarPairwiseOpF(context, (op1, op2) =>
|
||||
{
|
||||
return EmitSoftFloatCall(context, nameof(SoftFloat32.FPMax), op1, op2);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public static void Fmaxp_V(ArmEmitterContext context)
|
||||
{
|
||||
if (Optimizations.UseAdvSimd)
|
||||
@@ -1081,6 +1106,31 @@ namespace ARMeilleure.Instructions
|
||||
}
|
||||
}
|
||||
|
||||
public static void Fminp_S(ArmEmitterContext context)
|
||||
{
|
||||
if (Optimizations.UseAdvSimd)
|
||||
{
|
||||
InstEmitSimdHelperArm64.EmitScalarUnaryOpF(context, Intrinsic.Arm64FminpS);
|
||||
}
|
||||
else if (Optimizations.FastFP && Optimizations.UseSse41)
|
||||
{
|
||||
EmitSse2ScalarPairwiseOpF(context, (op1, op2) =>
|
||||
{
|
||||
return EmitSse41ProcessNaNsOpF(context, (op1, op2) =>
|
||||
{
|
||||
return EmitSse2VectorMaxMinOpF(context, op1, op2, isMax: false);
|
||||
}, scalar: true, op1, op2);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
EmitScalarPairwiseOpF(context, (op1, op2) =>
|
||||
{
|
||||
return EmitSoftFloatCall(context, nameof(SoftFloat32.FPMin), op1, op2);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public static void Fminp_V(ArmEmitterContext context)
|
||||
{
|
||||
if (Optimizations.UseAdvSimd)
|
||||
|
@@ -228,6 +228,7 @@ namespace ARMeilleure.Instructions
|
||||
Fmaxnmp_S,
|
||||
Fmaxnmp_V,
|
||||
Fmaxnmv_V,
|
||||
Fmaxp_S,
|
||||
Fmaxp_V,
|
||||
Fmaxv_V,
|
||||
Fmin_S,
|
||||
@@ -237,6 +238,7 @@ namespace ARMeilleure.Instructions
|
||||
Fminnmp_S,
|
||||
Fminnmp_V,
|
||||
Fminnmv_V,
|
||||
Fminp_S,
|
||||
Fminp_V,
|
||||
Fminv_V,
|
||||
Fmla_Se,
|
||||
|
@@ -29,7 +29,7 @@ namespace ARMeilleure.Translation.PTC
|
||||
private const string OuterHeaderMagicString = "PTCohd\0\0";
|
||||
private const string InnerHeaderMagicString = "PTCihd\0\0";
|
||||
|
||||
private const uint InternalVersion = 5343; //! To be incremented manually for each change to the ARMeilleure project.
|
||||
private const uint InternalVersion = 5502; //! To be incremented manually for each change to the ARMeilleure project.
|
||||
|
||||
private const string ActualDir = "0";
|
||||
private const string BackupDir = "1";
|
||||
|
@@ -331,7 +331,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
||||
UpdateShaderState();
|
||||
}
|
||||
|
||||
_channel.BufferManager.CommitGraphicsBindings();
|
||||
_channel.BufferManager.CommitGraphicsBindings(_drawState.DrawIndexed);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@@ -515,24 +515,32 @@ namespace Ryujinx.Graphics.Gpu.Memory
|
||||
/// Ensures that the graphics engine bindings are visible to the host GPU.
|
||||
/// Note: this actually performs the binding using the host graphics API.
|
||||
/// </summary>
|
||||
public void CommitGraphicsBindings()
|
||||
/// <param name="indexed">True if the index buffer is in use</param>
|
||||
public void CommitGraphicsBindings(bool indexed)
|
||||
{
|
||||
var bufferCache = _channel.MemoryManager.Physical.BufferCache;
|
||||
|
||||
if (_indexBufferDirty || _rebind)
|
||||
if (indexed)
|
||||
{
|
||||
_indexBufferDirty = false;
|
||||
|
||||
if (_indexBuffer.Address != 0)
|
||||
if (_indexBufferDirty || _rebind)
|
||||
{
|
||||
BufferRange buffer = bufferCache.GetBufferRange(_indexBuffer.Address, _indexBuffer.Size);
|
||||
_indexBufferDirty = false;
|
||||
|
||||
_context.Renderer.Pipeline.SetIndexBuffer(buffer, _indexBuffer.Type);
|
||||
if (_indexBuffer.Address != 0)
|
||||
{
|
||||
BufferRange buffer = bufferCache.GetBufferRange(_indexBuffer.Address, _indexBuffer.Size);
|
||||
|
||||
_context.Renderer.Pipeline.SetIndexBuffer(buffer, _indexBuffer.Type);
|
||||
}
|
||||
}
|
||||
else if (_indexBuffer.Address != 0)
|
||||
{
|
||||
bufferCache.SynchronizeBufferRange(_indexBuffer.Address, _indexBuffer.Size);
|
||||
}
|
||||
}
|
||||
else if (_indexBuffer.Address != 0)
|
||||
else if (_rebind)
|
||||
{
|
||||
bufferCache.SynchronizeBufferRange(_indexBuffer.Address, _indexBuffer.Size);
|
||||
_indexBufferDirty = true;
|
||||
}
|
||||
|
||||
uint vbEnableMask = _vertexBuffersEnableMask;
|
||||
|
@@ -22,7 +22,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
|
||||
private const ushort FileFormatVersionMajor = 1;
|
||||
private const ushort FileFormatVersionMinor = 2;
|
||||
private const uint FileFormatVersionPacked = ((uint)FileFormatVersionMajor << 16) | FileFormatVersionMinor;
|
||||
private const uint CodeGenVersion = 4675;
|
||||
private const uint CodeGenVersion = 5529;
|
||||
|
||||
private const string SharedTocFileName = "shared.toc";
|
||||
private const string SharedDataFileName = "shared.data";
|
||||
|
@@ -162,8 +162,10 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
||||
|
||||
if (op.Ccc == Ccc.T)
|
||||
{
|
||||
context.PrepareForReturn();
|
||||
context.Return();
|
||||
if (context.PrepareForReturn())
|
||||
{
|
||||
context.Return();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -174,8 +176,12 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
||||
{
|
||||
Operand lblSkip = Label();
|
||||
context.BranchIfFalse(lblSkip, cond);
|
||||
context.PrepareForReturn();
|
||||
context.Return();
|
||||
|
||||
if (context.PrepareForReturn())
|
||||
{
|
||||
context.Return();
|
||||
}
|
||||
|
||||
context.MarkLabel(lblSkip);
|
||||
}
|
||||
}
|
||||
|
@@ -218,7 +218,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
||||
return context.Copy(Register(srcB++, RegisterType.Gpr));
|
||||
}
|
||||
|
||||
Operand d = dest != RegisterConsts.RegisterZeroIndex ? Register(dest, RegisterType.Gpr) : null;
|
||||
Operand d = Register(dest, RegisterType.Gpr);
|
||||
|
||||
List<Operand> sourcesList = new();
|
||||
|
||||
@@ -304,6 +304,11 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
||||
bool byteAddress,
|
||||
bool isBindless)
|
||||
{
|
||||
if (srcB == RegisterConsts.RegisterZeroIndex)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
context.Config.SetUsedFeature(FeatureFlags.IntegerSampling);
|
||||
|
||||
SamplerType type = ConvertSamplerType(dimensions);
|
||||
|
@@ -304,11 +304,11 @@ namespace Ryujinx.Graphics.Shader.Translation
|
||||
PrepareForVertexReturn();
|
||||
}
|
||||
|
||||
public void PrepareForReturn()
|
||||
public bool PrepareForReturn()
|
||||
{
|
||||
if (IsNonMain)
|
||||
{
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Config.LastInVertexPipeline &&
|
||||
@@ -383,13 +383,13 @@ namespace Ryujinx.Graphics.Shader.Translation
|
||||
|
||||
AlphaTestOp alphaTestOp = Config.GpuAccessor.QueryAlphaTestCompare();
|
||||
|
||||
if (alphaTestOp != AlphaTestOp.Always && (Config.OmapTargets & 8) != 0)
|
||||
if (alphaTestOp != AlphaTestOp.Always)
|
||||
{
|
||||
if (alphaTestOp == AlphaTestOp.Never)
|
||||
{
|
||||
this.Discard();
|
||||
}
|
||||
else
|
||||
else if ((Config.OmapTargets & 8) != 0)
|
||||
{
|
||||
Instruction comparator = alphaTestOp switch
|
||||
{
|
||||
@@ -415,6 +415,12 @@ namespace Ryujinx.Graphics.Shader.Translation
|
||||
}
|
||||
}
|
||||
|
||||
// We don't need to output anything if alpha test always fails.
|
||||
if (alphaTestOp == AlphaTestOp.Never)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
int regIndexBase = 0;
|
||||
|
||||
for (int rtIndex = 0; rtIndex < 8; rtIndex++)
|
||||
@@ -462,6 +468,8 @@ namespace Ryujinx.Graphics.Shader.Translation
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void GenerateAlphaToCoverageDitherDiscard()
|
||||
|
@@ -42,6 +42,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
"VK_NV_viewport_array2",
|
||||
"VK_EXT_depth_clip_control",
|
||||
"VK_KHR_portability_subset", // As per spec, we should enable this if present.
|
||||
"VK_EXT_4444_formats",
|
||||
};
|
||||
|
||||
private static readonly string[] _requiredExtensions = {
|
||||
|
@@ -764,7 +764,9 @@ namespace Ryujinx.Tests.Cpu
|
||||
{
|
||||
0x7E30D820u, // FADDP S0, V1.2S
|
||||
0x7E30C820u, // FMAXNMP S0, V1.2S
|
||||
0x7E30F820u, // FMAXP S0, V1.2S
|
||||
0x7EB0C820u, // FMINNMP S0, V1.2S
|
||||
0x7EB0F820u, // FMINP S0, V1.2S
|
||||
};
|
||||
}
|
||||
|
||||
@@ -774,7 +776,9 @@ namespace Ryujinx.Tests.Cpu
|
||||
{
|
||||
0x7E70D820u, // FADDP D0, V1.2D
|
||||
0x7E70C820u, // FMAXNMP D0, V1.2D
|
||||
0x7E70F820u, // FMAXP D0, V1.2D
|
||||
0x7EF0C820u, // FMINNMP D0, V1.2D
|
||||
0x7EF0F820u, // FMINP D0, V1.2D
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user