diff options
author | riperiperi <rhy3756547@hotmail.com> | 2023-04-22 22:02:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-22 18:02:39 -0300 |
commit | 8d9d508dc78eb5225c99cb425fa484999f3c4305 (patch) | |
tree | b32f3add1757eb247277f0b6cdd3b655ecfd736e /Ryujinx.Graphics.OpenGL/OpenGLRenderer.cs | |
parent | e27f5522e20ce0d84532a01b36222fe425ccd9ce (diff) |
Shader: Bias textureGather instructions on AMD/Intel (#4703)1.1.726
* Experimental (GLSL, forced)
* SPIR-V attempt
* Add capability
* Fix pCount == 1 on glsl
* Fix typo
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/OpenGLRenderer.cs')
-rw-r--r-- | Ryujinx.Graphics.OpenGL/OpenGLRenderer.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Ryujinx.Graphics.OpenGL/OpenGLRenderer.cs b/Ryujinx.Graphics.OpenGL/OpenGLRenderer.cs index 91e52178..5a2e3fe4 100644 --- a/Ryujinx.Graphics.OpenGL/OpenGLRenderer.cs +++ b/Ryujinx.Graphics.OpenGL/OpenGLRenderer.cs @@ -103,11 +103,14 @@ namespace Ryujinx.Graphics.OpenGL public Capabilities GetCapabilities() { + bool intelWindows = HwCapabilities.Vendor == HwCapabilities.GpuVendor.IntelWindows; + bool amdWindows = HwCapabilities.Vendor == HwCapabilities.GpuVendor.AmdWindows; + return new Capabilities( api: TargetApi.OpenGL, vendorName: GpuVendor, - hasFrontFacingBug: HwCapabilities.Vendor == HwCapabilities.GpuVendor.IntelWindows, - hasVectorIndexingBug: HwCapabilities.Vendor == HwCapabilities.GpuVendor.AmdWindows, + hasFrontFacingBug: intelWindows, + hasVectorIndexingBug: amdWindows, needsFragmentOutputSpecialization: false, reduceShaderPrecision: false, supportsAstcCompression: HwCapabilities.SupportsAstcCompression, @@ -142,7 +145,8 @@ namespace Ryujinx.Graphics.OpenGL maximumImagesPerStage: 8, maximumComputeSharedMemorySize: HwCapabilities.MaximumComputeSharedMemorySize, maximumSupportedAnisotropy: HwCapabilities.MaximumSupportedAnisotropy, - storageBufferOffsetAlignment: HwCapabilities.StorageBufferOffsetAlignment); + storageBufferOffsetAlignment: HwCapabilities.StorageBufferOffsetAlignment, + gatherBiasPrecision: intelWindows || amdWindows ? 8 : 0); // Precision is 8 for these vendors on Vulkan. } public void SetBufferData(BufferHandle buffer, int offset, ReadOnlySpan<byte> data) |