aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Vulkan/ImageArray.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2024-09-17 15:52:30 -0300
committerGitHub <noreply@github.com>2024-09-17 15:52:30 -0300
commiteb8132b627d3c0285dd199f4e40c6f3800bdb22d (patch)
tree970a119909a0dd901bbd8cb5454b725a08e329b3 /src/Ryujinx.Graphics.Vulkan/ImageArray.cs
parentccf96bf5e673456ec80f72725e4c9afa4e4c5a85 (diff)
Change image format view handling to allow view incompatible formats (#7311)
* Allow creating texture aliases on texture pool * Delete old image format override code * New format incompatible alias * Missing bounds check * GetForBinding now takes FormatInfo * Make FormatInfo struct more compact
Diffstat (limited to 'src/Ryujinx.Graphics.Vulkan/ImageArray.cs')
-rw-r--r--src/Ryujinx.Graphics.Vulkan/ImageArray.cs17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/Ryujinx.Graphics.Vulkan/ImageArray.cs b/src/Ryujinx.Graphics.Vulkan/ImageArray.cs
index 467b0111..019286d2 100644
--- a/src/Ryujinx.Graphics.Vulkan/ImageArray.cs
+++ b/src/Ryujinx.Graphics.Vulkan/ImageArray.cs
@@ -13,7 +13,6 @@ namespace Ryujinx.Graphics.Vulkan
{
public TextureStorage Storage;
public TextureView View;
- public GAL.Format ImageFormat;
}
private readonly TextureRef[] _textureRefs;
@@ -52,16 +51,6 @@ namespace Ryujinx.Graphics.Vulkan
_isBuffer = isBuffer;
}
- public void SetFormats(int index, GAL.Format[] imageFormats)
- {
- for (int i = 0; i < imageFormats.Length; i++)
- {
- _textureRefs[index + i].ImageFormat = imageFormats[i];
- }
-
- SetDirty();
- }
-
public void SetImages(int index, ITexture[] images)
{
for (int i = 0; i < images.Length; i++)
@@ -142,7 +131,7 @@ namespace Ryujinx.Graphics.Vulkan
ref var texture = ref textures[i];
ref var refs = ref _textureRefs[i];
- if (i > 0 && _textureRefs[i - 1].View == refs.View && _textureRefs[i - 1].ImageFormat == refs.ImageFormat)
+ if (i > 0 && _textureRefs[i - 1].View == refs.View)
{
texture = textures[i - 1];
@@ -150,7 +139,7 @@ namespace Ryujinx.Graphics.Vulkan
}
texture.ImageLayout = ImageLayout.General;
- texture.ImageView = refs.View?.GetView(refs.ImageFormat).GetIdentityImageView().Get(cbs).Value ?? default;
+ texture.ImageView = refs.View?.GetIdentityImageView().Get(cbs).Value ?? default;
if (texture.ImageView.Handle == 0)
{
@@ -167,7 +156,7 @@ namespace Ryujinx.Graphics.Vulkan
for (int i = 0; i < bufferTextures.Length; i++)
{
- bufferTextures[i] = _bufferTextureRefs[i]?.GetBufferView(cbs, _textureRefs[i].ImageFormat, true) ?? default;
+ bufferTextures[i] = _bufferTextureRefs[i]?.GetBufferView(cbs, true) ?? default;
}
return bufferTextures;