aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Gpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Graphics.Gpu')
-rw-r--r--src/Ryujinx.Graphics.Gpu/Memory/SupportBufferUpdater.cs4
-rw-r--r--src/Ryujinx.Graphics.Gpu/Window.cs6
2 files changed, 4 insertions, 6 deletions
diff --git a/src/Ryujinx.Graphics.Gpu/Memory/SupportBufferUpdater.cs b/src/Ryujinx.Graphics.Gpu/Memory/SupportBufferUpdater.cs
index 3ea37c55..50c042fb 100644
--- a/src/Ryujinx.Graphics.Gpu/Memory/SupportBufferUpdater.cs
+++ b/src/Ryujinx.Graphics.Gpu/Memory/SupportBufferUpdater.cs
@@ -187,7 +187,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
X = scale * 2f / viewportWidth,
Y = scale * 2f / viewportHeight,
Z = 1,
- W = disableTransformF
+ W = disableTransformF,
});
}
}
@@ -210,7 +210,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
ReadOnlySpan<byte> data = MemoryMarshal.Cast<SupportBuffer, byte>(MemoryMarshal.CreateSpan(ref _data, 1));
- _renderer.SetBufferData(_handle, _startOffset, data.Slice(_startOffset, _endOffset - _startOffset));
+ _renderer.SetBufferData(_handle, _startOffset, data[_startOffset.._endOffset]);
_startOffset = -1;
_endOffset = -1;
diff --git a/src/Ryujinx.Graphics.Gpu/Window.cs b/src/Ryujinx.Graphics.Gpu/Window.cs
index 89addc8a..1f94122d 100644
--- a/src/Ryujinx.Graphics.Gpu/Window.cs
+++ b/src/Ryujinx.Graphics.Gpu/Window.cs
@@ -8,8 +8,6 @@ using System.Threading;
namespace Ryujinx.Graphics.Gpu
{
- using Texture = Image.Texture;
-
/// <summary>
/// GPU image presentation window.
/// </summary>
@@ -202,13 +200,13 @@ namespace Ryujinx.Graphics.Gpu
{
pt.AcquireCallback(_context, pt.UserObj);
- Texture texture = pt.Cache.FindOrCreateTexture(null, TextureSearchFlags.WithUpscale, pt.Info, 0, pt.Range);
+ Image.Texture texture = pt.Cache.FindOrCreateTexture(null, TextureSearchFlags.WithUpscale, pt.Info, 0, pt.Range);
pt.Cache.Tick();
texture.SynchronizeMemory();
- ImageCrop crop = new ImageCrop(
+ ImageCrop crop = new(
(int)(pt.Crop.Left * texture.ScaleFactor),
(int)MathF.Ceiling(pt.Crop.Right * texture.ScaleFactor),
(int)(pt.Crop.Top * texture.ScaleFactor),