diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2024-01-26 13:58:57 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-26 13:58:57 -0300 |
| commit | b8d992e5a770931382fd39108601b0abe75149cc (patch) | |
| tree | 35035d4adebd93fba80ab4bd4ad85b3f275a1bed /src/Ryujinx.Graphics.Vulkan/VulkanException.cs | |
| parent | a620cbcc9050d7d3b0932d97db87628dd4e97b0a (diff) | |
Allow skipping draws with broken pipeline variants on Vulkan (#5807)
* Allow skipping draws with broken pipeline variants on Vulkan
* Move IsLinked check to CreatePipeline
* Restore throw on error behaviour for background compile
* Can't remove SetAlphaTest pragmas yet
* Double new line
Diffstat (limited to 'src/Ryujinx.Graphics.Vulkan/VulkanException.cs')
| -rw-r--r-- | src/Ryujinx.Graphics.Vulkan/VulkanException.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Ryujinx.Graphics.Vulkan/VulkanException.cs b/src/Ryujinx.Graphics.Vulkan/VulkanException.cs index 0d403680..e203a3a2 100644 --- a/src/Ryujinx.Graphics.Vulkan/VulkanException.cs +++ b/src/Ryujinx.Graphics.Vulkan/VulkanException.cs @@ -6,10 +6,16 @@ namespace Ryujinx.Graphics.Vulkan { static class ResultExtensions { + public static bool IsError(this Result result) + { + // Only negative result codes are errors. + return result < Result.Success; + } + public static void ThrowOnError(this Result result) { // Only negative result codes are errors. - if ((int)result < (int)Result.Success) + if (result.IsError()) { throw new VulkanException(result); } |
