diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2020-05-05 22:02:28 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-06 11:02:28 +1000 |
| commit | b8eb6abeccbd4a468214a4d2ad3a9b6e5e06973c (patch) | |
| tree | cd3d71ebde0f4f32eb674778adae89c0efcb75df /Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs | |
| parent | 7f500e7cae940958289abe1a3461e52684742053 (diff) | |
Refactor shader GPU state and memory access (#1203)
* Refactor shader GPU state and memory access
* Fix NVDEC project build
* Address PR feedback and add missing XML comments
Diffstat (limited to 'Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs')
| -rw-r--r-- | Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs b/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs index 18552d0a..7f7a48a6 100644 --- a/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs +++ b/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs @@ -19,7 +19,7 @@ namespace Ryujinx.Graphics.Shader.Instructions if (type == SamplerType.None) { - context.Config.PrintLog("Invalid image store sampler type."); + context.Config.GpuAccessor.Log("Invalid image store sampler type."); return; } @@ -158,7 +158,7 @@ namespace Ryujinx.Graphics.Shader.Instructions if (type == SamplerType.None) { - context.Config.PrintLog("Invalid image store sampler type."); + context.Config.GpuAccessor.Log("Invalid image store sampler type."); return; } @@ -344,7 +344,7 @@ namespace Ryujinx.Graphics.Shader.Instructions if (type == SamplerType.None) { - context.Config.PrintLog("Invalid texture sampler type."); + context.Config.GpuAccessor.Log("Invalid texture sampler type."); return; } @@ -423,14 +423,14 @@ namespace Ryujinx.Graphics.Shader.Instructions if (type == SamplerType.None) { - context.Config.PrintLog("Invalid texel fetch sampler type."); + context.Config.GpuAccessor.Log("Invalid texel fetch sampler type."); return; } flags = ConvertTextureFlags(tldsOp.Target) | TextureFlags.IntCoords; - if (tldsOp.Target == TexelLoadTarget.Texture1DLodZero && context.Config.QueryInfoBool(QueryInfoName.IsTextureBuffer, tldsOp.Immediate)) + if (tldsOp.Target == TexelLoadTarget.Texture1DLodZero && context.Config.GpuAccessor.QueryIsTextureBuffer(tldsOp.Immediate)) { type = SamplerType.TextureBuffer; flags &= ~TextureFlags.LodLevel; @@ -1020,7 +1020,7 @@ namespace Ryujinx.Graphics.Shader.Instructions if (type == SamplerType.Texture1D && flags == TextureFlags.IntCoords && !isBindless) { - bool isTypeBuffer = context.Config.QueryInfoBool(QueryInfoName.IsTextureBuffer, op.Immediate); + bool isTypeBuffer = context.Config.GpuAccessor.QueryIsTextureBuffer(op.Immediate); if (isTypeBuffer) { @@ -1093,11 +1093,11 @@ namespace Ryujinx.Graphics.Shader.Instructions private static TextureFormat GetTextureFormat(EmitterContext context, int handle) { - var format = (TextureFormat)context.Config.QueryInfo(QueryInfoName.TextureFormat, handle); + var format = context.Config.GpuAccessor.QueryTextureFormat(handle); if (format == TextureFormat.Unknown) { - context.Config.PrintLog($"Unknown format for texture {handle}."); + context.Config.GpuAccessor.Log($"Unknown format for texture {handle}."); format = TextureFormat.R8G8B8A8Unorm; } |
