aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Shader/IGpuAccessor.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2024-04-07 18:25:55 -0300
committerGitHub <noreply@github.com>2024-04-07 18:25:55 -0300
commit3e6e0e4afaa3c3ffb118cb17b61feb16966a7eeb (patch)
treea4652499c089b0853e39c382cad82a9db4d6ad08 /src/Ryujinx.Graphics.Shader/IGpuAccessor.cs
parent808803d97a0c06809bf000687c252f960048fcf0 (diff)
Add support for large sampler arrays on Vulkan (#6489)
* Add support for large sampler arrays on Vulkan * Shader cache version bump * Format whitespace * Move DescriptorSetManager to PipelineLayoutCacheEntry to allow different pool sizes per layout * Handle array textures with different types on the same buffer * Somewhat better caching system * Avoid useless buffer data modification checks * Move redundant bindings update checking to the backend * Fix an issue where texture arrays would get the same bindings across stages on Vulkan * Backport some fixes from part 2 * Fix typo * PR feedback * Format whitespace * Add some missing XML docs
Diffstat (limited to 'src/Ryujinx.Graphics.Shader/IGpuAccessor.cs')
-rw-r--r--src/Ryujinx.Graphics.Shader/IGpuAccessor.cs43
1 files changed, 19 insertions, 24 deletions
diff --git a/src/Ryujinx.Graphics.Shader/IGpuAccessor.cs b/src/Ryujinx.Graphics.Shader/IGpuAccessor.cs
index df6d29dc..99366ad6 100644
--- a/src/Ryujinx.Graphics.Shader/IGpuAccessor.cs
+++ b/src/Ryujinx.Graphics.Shader/IGpuAccessor.cs
@@ -27,46 +27,41 @@ namespace Ryujinx.Graphics.Shader
ReadOnlySpan<ulong> GetCode(ulong address, int minimumSize);
/// <summary>
+ /// Gets the size in bytes of a bound constant buffer for the current shader stage.
+ /// </summary>
+ /// <param name="slot">The number of the constant buffer to get the size from</param>
+ /// <returns>Size in bytes</returns>
+ int QueryTextureArrayLengthFromBuffer(int slot);
+
+ /// <summary>
/// Queries the binding number of a constant buffer.
/// </summary>
/// <param name="index">Constant buffer index</param>
/// <returns>Binding number</returns>
- int QueryBindingConstantBuffer(int index)
- {
- return index + 1;
- }
+ int CreateConstantBufferBinding(int index);
/// <summary>
- /// Queries the binding number of a storage buffer.
+ /// Queries the binding number of an image.
/// </summary>
- /// <param name="index">Storage buffer index</param>
+ /// <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 QueryBindingStorageBuffer(int index)
- {
- return index;
- }
+ int CreateImageBinding(int count, bool isBuffer);
/// <summary>
- /// Queries the binding number of a texture.
+ /// Queries the binding number of a storage buffer.
/// </summary>
- /// <param name="index">Texture index</param>
- /// <param name="isBuffer">Indicates if the texture is a buffer texture</param>
+ /// <param name="index">Storage buffer index</param>
/// <returns>Binding number</returns>
- int QueryBindingTexture(int index, bool isBuffer)
- {
- return index;
- }
+ int CreateStorageBufferBinding(int index);
/// <summary>
- /// Queries the binding number of an image.
+ /// Queries the binding number of a texture.
/// </summary>
- /// <param name="index">Image index</param>
- /// <param name="isBuffer">Indicates if the image is a buffer image</param>
+ /// <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 QueryBindingImage(int index, bool isBuffer)
- {
- return index;
- }
+ int CreateTextureBinding(int count, bool isBuffer);
/// <summary>
/// Queries Local Size X for compute shaders.