aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Shader/Cache/Definition/GuestShaderCacheEntryHeader.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2021-08-11 15:59:42 -0300
committerGitHub <noreply@github.com>2021-08-11 20:59:42 +0200
commitd9d18439f6900fd9f05bde41998526281f7638c5 (patch)
tree14e8cd74e10ca9c92d1b85ccf17cecad00e3a8f7 /Ryujinx.Graphics.Gpu/Shader/Cache/Definition/GuestShaderCacheEntryHeader.cs
parent70f79e689bc947313aab11c41e59928ce43be517 (diff)
Use a new approach for shader BRX targets (#2532)
* Use a new approach for shader BRX targets * Make shader cache actually work * Improve the shader pattern matching a bit * Extend LDC search to predecessor blocks, catches more cases * Nit * Only save the amount of constant buffer data actually used. Avoids crashes on partially mapped buffers * Ignore Rd on predicate instructions, as they do not have a Rd register (catches more cases)
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Shader/Cache/Definition/GuestShaderCacheEntryHeader.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Shader/Cache/Definition/GuestShaderCacheEntryHeader.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/Ryujinx.Graphics.Gpu/Shader/Cache/Definition/GuestShaderCacheEntryHeader.cs b/Ryujinx.Graphics.Gpu/Shader/Cache/Definition/GuestShaderCacheEntryHeader.cs
index 6d5bb28d..9b22cac5 100644
--- a/Ryujinx.Graphics.Gpu/Shader/Cache/Definition/GuestShaderCacheEntryHeader.cs
+++ b/Ryujinx.Graphics.Gpu/Shader/Cache/Definition/GuestShaderCacheEntryHeader.cs
@@ -40,9 +40,9 @@ namespace Ryujinx.Graphics.Gpu.Shader.Cache.Definition
public int SizeA;
/// <summary>
- /// Unused/reserved.
+ /// Constant buffer 1 data size.
/// </summary>
- public int Reserved4;
+ public int Cb1DataSize;
/// <summary>
/// The header of the cached gpu accessor.
@@ -55,12 +55,14 @@ namespace Ryujinx.Graphics.Gpu.Shader.Cache.Definition
/// <param name="stage">The stage of this shader</param>
/// <param name="size">The size of the code section</param>
/// <param name="sizeA">The size of the code2 section if present (Vertex A)</param>
+ /// <param name="cb1DataSize">Constant buffer 1 data size</param>
/// <param name="gpuAccessorHeader">The header of the cached gpu accessor</param>
- public GuestShaderCacheEntryHeader(ShaderStage stage, int size, int sizeA, GuestGpuAccessorHeader gpuAccessorHeader) : this()
+ public GuestShaderCacheEntryHeader(ShaderStage stage, int size, int sizeA, int cb1DataSize, GuestGpuAccessorHeader gpuAccessorHeader) : this()
{
Stage = stage;
- Size = size;
+ Size = size;
SizeA = sizeA;
+ Cb1DataSize = cb1DataSize;
GpuAccessorHeader = gpuAccessorHeader;
}
}