diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2020-03-22 18:31:31 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-23 08:31:31 +1100 |
| commit | 49d7b1c7d82e37f1bde1c4776926f8c1c149727d (patch) | |
| tree | 0a537e1cfb34868ec02fc1b41194ddfd94aac8f3 /Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGenMemory.cs | |
| parent | 31b94f4641894060349a55d56b22f47829c9bef6 (diff) | |
Implement textureQueryLevels (#1007)
Diffstat (limited to 'Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGenMemory.cs')
| -rw-r--r-- | Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGenMemory.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGenMemory.cs b/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGenMemory.cs index 5687ce7e..74828702 100644 --- a/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGenMemory.cs +++ b/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGenMemory.cs @@ -494,7 +494,14 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions string lodExpr = GetSoureExpr(context, lod, GetSrcVarType(operation.Inst, lodSrcIndex)); - return $"textureSize({samplerName}, {lodExpr}){GetMask(texOp.Index)}"; + if (texOp.Index == 3) + { + return $"textureQueryLevels({samplerName})"; + } + else + { + return $"textureSize({samplerName}, {lodExpr}){GetMask(texOp.Index)}"; + } } private static string GetStorageBufferAccessor(string slotExpr, string offsetExpr, ShaderStage stage) |
