|
@@ -21,6 +21,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|
|
public uint[] AttachmentSamples { get; }
|
|
public uint[] AttachmentSamples { get; }
|
|
|
public VkFormat[] AttachmentFormats { get; }
|
|
public VkFormat[] AttachmentFormats { get; }
|
|
|
public int[] AttachmentIndices { get; }
|
|
public int[] AttachmentIndices { get; }
|
|
|
|
|
+ public uint AttachmentIntegerFormatMask { get; }
|
|
|
|
|
|
|
|
public int AttachmentsCount { get; }
|
|
public int AttachmentsCount { get; }
|
|
|
public int MaxColorAttachmentIndex => AttachmentIndices.Length > 0 ? AttachmentIndices[AttachmentIndices.Length - 1] : -1;
|
|
public int MaxColorAttachmentIndex => AttachmentIndices.Length > 0 ? AttachmentIndices[AttachmentIndices.Length - 1] : -1;
|
|
@@ -74,6 +75,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|
|
|
|
|
|
|
int index = 0;
|
|
int index = 0;
|
|
|
int bindIndex = 0;
|
|
int bindIndex = 0;
|
|
|
|
|
+ uint attachmentIntegerFormatMask = 0;
|
|
|
|
|
|
|
|
foreach (ITexture color in colors)
|
|
foreach (ITexture color in colors)
|
|
|
{
|
|
{
|
|
@@ -89,6 +91,11 @@ namespace Ryujinx.Graphics.Vulkan
|
|
|
AttachmentFormats[index] = texture.VkFormat;
|
|
AttachmentFormats[index] = texture.VkFormat;
|
|
|
AttachmentIndices[index] = bindIndex;
|
|
AttachmentIndices[index] = bindIndex;
|
|
|
|
|
|
|
|
|
|
+ if (texture.Info.Format.IsInteger())
|
|
|
|
|
+ {
|
|
|
|
|
+ attachmentIntegerFormatMask |= 1u << bindIndex;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
width = Math.Min(width, (uint)texture.Width);
|
|
width = Math.Min(width, (uint)texture.Width);
|
|
|
height = Math.Min(height, (uint)texture.Height);
|
|
height = Math.Min(height, (uint)texture.Height);
|
|
|
layers = Math.Min(layers, (uint)texture.Layers);
|
|
layers = Math.Min(layers, (uint)texture.Layers);
|
|
@@ -102,6 +109,8 @@ namespace Ryujinx.Graphics.Vulkan
|
|
|
bindIndex++;
|
|
bindIndex++;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ AttachmentIntegerFormatMask = attachmentIntegerFormatMask;
|
|
|
|
|
+
|
|
|
if (depthStencil is TextureView dsTexture && dsTexture.Valid)
|
|
if (depthStencil is TextureView dsTexture && dsTexture.Valid)
|
|
|
{
|
|
{
|
|
|
_attachments[count - 1] = dsTexture.GetImageViewForAttachment();
|
|
_attachments[count - 1] = dsTexture.GetImageViewForAttachment();
|