From b8d992e5a770931382fd39108601b0abe75149cc Mon Sep 17 00:00:00 2001 From: gdkchan Date: Fri, 26 Jan 2024 13:58:57 -0300 Subject: 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 --- src/Ryujinx.Graphics.Vulkan/VulkanException.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/Ryujinx.Graphics.Vulkan/VulkanException.cs') 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); } -- cgit v1.2.3