Compare commits

..

2 Commits

Author SHA1 Message Date
Renovate Bot
9b88fee78f Update avalonia monorepo to 11.3.17 (#122)
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [Avalonia](https://avaloniaui.net/?utm_source=nuget&utm_medium=referral&utm_content=project_homepage_link) ([source](https://github.com/AvaloniaUI/Avalonia)) | `11.3.15` → `11.3.17` | ![age](https://developer.mend.io/api/mc/badges/age/nuget/Avalonia/11.3.17?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/Avalonia/11.3.15/11.3.17?slim=true) |
| [Avalonia.Desktop](https://avaloniaui.net/?utm_source=nuget&utm_medium=referral&utm_content=project_homepage_link) ([source](https://github.com/AvaloniaUI/Avalonia)) | `11.3.15` → `11.3.17` | ![age](https://developer.mend.io/api/mc/badges/age/nuget/Avalonia.Desktop/11.3.17?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/Avalonia.Desktop/11.3.15/11.3.17?slim=true) |
| [Avalonia.Diagnostics](https://avaloniaui.net/?utm_source=nuget&utm_medium=referral&utm_content=project_homepage_link) ([source](https://github.com/AvaloniaUI/Avalonia)) | `11.3.15` → `11.3.17` | ![age](https://developer.mend.io/api/mc/badges/age/nuget/Avalonia.Diagnostics/11.3.17?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/Avalonia.Diagnostics/11.3.15/11.3.17?slim=true) |
| [Avalonia.Markup.Xaml.Loader](https://avaloniaui.net/?utm_source=nuget&utm_medium=referral&utm_content=project_homepage_link) ([source](https://github.com/AvaloniaUI/Avalonia)) | `11.3.15` → `11.3.17` | ![age](https://developer.mend.io/api/mc/badges/age/nuget/Avalonia.Markup.Xaml.Loader/11.3.17?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/Avalonia.Markup.Xaml.Loader/11.3.15/11.3.17?slim=true) |

---

### Release Notes

<details>
<summary>AvaloniaUI/Avalonia (Avalonia)</summary>

### [`v11.3.17`](https://github.com/AvaloniaUI/Avalonia/releases/tag/11.3.17)

[Compare Source](https://github.com/AvaloniaUI/Avalonia/compare/11.3.16...11.3.17)

##### What's Changed

##### Performance

- XAML – Improve type caching in the XAML compiler by [@&#8203;MrJul](https://github.com/MrJul) in [#&#8203;21408](https://github.com/AvaloniaUI/Avalonia/pull/21408)

**Full Changelog**: <https://github.com/AvaloniaUI/Avalonia/compare/11.3.16...11.3.17>

### [`v11.3.16`](https://github.com/AvaloniaUI/Avalonia/releases/tag/11.3.16)

[Compare Source](https://github.com/AvaloniaUI/Avalonia/compare/11.3.15...11.3.16)

##### What's Changed

- Core – Align Touch/Pen capture semantics with Mouse by [@&#8203;miloush](https://github.com/miloush) in [#&#8203;21363](https://github.com/AvaloniaUI/Avalonia/pull/21363)

**Full Changelog**: <https://github.com/AvaloniaUI/Avalonia/compare/11.3.15...11.3.16>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNzguMCIsInVwZGF0ZWRJblZlciI6IjQzLjE3OC4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->

Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/122
2026-05-31 10:17:09 +00:00
KeatonTheBot
04574103cf Replace shaderc.net with Silk.NET.Shaderc (#124)
Unpublished branch from gdkchan. Replaces the outdated `shaderc.net` package with `Silk.NET.Shaderc`, which is continually updated with the Silk.NET package suite.

Co-authored-by: gdkchan <gab.dark.100@gmail.com>
Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/124
2026-05-31 10:16:47 +00:00
3 changed files with 26 additions and 36 deletions

View File

@@ -3,11 +3,11 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Avalonia" Version="11.3.15" />
<PackageVersion Include="Avalonia" Version="11.3.17" />
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.3.13" />
<PackageVersion Include="Avalonia.Desktop" Version="11.3.15" />
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.15" />
<PackageVersion Include="Avalonia.Markup.Xaml.Loader" Version="11.3.15" />
<PackageVersion Include="Avalonia.Desktop" Version="11.3.17" />
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.17" />
<PackageVersion Include="Avalonia.Markup.Xaml.Loader" Version="11.3.17" />
<PackageVersion Include="SharpCompress" Version="0.48.1" />
<PackageVersion Include="Svg.Controls.Avalonia" Version="11.3.9.5" />
<PackageVersion Include="Svg.Controls.Skia.Avalonia" Version="11.3.9.5" />
@@ -52,8 +52,8 @@
<PackageVersion Include="Gommon" Version="2.8.1.2" />
<PackageVersion Include="securifybv.ShellLink" Version="0.1.0" />
<PackageVersion Include="Sep" Version="0.14.1" />
<PackageVersion Include="shaderc.net" Version="0.1.0" />
<PackageVersion Include="SharpZipLib" Version="1.4.2" />
<PackageVersion Include="Silk.NET.Shaderc" Version="2.23.0" />
<PackageVersion Include="Silk.NET.Vulkan" Version="2.23.0" />
<PackageVersion Include="Silk.NET.Vulkan.Extensions.EXT" Version="2.23.0" />
<PackageVersion Include="Silk.NET.Vulkan.Extensions.KHR" Version="2.23.0" />

View File

@@ -52,7 +52,7 @@
<ItemGroup>
<PackageReference Include="OpenTK.Windowing.GraphicsLibraryFramework" />
<PackageReference Include="shaderc.net" />
<PackageReference Include="Silk.NET.Shaderc" ExcludeAssets="native" />
<PackageReference Include="Silk.NET.Vulkan" />
<PackageReference Include="Silk.NET.Vulkan.Extensions.EXT" />
<PackageReference Include="Silk.NET.Vulkan.Extensions.KHR" />

View File

@@ -1,22 +1,17 @@
using Ryujinx.Common.Logging;
using Ryujinx.Graphics.GAL;
using Ryujinx.Graphics.Shader;
using shaderc;
using Silk.NET.Shaderc;
using Silk.NET.Vulkan;
using System;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using Result = shaderc.Result;
namespace Ryujinx.Graphics.Vulkan
{
class Shader : IDisposable
{
// The shaderc.net dependency's Options constructor and dispose are not thread safe.
// Take this lock when using them.
private static readonly Lock _shaderOptionsLock = new();
private static readonly nint _ptrMainEntryPointName = Marshal.StringToHGlobalAnsi("main");
private readonly Vk _api;
@@ -75,38 +70,33 @@ namespace Ryujinx.Graphics.Vulkan
private unsafe static byte[] GlslToSpirv(string glsl, ShaderStage stage)
{
Options options;
Shaderc api = Shaderc.GetApi();
Compiler* compiler = api.CompilerInitialize();
CompileOptions* options = api.CompileOptionsInitialize();
lock (_shaderOptionsLock)
api.CompileOptionsSetSourceLanguage(options, SourceLanguage.Glsl);
api.CompileOptionsSetTargetSpirv(options, SpirvVersion.Shaderc15);
api.CompileOptionsSetTargetEnv(options, TargetEnv.Vulkan, Vk.Version12);
CompilationResult* scr = api.CompileIntoSpv(compiler, glsl, (nuint)glsl.Length, GetShaderCShaderStage(stage), "Ryu", "main", options);
CompilationStatus status = api.ResultGetCompilationStatus(scr);
if (status != CompilationStatus.Success)
{
options = new Options(false)
{
SourceLanguage = SourceLanguage.Glsl,
TargetSpirVVersion = new SpirVVersion(1, 5),
};
}
options.SetTargetEnvironment(TargetEnvironment.Vulkan, EnvironmentVersion.Vulkan_1_2);
Compiler compiler = new(options);
Result scr = compiler.Compile(glsl, "Ryu", GetShaderCShaderStage(stage));
lock (_shaderOptionsLock)
{
options.Dispose();
}
if (scr.Status != Status.Success)
{
Logger.Error?.Print(LogClass.Gpu, $"Shader compilation error: {scr.Status} {scr.ErrorMessage}");
Logger.Error?.Print(LogClass.Gpu, $"Shader compilation error: {status} {api.ResultGetErrorMessageS(scr)}");
return null;
}
Span<byte> spirvBytes = new((void*)scr.CodePointer, (int)scr.CodeLength);
Span<byte> spirvBytes = new(api.ResultGetBytes(scr), (int)api.ResultGetLength(scr));
byte[] code = new byte[(scr.CodeLength + 3) & ~3];
byte[] code = new byte[(spirvBytes.Length + 3) & ~3];
spirvBytes.CopyTo(code.AsSpan()[..(int)scr.CodeLength]);
spirvBytes.CopyTo(code.AsSpan()[..spirvBytes.Length]);
api.CompilerRelease(compiler);
api.CompileOptionsRelease(options);
return code;
}