mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-09-22 02:31:12 +02:00
Revert PRs 7226(1.1.1385), 7311(1.1.1392), and 7312 (1.1.1396).
* "Vulkan: Feedback loop detection and barriers (#7226)" * "Change image format view handling to allow view incompatible formats (#7311)" * "Add support for sampler sRGB disable (#7312)" * These changes prevent slowdowns in several areas in Paper Mario: The Thousand Year Door, possibly other games.
This commit is contained in:
@@ -13,6 +13,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
{
|
||||
public TextureStorage Storage;
|
||||
public TextureView View;
|
||||
public GAL.Format ImageFormat;
|
||||
}
|
||||
|
||||
private readonly TextureRef[] _textureRefs;
|
||||
@@ -51,6 +52,16 @@ 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++)
|
||||
@@ -131,7 +142,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)
|
||||
if (i > 0 && _textureRefs[i - 1].View == refs.View && _textureRefs[i - 1].ImageFormat == refs.ImageFormat)
|
||||
{
|
||||
texture = textures[i - 1];
|
||||
|
||||
@@ -139,7 +150,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
}
|
||||
|
||||
texture.ImageLayout = ImageLayout.General;
|
||||
texture.ImageView = refs.View?.GetIdentityImageView().Get(cbs).Value ?? default;
|
||||
texture.ImageView = refs.View?.GetView(refs.ImageFormat).GetIdentityImageView().Get(cbs).Value ?? default;
|
||||
|
||||
if (texture.ImageView.Handle == 0)
|
||||
{
|
||||
@@ -156,7 +167,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
|
||||
for (int i = 0; i < bufferTextures.Length; i++)
|
||||
{
|
||||
bufferTextures[i] = _bufferTextureRefs[i]?.GetBufferView(cbs, true) ?? default;
|
||||
bufferTextures[i] = _bufferTextureRefs[i]?.GetBufferView(cbs, _textureRefs[i].ImageFormat, true) ?? default;
|
||||
}
|
||||
|
||||
return bufferTextures;
|
||||
|
||||
Reference in New Issue
Block a user