Compare commits

..

5 Commits

Author SHA1 Message Date
gdkchan
543d75a587 CPU: Produce non-inf results for RSQRTE instruction with subnormal inputs (#6634)
* CPU: Produce non-inf results for RSQRTE instruction with subnormal inputs

* PPTC version bump
2024-04-09 14:34:14 -03:00
gdkchan
338ff79e1e Use ResScaleUnsupported flag for texture arrays (#6626) 2024-04-09 14:24:46 -03:00
gdkchan
80201466ae Fast D32S8 2D depth texture copy (#6636) 2024-04-09 14:03:55 -03:00
gdkchan
7a971edb57 Pin audio renderer update output buffers (#6633) 2024-04-08 20:26:47 -03:00
MutantAura
c1b0ab805a Disable CLI setting persistence for HW-accelerated GUI. (#6620) 2024-04-07 20:58:05 -03:00
7 changed files with 43 additions and 12 deletions

View File

@@ -2426,7 +2426,11 @@ namespace ARMeilleure.Instructions
}
else if (Optimizations.FastFP && Optimizations.UseSse41 && sizeF == 0)
{
Operand res = EmitSse41Round32Exp8OpF(context, context.AddIntrinsic(Intrinsic.X86Rsqrtss, GetVec(op.Rn)), scalar: true);
// RSQRTSS handles subnormals as zero, which differs from Arm, so we can't use it here.
Operand res = context.AddIntrinsic(Intrinsic.X86Sqrtss, GetVec(op.Rn));
res = context.AddIntrinsic(Intrinsic.X86Rcpss, res);
res = EmitSse41Round32Exp8OpF(context, res, scalar: true);
context.Copy(GetVec(op.Rd), context.VectorZeroUpper96(res));
}
@@ -2451,7 +2455,11 @@ namespace ARMeilleure.Instructions
}
else if (Optimizations.FastFP && Optimizations.UseSse41 && sizeF == 0)
{
Operand res = EmitSse41Round32Exp8OpF(context, context.AddIntrinsic(Intrinsic.X86Rsqrtps, GetVec(op.Rn)), scalar: false);
// RSQRTPS handles subnormals as zero, which differs from Arm, so we can't use it here.
Operand res = context.AddIntrinsic(Intrinsic.X86Sqrtps, GetVec(op.Rn));
res = context.AddIntrinsic(Intrinsic.X86Rcpps, res);
res = EmitSse41Round32Exp8OpF(context, res, scalar: false);
if (op.RegisterSize == RegisterSize.Simd64)
{

View File

@@ -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 = 6613; //! To be incremented manually for each change to the ARMeilleure project.
private const uint InternalVersion = 6634; //! To be incremented manually for each change to the ARMeilleure project.
private const string ActualDir = "0";
private const string BackupDir = "1";

View File

@@ -224,7 +224,8 @@ namespace Ryujinx.Graphics.Gpu.Image
/// Synchronizes memory for all textures in the array.
/// </summary>
/// <param name="isStore">Indicates if the texture may be modified by the access</param>
public void SynchronizeMemory(bool isStore)
/// <param name="blacklistScale">Indicates if the texture should be blacklisted for scaling</param>
public void SynchronizeMemory(bool isStore, bool blacklistScale)
{
foreach (Texture texture in Textures.Keys)
{
@@ -234,6 +235,13 @@ namespace Ryujinx.Graphics.Gpu.Image
{
texture.SignalModified();
}
if (blacklistScale && texture.ScaleMode != TextureScaleMode.Blacklisted)
{
// Scaling textures used on arrays is currently not supported.
texture.BlacklistScale();
}
}
}
@@ -467,6 +475,7 @@ namespace Ryujinx.Graphics.Gpu.Image
bool poolsModified = entry.PoolsModified();
bool isStore = bindingInfo.Flags.HasFlag(TextureUsageFlags.ImageStore);
bool resScaleUnsupported = bindingInfo.Flags.HasFlag(TextureUsageFlags.ResScaleUnsupported);
ReadOnlySpan<int> cachedTextureBuffer;
ReadOnlySpan<int> cachedSamplerBuffer;
@@ -475,7 +484,7 @@ namespace Ryujinx.Graphics.Gpu.Image
{
if (entry.MatchesSequenceNumber(_context.SequenceNumber))
{
entry.SynchronizeMemory(isStore);
entry.SynchronizeMemory(isStore, resScaleUnsupported);
if (isImage)
{
@@ -504,7 +513,7 @@ namespace Ryujinx.Graphics.Gpu.Image
if (entry.MatchesBufferData(cachedTextureBuffer, cachedSamplerBuffer, separateSamplerBuffer, samplerWordOffset))
{
entry.SynchronizeMemory(isStore);
entry.SynchronizeMemory(isStore, resScaleUnsupported);
if (isImage)
{
@@ -569,6 +578,13 @@ namespace Ryujinx.Graphics.Gpu.Image
{
texture.SignalModified();
}
if (resScaleUnsupported && texture.ScaleMode != TextureScaleMode.Blacklisted)
{
// Scaling textures used on arrays is currently not supported.
texture.BlacklistScale();
}
}
Sampler sampler = samplerPool?.Get(samplerId);

View File

@@ -247,6 +247,10 @@ namespace Ryujinx.Graphics.Gpu.Image
{
return TextureMatchQuality.FormatAlias;
}
else if (lhs.FormatInfo.Format == Format.D32FloatS8Uint && rhs.FormatInfo.Format == Format.R32G32Float)
{
return TextureMatchQuality.FormatAlias;
}
}
return lhs.FormatInfo.Format == rhs.FormatInfo.Format ? TextureMatchQuality.Perfect : TextureMatchQuality.NoMatch;

View File

@@ -61,6 +61,9 @@ namespace Ryujinx.Horizon.Sdk.Audio.Detail
[Buffer(HipcBufferFlags.Out | HipcBufferFlags.MapAlias)] Memory<byte> performanceOutput,
[Buffer(HipcBufferFlags.In | HipcBufferFlags.MapAlias)] ReadOnlySequence<byte> input)
{
using MemoryHandle outputHandle = output.Pin();
using MemoryHandle performanceOutputHandle = performanceOutput.Pin();
Result result = new Result((int)_renderSystem.Update(output, performanceOutput, input));
return result;

View File

@@ -91,9 +91,6 @@ namespace Ryujinx.UI.Common.Helper
case "--software-gui":
OverrideHardwareAcceleration = false;
break;
case "--hardware-gui":
OverrideHardwareAcceleration = true;
break;
default:
LaunchPathArg = arg;
break;

View File

@@ -27,6 +27,7 @@ namespace Ryujinx.Ava
public static string Version { get; private set; }
public static string ConfigurationPath { get; private set; }
public static bool PreviewerDetached { get; private set; }
public static bool UseHardwareAcceleration { get; private set; }
[LibraryImport("user32.dll", SetLastError = true)]
public static partial int MessageBoxA(IntPtr hWnd, [MarshalAs(UnmanagedType.LPStr)] string text, [MarshalAs(UnmanagedType.LPStr)] string caption, uint type);
@@ -60,14 +61,14 @@ namespace Ryujinx.Ava
EnableMultiTouch = true,
EnableIme = true,
EnableInputFocusProxy = Environment.GetEnvironmentVariable("XDG_CURRENT_DESKTOP") == "gamescope",
RenderingMode = ConfigurationState.Instance.EnableHardwareAcceleration ?
RenderingMode = UseHardwareAcceleration ?
new[] { X11RenderingMode.Glx, X11RenderingMode.Software } :
new[] { X11RenderingMode.Software },
})
.With(new Win32PlatformOptions
{
WinUICompositionBackdropCornerRadius = 8.0f,
RenderingMode = ConfigurationState.Instance.EnableHardwareAcceleration ?
RenderingMode = UseHardwareAcceleration ?
new[] { Win32RenderingMode.AngleEgl, Win32RenderingMode.Software } :
new[] { Win32RenderingMode.Software },
})
@@ -165,6 +166,8 @@ namespace Ryujinx.Ava
}
}
UseHardwareAcceleration = ConfigurationState.Instance.EnableHardwareAcceleration.Value;
// Check if graphics backend was overridden
if (CommandLineState.OverrideGraphicsBackend != null)
{
@@ -199,7 +202,7 @@ namespace Ryujinx.Ava
// Check if hardware-acceleration was overridden.
if (CommandLineState.OverrideHardwareAcceleration != null)
{
ConfigurationState.Instance.EnableHardwareAcceleration.Value = CommandLineState.OverrideHardwareAcceleration.Value;
UseHardwareAcceleration = CommandLineState.OverrideHardwareAcceleration.Value;
}
}