diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2020-09-19 19:46:49 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-19 19:46:49 -0300 |
| commit | 1eea35554c7505dbf521cf9f3cfeeaa0fc7e916f (patch) | |
| tree | 1d8a35b8aed1ca980ae942b863561a3fe3b0bedd /Ryujinx.Graphics.Gpu/Shader | |
| parent | 4b1bed1b051439a95adcc03da4175741dbdf5bb4 (diff) | |
Better viewport flipping and depth mode detection method (#1556)
* Use a better viewport flipping approach
* New approach to detect depth mode
* nit: Sort method on the OpenGL backend
* Adjust spacing on comment
* Unswap near and far parameters based on ScaleZ
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Shader')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Shader/GpuAccessor.cs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/Ryujinx.Graphics.Gpu/Shader/GpuAccessor.cs b/Ryujinx.Graphics.Gpu/Shader/GpuAccessor.cs index 03d8d196..fd0a6b0d 100644 --- a/Ryujinx.Graphics.Gpu/Shader/GpuAccessor.cs +++ b/Ryujinx.Graphics.Gpu/Shader/GpuAccessor.cs @@ -189,12 +189,6 @@ namespace Ryujinx.Graphics.Gpu.Shader public bool QuerySupportsNonConstantTextureOffset() => _context.Capabilities.SupportsNonConstantTextureOffset; /// <summary> - /// Queries host GPU viewport swizzle support. - /// </summary> - /// <returns>True if the GPU and driver supports viewport swizzle, false otherwise</returns> - public bool QuerySupportsViewportSwizzle() => _context.Capabilities.SupportsViewportSwizzle; - - /// <summary> /// Queries texture format information, for shaders using image load or store. /// </summary> /// <remarks> @@ -257,24 +251,6 @@ namespace Ryujinx.Graphics.Gpu.Shader }; } - public int QueryViewportSwizzle(int component) - { - YControl yControl = _state.Get<YControl>(MethodOffset.YControl); - - bool flipY = yControl.HasFlag(YControl.NegateY) ^ !yControl.HasFlag(YControl.TriangleRastFlip); - - ViewportTransform transform = _state.Get<ViewportTransform>(MethodOffset.ViewportTransform, 0); - - return component switch - { - 0 => (int)(transform.UnpackSwizzleX() ^ (transform.ScaleX < 0 ? ViewportSwizzle.NegativeFlag : 0)), - 1 => (int)(transform.UnpackSwizzleY() ^ (transform.ScaleY < 0 ? ViewportSwizzle.NegativeFlag : 0) ^ (flipY ? ViewportSwizzle.NegativeFlag : 0)), - 2 => (int)(transform.UnpackSwizzleZ() ^ (transform.ScaleZ < 0 ? ViewportSwizzle.NegativeFlag : 0)), - 3 => (int)transform.UnpackSwizzleW(), - _ => throw new ArgumentOutOfRangeException(nameof(component)) - }; - } - /// <summary> /// Gets the texture descriptor for a given texture on the pool. /// </summary> |
