aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Shader/ComputeShaderCacheHashTable.cs
diff options
context:
space:
mode:
authorriperiperi <rhy3756547@hotmail.com>2022-11-17 17:47:41 +0000
committerGitHub <noreply@github.com>2022-11-17 18:47:41 +0100
commit33a4d7d1badbebd2dc05114ef17c85678baed843 (patch)
treedbf7fd4adb24d59a5adceca6c0cc36099064f917 /Ryujinx.Graphics.Gpu/Shader/ComputeShaderCacheHashTable.cs
parent391e08dd27661b72674f91450ac00d1363938251 (diff)
GPU: Eliminate CB0 accesses when storage buffer accesses are resolved (#3847)1.1.355
* Eliminate CB0 accesses Still some work to do, decouple from hle? * Forgot the important part somehow * Fix and improve alignment test * Address Feedback * Remove some complexity when checking storage buffer alignment * Update Ryujinx.Graphics.Shader/Translation/Optimizations/GlobalToStorage.cs Co-authored-by: gdkchan <gab.dark.100@gmail.com> Co-authored-by: gdkchan <gab.dark.100@gmail.com>
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Shader/ComputeShaderCacheHashTable.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Shader/ComputeShaderCacheHashTable.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Gpu/Shader/ComputeShaderCacheHashTable.cs b/Ryujinx.Graphics.Gpu/Shader/ComputeShaderCacheHashTable.cs
index 08154df3..a6718211 100644
--- a/Ryujinx.Graphics.Gpu/Shader/ComputeShaderCacheHashTable.cs
+++ b/Ryujinx.Graphics.Gpu/Shader/ComputeShaderCacheHashTable.cs
@@ -36,6 +36,7 @@ namespace Ryujinx.Graphics.Gpu.Shader
/// </summary>
/// <param name="channel">GPU channel</param>
/// <param name="poolState">Texture pool state</param>
+ /// <param name="computeState">Compute state</param>
/// <param name="gpuVa">GPU virtual address of the compute shader</param>
/// <param name="program">Cached host program for the given state, if found</param>
/// <param name="cachedGuestCode">Cached guest code, if any found</param>
@@ -43,6 +44,7 @@ namespace Ryujinx.Graphics.Gpu.Shader
public bool TryFind(
GpuChannel channel,
GpuChannelPoolState poolState,
+ GpuChannelComputeState computeState,
ulong gpuVa,
out CachedShaderProgram program,
out byte[] cachedGuestCode)
@@ -50,7 +52,7 @@ namespace Ryujinx.Graphics.Gpu.Shader
program = null;
ShaderCodeAccessor codeAccessor = new ShaderCodeAccessor(channel.MemoryManager, gpuVa);
bool hasSpecList = _cache.TryFindItem(codeAccessor, out var specList, out cachedGuestCode);
- return hasSpecList && specList.TryFindForCompute(channel, poolState, out program);
+ return hasSpecList && specList.TryFindForCompute(channel, poolState, computeState, out program);
}
/// <summary>