Re-merge "Vulkan: Feedback loop detection and barriers (#7226)"

This re-merges commit ca59c3f499.
This commit is contained in:
KeatonTheBot
2025-04-21 22:18:59 -05:00
parent 5da6c490b3
commit 0e810e1e96
17 changed files with 533 additions and 61 deletions
+24
View File
@@ -0,0 +1,24 @@
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace Ryujinx.Common.Utilities
{
public partial class OsUtils
{
[LibraryImport("libc", SetLastError = true)]
private static partial int setenv([MarshalAs(UnmanagedType.LPStr)] string name, [MarshalAs(UnmanagedType.LPStr)] string value, int overwrite);
public static void SetEnvironmentVariableNoCaching(string key, string value)
{
// Set the value in the cached environment variables, too.
Environment.SetEnvironmentVariable(key, value);
if (!OperatingSystem.IsWindows())
{
int res = setenv(key, value, 1);
Debug.Assert(res != -1);
}
}
}
}