From 89a70f2aa38b934ea620f40f9b37f94a937cdc4c Mon Sep 17 00:00:00 2001 From: sunshineinabox Date: Sun, 1 Sep 2024 22:04:41 -0700 Subject: [PATCH] Rename variable and resolve a missed change --- src/Ryujinx.Graphics.Vulkan/TextureStorage.cs | 10 +++++----- src/Ryujinx.Graphics.Vulkan/TextureView.cs | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Ryujinx.Graphics.Vulkan/TextureStorage.cs b/src/Ryujinx.Graphics.Vulkan/TextureStorage.cs index 5c63269f1..51ef528d4 100644 --- a/src/Ryujinx.Graphics.Vulkan/TextureStorage.cs +++ b/src/Ryujinx.Graphics.Vulkan/TextureStorage.cs @@ -77,9 +77,9 @@ namespace Ryujinx.Graphics.Vulkan _device = device; _info = info; - bool isNotMsOrSupportsStorage = gd.Capabilities.SupportsShaderStorageImageMultisample || !info.Target.IsMultisample(); + bool isMsImageStorageSupported = gd.Capabilities.SupportsShaderStorageImageMultisample || !info.Target.IsMultisample(); - var format = _gd.FormatCapabilities.ConvertToVkFormat(info.Format, isNotMsOrSupportsStorage); + var format = _gd.FormatCapabilities.ConvertToVkFormat(info.Format, isMsImageStorageSupported); var levels = (uint)info.Levels; var layers = (uint)info.GetLayers(); var depth = (uint)(info.Target == Target.Texture3D ? info.Depth : 1); @@ -93,7 +93,7 @@ namespace Ryujinx.Graphics.Vulkan var sampleCountFlags = ConvertToSampleCountFlags(gd.Capabilities.SupportedSampleCounts, (uint)info.Samples); - var usage = GetImageUsage(info.Format, gd.Capabilities, isNotMsOrSupportsStorage, true); + var usage = GetImageUsage(info.Format, gd.Capabilities, isMsImageStorageSupported, true); var flags = ImageCreateFlags.CreateMutableFormatBit | ImageCreateFlags.CreateExtendedUsageBit; @@ -307,7 +307,7 @@ namespace Ryujinx.Graphics.Vulkan } } - public static ImageUsageFlags GetImageUsage(Format format in HardwareCapabilities capabilities, bool isNotMsOrSupportsStorage, bool extendedUsage) + public static ImageUsageFlags GetImageUsage(Format format, in HardwareCapabilities capabilities, bool isMsImageStorageSupported, bool extendedUsage) { var usage = DefaultUsageFlags; @@ -320,7 +320,7 @@ namespace Ryujinx.Graphics.Vulkan usage |= ImageUsageFlags.ColorAttachmentBit; } - if ((format.IsImageCompatible() && isNotMsOrSupportsStorage) || extendedUsage) + if ((format.IsImageCompatible() && isMsImageStorageSupported) || extendedUsage) { usage |= ImageUsageFlags.StorageBit; } diff --git a/src/Ryujinx.Graphics.Vulkan/TextureView.cs b/src/Ryujinx.Graphics.Vulkan/TextureView.cs index dba26b4bc..b69cb2b4a 100644 --- a/src/Ryujinx.Graphics.Vulkan/TextureView.cs +++ b/src/Ryujinx.Graphics.Vulkan/TextureView.cs @@ -61,10 +61,10 @@ namespace Ryujinx.Graphics.Vulkan gd.Textures.Add(this); - bool isNotMsOrSupportsStorage = gd.Capabilities.SupportsShaderStorageImageMultisample || !info.Target.IsMultisample(); + bool isMsImageStorageSupported = gd.Capabilities.SupportsShaderStorageImageMultisample || !info.Target.IsMultisample(); - var format = _gd.FormatCapabilities.ConvertToVkFormat(info.Format, isNotMsOrSupportsStorage); - var usage = TextureStorage.GetImageUsage(info.Format, gd.Capabilities, isNotMsOrSupportsStorage, false); + var format = _gd.FormatCapabilities.ConvertToVkFormat(info.Format, isMsImageStorageSupported); + var usage = TextureStorage.GetImageUsage(info.Format, gd.Capabilities, isMsImageStorageSupported, false); var levels = (uint)info.Levels; var layers = (uint)info.GetLayers();