Restrict shader storage buffer search when match fails (#4011)
* Restrict storage buffer search when match fails * Shader cache version bump
This commit is contained in:
parent
4da44e09cb
commit
bbb24d8c7e
5 changed files with 38 additions and 5 deletions
|
@ -11,14 +11,18 @@ namespace Ryujinx.Graphics.Shader.Translation.Optimizations
|
|||
{
|
||||
RunOptimizationPasses(blocks);
|
||||
|
||||
int sbUseMask = 0;
|
||||
|
||||
// Those passes are looking for specific patterns and only needs to run once.
|
||||
for (int blkIndex = 0; blkIndex < blocks.Length; blkIndex++)
|
||||
{
|
||||
GlobalToStorage.RunPass(blocks[blkIndex], config);
|
||||
GlobalToStorage.RunPass(blocks[blkIndex], config, ref sbUseMask);
|
||||
BindlessToIndexed.RunPass(blocks[blkIndex], config);
|
||||
BindlessElimination.RunPass(blocks[blkIndex], config);
|
||||
}
|
||||
|
||||
config.SetAccessibleStorageBuffersMask(sbUseMask);
|
||||
|
||||
// Run optimizations one last time to remove any code that is now optimizable after above passes.
|
||||
RunOptimizationPasses(blocks);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue