aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Vulkan/FramebufferParams.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Vulkan/FramebufferParams.cs')
-rw-r--r--Ryujinx.Graphics.Vulkan/FramebufferParams.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Vulkan/FramebufferParams.cs b/Ryujinx.Graphics.Vulkan/FramebufferParams.cs
index 1b99a609..751ef5eb 100644
--- a/Ryujinx.Graphics.Vulkan/FramebufferParams.cs
+++ b/Ryujinx.Graphics.Vulkan/FramebufferParams.cs
@@ -140,6 +140,25 @@ namespace Ryujinx.Graphics.Vulkan
return _attachments[index];
}
+ public ComponentType GetAttachmentComponentType(int index)
+ {
+ if (_colors != null && (uint)index < _colors.Length)
+ {
+ var format = _colors[index].Info.Format;
+
+ if (format.IsSint())
+ {
+ return ComponentType.SignedInteger;
+ }
+ else if (format.IsUint())
+ {
+ return ComponentType.UnsignedInteger;
+ }
+ }
+
+ return ComponentType.Float;
+ }
+
public bool IsValidColorAttachment(int bindIndex)
{
return (uint)bindIndex < Constants.MaxRenderTargets && (_validColorAttachments & (1u << bindIndex)) != 0;