Improve shader sampler type selection (#989)
This commit is contained in:
parent
8ce3993afa
commit
8bb64ac69c
1 changed files with 5 additions and 1 deletions
|
@ -254,7 +254,11 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
|
||||||
{
|
{
|
||||||
Dictionary<string, AstTextureOperation> samplers = new Dictionary<string, AstTextureOperation>();
|
Dictionary<string, AstTextureOperation> samplers = new Dictionary<string, AstTextureOperation>();
|
||||||
|
|
||||||
foreach (AstTextureOperation texOp in info.Samplers.OrderBy(x => x.Handle))
|
// Texture instructions other than TextureSample (like TextureSize)
|
||||||
|
// may have incomplete sampler type information. In those cases,
|
||||||
|
// we prefer instead the more accurate information from the
|
||||||
|
// TextureSample instruction, if both are available.
|
||||||
|
foreach (AstTextureOperation texOp in info.Samplers.OrderBy(x => x.Handle * 2 + (x.Inst == Instruction.TextureSample ? 0 : 1)))
|
||||||
{
|
{
|
||||||
string indexExpr = NumberFormatter.FormatInt(texOp.ArraySize);
|
string indexExpr = NumberFormatter.FormatInt(texOp.ArraySize);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue