From 53565831e8f9d10b0c37bdc08ff499b1734895ca Mon Sep 17 00:00:00 2001 From: sunshineinabox Date: Mon, 22 Jul 2024 18:14:10 -0700 Subject: [PATCH] Renamed variable to be more descriptive --- src/Ryujinx.Graphics.Vulkan/PipelineConverter.cs | 16 ++++++++-------- src/Ryujinx.Graphics.Vulkan/TextureStorage.cs | 10 +++++----- src/Ryujinx.Graphics.Vulkan/TextureView.cs | 6 +++--- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/Ryujinx.Graphics.Vulkan/PipelineConverter.cs b/src/Ryujinx.Graphics.Vulkan/PipelineConverter.cs index 77fb6ce27..66f83eb80 100644 --- a/src/Ryujinx.Graphics.Vulkan/PipelineConverter.cs +++ b/src/Ryujinx.Graphics.Vulkan/PipelineConverter.cs @@ -29,17 +29,17 @@ namespace Ryujinx.Graphics.Vulkan int colorCount = 0; int maxColorAttachmentIndex = -1; - bool supportsIsNotMsOrSupportsStorage = gd.Capabilities.SupportsShaderStorageImageMultisample || + bool isNotMsOrSupportsStorage = gd.Capabilities.SupportsShaderStorageImageMultisample || !state.DepthStencilFormat.IsImageCompatible(); for (int i = 0; i < state.AttachmentEnable.Length; i++) { if (state.AttachmentEnable[i]) { - bool supportsIsNotMsOrSupportsStorageAttachments = gd.Capabilities.SupportsShaderStorageImageMultisample || + bool isNotMsOrSupportsStorageAttachments = gd.Capabilities.SupportsShaderStorageImageMultisample || !state.AttachmentFormats[i].IsImageCompatible(); - attachmentFormats[attachmentCount] = gd.FormatCapabilities.ConvertToVkFormat(state.AttachmentFormats[i], supportsIsNotMsOrSupportsStorageAttachments); + attachmentFormats[attachmentCount] = gd.FormatCapabilities.ConvertToVkFormat(state.AttachmentFormats[i], isNotMsOrSupportsStorageAttachments); attachmentIndices[attachmentCount++] = i; colorCount++; @@ -49,7 +49,7 @@ namespace Ryujinx.Graphics.Vulkan if (state.DepthStencilEnable) { - attachmentFormats[attachmentCount++] = gd.FormatCapabilities.ConvertToVkFormat(state.DepthStencilFormat, supportsIsNotMsOrSupportsStorage); + attachmentFormats[attachmentCount++] = gd.FormatCapabilities.ConvertToVkFormat(state.DepthStencilFormat, isNotMsOrSupportsStorage); } if (attachmentCount != 0) @@ -302,10 +302,10 @@ namespace Ryujinx.Graphics.Vulkan { if (state.AttachmentEnable[i]) { - bool supportsIsNotMsOrSupportsStorage = gd.Capabilities.SupportsShaderStorageImageMultisample || + bool isNotMsOrSupportsStorage = gd.Capabilities.SupportsShaderStorageImageMultisample || !state.AttachmentFormats[i].IsImageCompatible(); - pipeline.Internal.AttachmentFormats[attachmentCount++] = gd.FormatCapabilities.ConvertToVkFormat(state.AttachmentFormats[i], supportsIsNotMsOrSupportsStorage); + pipeline.Internal.AttachmentFormats[attachmentCount++] = gd.FormatCapabilities.ConvertToVkFormat(state.AttachmentFormats[i], isNotMsOrSupportsStorage); maxColorAttachmentIndex = i; if (state.AttachmentFormats[i].IsInteger()) @@ -319,10 +319,10 @@ namespace Ryujinx.Graphics.Vulkan if (state.DepthStencilEnable) { - bool supportsIsNotMsOrSupportsStorage = !state.DepthStencilFormat.IsImageCompatible() || + bool isNotMsOrSupportsStorage = !state.DepthStencilFormat.IsImageCompatible() || gd.Capabilities.SupportsShaderStorageImageMultisample; - pipeline.Internal.AttachmentFormats[attachmentCount++] = gd.FormatCapabilities.ConvertToVkFormat(state.DepthStencilFormat, supportsIsNotMsOrSupportsStorage); + pipeline.Internal.AttachmentFormats[attachmentCount++] = gd.FormatCapabilities.ConvertToVkFormat(state.DepthStencilFormat, isNotMsOrSupportsStorage); } pipeline.ColorBlendAttachmentStateCount = (uint)(maxColorAttachmentIndex + 1); diff --git a/src/Ryujinx.Graphics.Vulkan/TextureStorage.cs b/src/Ryujinx.Graphics.Vulkan/TextureStorage.cs index f78075b65..f15e4b967 100644 --- a/src/Ryujinx.Graphics.Vulkan/TextureStorage.cs +++ b/src/Ryujinx.Graphics.Vulkan/TextureStorage.cs @@ -67,9 +67,9 @@ namespace Ryujinx.Graphics.Vulkan _device = device; _info = info; - bool supportsIsNotMsOrSupportsStorage = gd.Capabilities.SupportsShaderStorageImageMultisample || !info.Target.IsMultisample(); + bool isNotMsOrSupportsStorage = gd.Capabilities.SupportsShaderStorageImageMultisample || !info.Target.IsMultisample(); - var format = _gd.FormatCapabilities.ConvertToVkFormat(info.Format, supportsIsNotMsOrSupportsStorage); + var format = _gd.FormatCapabilities.ConvertToVkFormat(info.Format, isNotMsOrSupportsStorage); var levels = (uint)info.Levels; var layers = (uint)info.GetLayers(); var depth = (uint)(info.Target == Target.Texture3D ? info.Depth : 1); @@ -82,7 +82,7 @@ namespace Ryujinx.Graphics.Vulkan var sampleCountFlags = ConvertToSampleCountFlags(gd.Capabilities.SupportedSampleCounts, (uint)info.Samples); - var usage = GetImageUsage(info.Format, supportsIsNotMsOrSupportsStorage, true); + var usage = GetImageUsage(info.Format, isNotMsOrSupportsStorage, true); var flags = ImageCreateFlags.CreateMutableFormatBit | ImageCreateFlags.CreateExtendedUsageBit; @@ -294,7 +294,7 @@ namespace Ryujinx.Graphics.Vulkan } } - public static ImageUsageFlags GetImageUsage(Format format, bool supportsIsNotMsOrSupportsStorage, bool extendedUsage) + public static ImageUsageFlags GetImageUsage(Format format, bool isNotMsOrSupportsStorage, bool extendedUsage) { var usage = DefaultUsageFlags; @@ -307,7 +307,7 @@ namespace Ryujinx.Graphics.Vulkan usage |= ImageUsageFlags.ColorAttachmentBit; } - if ((format.IsImageCompatible() && supportsIsNotMsOrSupportsStorage) || extendedUsage) + if ((format.IsImageCompatible() && isNotMsOrSupportsStorage) || extendedUsage) { usage |= ImageUsageFlags.StorageBit; } diff --git a/src/Ryujinx.Graphics.Vulkan/TextureView.cs b/src/Ryujinx.Graphics.Vulkan/TextureView.cs index 75dc321dd..a6f5850e9 100644 --- a/src/Ryujinx.Graphics.Vulkan/TextureView.cs +++ b/src/Ryujinx.Graphics.Vulkan/TextureView.cs @@ -59,10 +59,10 @@ namespace Ryujinx.Graphics.Vulkan gd.Textures.Add(this); - bool supportsIsNotMsOrSupportsStorage = gd.Capabilities.SupportsShaderStorageImageMultisample || !info.Target.IsMultisample(); + bool isNotMsOrSupportsStorage = gd.Capabilities.SupportsShaderStorageImageMultisample || !info.Target.IsMultisample(); - var format = _gd.FormatCapabilities.ConvertToVkFormat(info.Format, supportsIsNotMsOrSupportsStorage); - var usage = TextureStorage.GetImageUsage(info.Format, supportsIsNotMsOrSupportsStorage, false); + var format = _gd.FormatCapabilities.ConvertToVkFormat(info.Format, isNotMsOrSupportsStorage); + var usage = TextureStorage.GetImageUsage(info.Format, isNotMsOrSupportsStorage, false); var levels = (uint)info.Levels; var layers = (uint)info.GetLayers();