diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2024-05-26 13:30:19 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-26 13:30:19 -0300 |
| commit | 53d096e392d85106a41d8edad1dcda5cce7446a2 (patch) | |
| tree | 38fcf4a50e666c96c5c0ea133201f0b390bd14eb /src/Ryujinx.Graphics.Shader/IGpuAccessor.cs | |
| parent | 4cc00bb4b1b777734151cab5570d622fbfefa49f (diff) | |
Allow texture arrays to use separate descriptor sets on Vulkan (#6870)
* Report base and extra sets from the backend
* Pass texture set index everywhere
* Key textures using set and binding (rather than just binding)
* Start using extra sets for array textures
* Shader cache version bump
* Separate new commands, some PR feedback
* Introduce new manual descriptor set reservation method that prevents it from being used by something else while owned by an array
* Move bind extra sets logic to new method
* Should only use separate array is MaximumExtraSets is not zero
* Format whitespace
Diffstat (limited to 'src/Ryujinx.Graphics.Shader/IGpuAccessor.cs')
| -rw-r--r-- | src/Ryujinx.Graphics.Shader/IGpuAccessor.cs | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/Ryujinx.Graphics.Shader/IGpuAccessor.cs b/src/Ryujinx.Graphics.Shader/IGpuAccessor.cs index 3dc4ad90..4e6d6edf 100644 --- a/src/Ryujinx.Graphics.Shader/IGpuAccessor.cs +++ b/src/Ryujinx.Graphics.Shader/IGpuAccessor.cs @@ -27,34 +27,43 @@ namespace Ryujinx.Graphics.Shader ReadOnlySpan<ulong> GetCode(ulong address, int minimumSize); /// <summary> - /// Queries the binding number of a constant buffer. + /// Gets the binding number of a constant buffer. /// </summary> /// <param name="index">Constant buffer index</param> /// <returns>Binding number</returns> - int CreateConstantBufferBinding(int index); + SetBindingPair CreateConstantBufferBinding(int index); /// <summary> - /// Queries the binding number of an image. + /// Gets the binding number of an image. /// </summary> /// <param name="count">For array of images, the number of elements of the array, otherwise it should be 1</param> /// <param name="isBuffer">Indicates if the image is a buffer image</param> /// <returns>Binding number</returns> - int CreateImageBinding(int count, bool isBuffer); + SetBindingPair CreateImageBinding(int count, bool isBuffer); /// <summary> - /// Queries the binding number of a storage buffer. + /// Gets the binding number of a storage buffer. /// </summary> /// <param name="index">Storage buffer index</param> /// <returns>Binding number</returns> - int CreateStorageBufferBinding(int index); + SetBindingPair CreateStorageBufferBinding(int index); /// <summary> - /// Queries the binding number of a texture. + /// Gets the binding number of a texture. /// </summary> /// <param name="count">For array of textures, the number of elements of the array, otherwise it should be 1</param> /// <param name="isBuffer">Indicates if the texture is a buffer texture</param> /// <returns>Binding number</returns> - int CreateTextureBinding(int count, bool isBuffer); + SetBindingPair CreateTextureBinding(int count, bool isBuffer); + + /// <summary> + /// Gets the set index for an additional set, or -1 if there's no extra set available. + /// </summary> + /// <returns>Extra set index, or -1 if not available</returns> + int CreateExtraSet() + { + return -1; + } /// <summary> /// Queries Local Size X for compute shaders. |
