mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-23 11:01:20 -08:00
Extend bindless elimination to see through shuffle (#5958)
* Extend bindless elimination to see through shuffle * Shader cache version bump
This commit is contained in:
parent
70d65d3d8e
commit
21cd4c0c00
@ -22,7 +22,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
|
|||||||
private const ushort FileFormatVersionMajor = 1;
|
private const ushort FileFormatVersionMajor = 1;
|
||||||
private const ushort FileFormatVersionMinor = 2;
|
private const ushort FileFormatVersionMinor = 2;
|
||||||
private const uint FileFormatVersionPacked = ((uint)FileFormatVersionMajor << 16) | FileFormatVersionMinor;
|
private const uint FileFormatVersionPacked = ((uint)FileFormatVersionMajor << 16) | FileFormatVersionMinor;
|
||||||
private const uint CodeGenVersion = 5957;
|
private const uint CodeGenVersion = 5958;
|
||||||
|
|
||||||
private const string SharedTocFileName = "shared.toc";
|
private const string SharedTocFileName = "shared.toc";
|
||||||
private const string SharedDataFileName = "shared.data";
|
private const string SharedDataFileName = "shared.data";
|
||||||
|
@ -29,7 +29,16 @@ namespace Ryujinx.Graphics.Shader.Translation.Optimizations
|
|||||||
|
|
||||||
if (texOp.Inst == Instruction.TextureSample || texOp.Inst.IsTextureQuery())
|
if (texOp.Inst == Instruction.TextureSample || texOp.Inst.IsTextureQuery())
|
||||||
{
|
{
|
||||||
Operand bindlessHandle = Utils.FindLastOperation(texOp.GetSource(0), block);
|
Operand bindlessHandle = texOp.GetSource(0);
|
||||||
|
|
||||||
|
// In some cases the compiler uses a shuffle operation to get the handle,
|
||||||
|
// for some textureGrad implementations. In those cases, we can skip the shuffle.
|
||||||
|
if (bindlessHandle.AsgOp is Operation shuffleOp && shuffleOp.Inst == Instruction.Shuffle)
|
||||||
|
{
|
||||||
|
bindlessHandle = shuffleOp.GetSource(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
bindlessHandle = Utils.FindLastOperation(bindlessHandle, block);
|
||||||
|
|
||||||
// Some instructions do not encode an accurate sampler type:
|
// Some instructions do not encode an accurate sampler type:
|
||||||
// - Most instructions uses the same type for 1D and Buffer.
|
// - Most instructions uses the same type for 1D and Buffer.
|
||||||
|
Loading…
Reference in New Issue
Block a user