diff options
author | riperiperi <rhy3756547@hotmail.com> | 2021-05-19 19:05:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-19 20:05:43 +0200 |
commit | 0129250c2e169c7386f7e2868cc055f8ec55c005 (patch) | |
tree | d63a3239dc405de892edee7829905bc5e6b7038c /Ryujinx.Graphics.Gpu/Shader/GpuAccessor.cs | |
parent | c805542b29975b0d9bf3ea324526f62cfe4331bf (diff) |
Pass CbufSlot when getting info from the texture descriptor (#2291)
* Pass CbufSlot when getting info from the texture descriptor
Fixes some issues with bindless textures, when CbufSlot is not equal to the current TextureBufferIndex.
Specifically fixes a random chance of full screen colour flickering in Super Mario Party.
* Apply suggestions from code review
Oops
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Shader/GpuAccessor.cs')
-rw-r--r-- | Ryujinx.Graphics.Gpu/Shader/GpuAccessor.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Ryujinx.Graphics.Gpu/Shader/GpuAccessor.cs b/Ryujinx.Graphics.Gpu/Shader/GpuAccessor.cs index c0ad481e..f5373bd6 100644 --- a/Ryujinx.Graphics.Gpu/Shader/GpuAccessor.cs +++ b/Ryujinx.Graphics.Gpu/Shader/GpuAccessor.cs @@ -184,16 +184,17 @@ namespace Ryujinx.Graphics.Gpu.Shader /// Gets the texture descriptor for a given texture on the pool. /// </summary> /// <param name="handle">Index of the texture (this is the word offset of the handle in the constant buffer)</param> + /// <param name="cbufSlot">Constant buffer slot for the texture handle</param> /// <returns>Texture descriptor</returns> - public override Image.ITextureDescriptor GetTextureDescriptor(int handle) + public override Image.ITextureDescriptor GetTextureDescriptor(int handle, int cbufSlot) { if (_compute) { - return _context.Methods.TextureManager.GetComputeTextureDescriptor(_state, handle); + return _context.Methods.TextureManager.GetComputeTextureDescriptor(_state, handle, cbufSlot); } else { - return _context.Methods.TextureManager.GetGraphicsTextureDescriptor(_state, _stageIndex, handle); + return _context.Methods.TextureManager.GetGraphicsTextureDescriptor(_state, _stageIndex, handle, cbufSlot); } } |