Use ReadOnlySpan<byte> compiler optimization in more places (#3853)

* Use ReadOnlySpan<byte> compiler optimization in more places

* Revert changes in ShaderBinaries.cs

* Remove unused using;

* Use ReadOnlySpan<byte> compiler optimization in more places
This commit is contained in:
Berkan Diler
2022-11-18 04:10:44 +01:00
committed by GitHub
parent a16682cfd3
commit c1372ed775
3 changed files with 15 additions and 21 deletions

View File

@ -63,7 +63,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9
short dqv = dq[0];
ReadOnlySpan<byte> cat6Prob = (xd.Bd == 12)
? Luts.Vp9Cat6ProbHigh12
: (xd.Bd == 10) ? new ReadOnlySpan<byte>(Luts.Vp9Cat6ProbHigh12).Slice(2) : Luts.Vp9Cat6Prob;
: (xd.Bd == 10) ? Luts.Vp9Cat6ProbHigh12.Slice(2) : Luts.Vp9Cat6Prob;
int cat6Bits = (xd.Bd == 12) ? 18 : (xd.Bd == 10) ? 16 : 14;
// Keep value, range, and count as locals. The compiler produces better
// results with the locals than using r directly.