mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2026-05-12 20:50:39 +00:00
Updated OpenGL calls to no longer be deprecated (#83)
- updated SharpCompress 0.47.4 -> 0.48.0 (security) - set ProcessResult to be nullable (since it is) Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/83
This commit is contained in:
parent
5d8cb3e378
commit
1f9bfab923
7 changed files with 22 additions and 20 deletions
|
|
@ -8,7 +8,7 @@
|
||||||
<PackageVersion Include="Avalonia.Desktop" Version="11.3.14" />
|
<PackageVersion Include="Avalonia.Desktop" Version="11.3.14" />
|
||||||
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.14" />
|
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.14" />
|
||||||
<PackageVersion Include="Avalonia.Markup.Xaml.Loader" Version="11.3.14" />
|
<PackageVersion Include="Avalonia.Markup.Xaml.Loader" Version="11.3.14" />
|
||||||
<PackageVersion Include="SharpCompress" Version="0.47.4" />
|
<PackageVersion Include="SharpCompress" Version="0.48.0" />
|
||||||
<PackageVersion Include="Svg.Controls.Avalonia" Version="11.3.9.5" />
|
<PackageVersion Include="Svg.Controls.Avalonia" Version="11.3.9.5" />
|
||||||
<PackageVersion Include="Svg.Controls.Skia.Avalonia" Version="11.3.9.5" />
|
<PackageVersion Include="Svg.Controls.Skia.Avalonia" Version="11.3.9.5" />
|
||||||
<PackageVersion Include="Microsoft.Build.Framework" Version="17.11.4" />
|
<PackageVersion Include="Microsoft.Build.Framework" Version="17.11.4" />
|
||||||
|
|
|
||||||
|
|
@ -551,7 +551,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
|
||||||
level,
|
level,
|
||||||
x,
|
x,
|
||||||
width,
|
width,
|
||||||
format.PixelFormat,
|
(InternalFormat) format.PixelFormat,
|
||||||
mipSize,
|
mipSize,
|
||||||
data);
|
data);
|
||||||
}
|
}
|
||||||
|
|
@ -579,7 +579,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
|
||||||
layer,
|
layer,
|
||||||
width,
|
width,
|
||||||
1,
|
1,
|
||||||
format.PixelFormat,
|
(InternalFormat) format.PixelFormat,
|
||||||
mipSize,
|
mipSize,
|
||||||
data);
|
data);
|
||||||
}
|
}
|
||||||
|
|
@ -609,7 +609,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
|
||||||
y,
|
y,
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
format.PixelFormat,
|
(InternalFormat) format.PixelFormat,
|
||||||
mipSize,
|
mipSize,
|
||||||
data);
|
data);
|
||||||
}
|
}
|
||||||
|
|
@ -643,7 +643,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
1,
|
1,
|
||||||
format.PixelFormat,
|
(InternalFormat) format.PixelFormat,
|
||||||
mipSize,
|
mipSize,
|
||||||
data);
|
data);
|
||||||
}
|
}
|
||||||
|
|
@ -675,7 +675,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
|
||||||
y,
|
y,
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
format.PixelFormat,
|
(InternalFormat) format.PixelFormat,
|
||||||
mipSize,
|
mipSize,
|
||||||
data);
|
data);
|
||||||
}
|
}
|
||||||
|
|
@ -744,7 +744,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
|
||||||
level,
|
level,
|
||||||
0,
|
0,
|
||||||
width,
|
width,
|
||||||
format.PixelFormat,
|
(InternalFormat) format.PixelFormat,
|
||||||
mipSize,
|
mipSize,
|
||||||
data);
|
data);
|
||||||
}
|
}
|
||||||
|
|
@ -773,7 +773,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
|
||||||
0,
|
0,
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
format.PixelFormat,
|
(InternalFormat) format.PixelFormat,
|
||||||
mipSize,
|
mipSize,
|
||||||
data);
|
data);
|
||||||
}
|
}
|
||||||
|
|
@ -807,7 +807,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
depth,
|
depth,
|
||||||
format.PixelFormat,
|
(InternalFormat) format.PixelFormat,
|
||||||
mipSize,
|
mipSize,
|
||||||
data);
|
data);
|
||||||
}
|
}
|
||||||
|
|
@ -843,7 +843,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
|
||||||
0,
|
0,
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
format.PixelFormat,
|
(InternalFormat) format.PixelFormat,
|
||||||
mipSize / 6,
|
mipSize / 6,
|
||||||
data + faceOffset);
|
data + faceOffset);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
public void Map(BufferHandle handle, int size)
|
public void Map(BufferHandle handle, int size)
|
||||||
{
|
{
|
||||||
GL.BindBuffer(BufferTarget.CopyWriteBuffer, handle);
|
GL.BindBuffer(BufferTarget.CopyWriteBuffer, handle);
|
||||||
nint ptr = GL.MapBufferRange(BufferTarget.CopyWriteBuffer, nint.Zero, size, BufferAccessMask.MapReadBit | BufferAccessMask.MapPersistentBit);
|
nint ptr = GL.MapBufferRange(BufferTarget.CopyWriteBuffer, nint.Zero, size, MapBufferAccessMask.MapReadBit | MapBufferAccessMask.MapPersistentBit);
|
||||||
|
|
||||||
_maps[handle] = ptr;
|
_maps[handle] = ptr;
|
||||||
}
|
}
|
||||||
|
|
@ -75,7 +75,7 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
GL.BindBuffer(BufferTarget.CopyWriteBuffer, _copyBufferHandle);
|
GL.BindBuffer(BufferTarget.CopyWriteBuffer, _copyBufferHandle);
|
||||||
GL.BufferStorage(BufferTarget.CopyWriteBuffer, requiredSize, nint.Zero, BufferStorageFlags.MapReadBit | BufferStorageFlags.MapPersistentBit);
|
GL.BufferStorage(BufferTarget.CopyWriteBuffer, requiredSize, nint.Zero, BufferStorageFlags.MapReadBit | BufferStorageFlags.MapPersistentBit);
|
||||||
|
|
||||||
_bufferMap = GL.MapBufferRange(BufferTarget.CopyWriteBuffer, nint.Zero, requiredSize, BufferAccessMask.MapReadBit | BufferAccessMask.MapPersistentBit);
|
_bufferMap = GL.MapBufferRange(BufferTarget.CopyWriteBuffer, nint.Zero, requiredSize, MapBufferAccessMask.MapReadBit | MapBufferAccessMask.MapPersistentBit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -925,7 +925,7 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
GL.CullFace(face.Convert());
|
GL.CullFace((TriangleFace) face.Convert());
|
||||||
|
|
||||||
GL.Enable(EnableCap.CullFace);
|
GL.Enable(EnableCap.CullFace);
|
||||||
}
|
}
|
||||||
|
|
@ -1085,12 +1085,12 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
{
|
{
|
||||||
if (frontMode == backMode)
|
if (frontMode == backMode)
|
||||||
{
|
{
|
||||||
GL.PolygonMode(MaterialFace.FrontAndBack, frontMode.Convert());
|
GL.PolygonMode((TriangleFace) MaterialFace.FrontAndBack, frontMode.Convert());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GL.PolygonMode(MaterialFace.Front, frontMode.Convert());
|
GL.PolygonMode((TriangleFace) MaterialFace.Front, frontMode.Convert());
|
||||||
GL.PolygonMode(MaterialFace.Back, backMode.Convert());
|
GL.PolygonMode((TriangleFace) MaterialFace.Back, backMode.Convert());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
GL.CompileShader(shaderHandle);
|
GL.CompileShader(shaderHandle);
|
||||||
break;
|
break;
|
||||||
case TargetLanguage.Spirv:
|
case TargetLanguage.Spirv:
|
||||||
GL.ShaderBinary(1, ref shaderHandle, (BinaryFormat)All.ShaderBinaryFormatSpirVArb, shader.BinaryCode, shader.BinaryCode.Length);
|
GL.ShaderBinary(1, ref shaderHandle, ShaderBinaryFormat.ShaderBinaryFormatSpirV, shader.BinaryCode, shader.BinaryCode.Length);
|
||||||
GL.SpecializeShader(shaderHandle, "main", 0, (int[])null, (int[])null);
|
GL.SpecializeShader(shaderHandle, "main", 0, (int[])null, (int[])null);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ namespace Ryujinx.Graphics.OpenGL.Queries
|
||||||
GL.BufferStorage(BufferTarget.QueryBuffer, sizeof(long), (nint)(&defaultValue), BufferStorageFlags.MapReadBit | BufferStorageFlags.MapWriteBit | BufferStorageFlags.MapPersistentBit);
|
GL.BufferStorage(BufferTarget.QueryBuffer, sizeof(long), (nint)(&defaultValue), BufferStorageFlags.MapReadBit | BufferStorageFlags.MapWriteBit | BufferStorageFlags.MapPersistentBit);
|
||||||
}
|
}
|
||||||
|
|
||||||
_bufferMap = GL.MapBufferRange(BufferTarget.QueryBuffer, nint.Zero, sizeof(long), BufferAccessMask.MapReadBit | BufferAccessMask.MapWriteBit | BufferAccessMask.MapPersistentBit);
|
_bufferMap = GL.MapBufferRange(BufferTarget.QueryBuffer, nint.Zero, sizeof(long), MapBufferAccessMask.MapReadBit | MapBufferAccessMask.MapWriteBit | MapBufferAccessMask.MapPersistentBit);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Reset()
|
public void Reset()
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ namespace Ryujinx.HLE.Loaders.Processes
|
||||||
|
|
||||||
private ulong _latestPid;
|
private ulong _latestPid;
|
||||||
|
|
||||||
|
#nullable enable
|
||||||
public ProcessResult? ActiveApplication
|
public ProcessResult? ActiveApplication
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
@ -44,6 +45,7 @@ namespace Ryujinx.HLE.Loaders.Processes
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
public ProcessLoader(Switch device)
|
public ProcessLoader(Switch device)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue