-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
47 changed files
with
992 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetImageArraySeparateCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Ryujinx.Graphics.GAL.Multithreading.Model; | ||
using Ryujinx.Graphics.GAL.Multithreading.Resources; | ||
using Ryujinx.Graphics.Shader; | ||
|
||
namespace Ryujinx.Graphics.GAL.Multithreading.Commands | ||
{ | ||
struct SetImageArraySeparateCommand : IGALCommand, IGALCommand<SetImageArraySeparateCommand> | ||
{ | ||
public readonly CommandType CommandType => CommandType.SetImageArraySeparate; | ||
private ShaderStage _stage; | ||
private int _setIndex; | ||
private TableRef<IImageArray> _array; | ||
|
||
public void Set(ShaderStage stage, int setIndex, TableRef<IImageArray> array) | ||
{ | ||
_stage = stage; | ||
_setIndex = setIndex; | ||
_array = array; | ||
} | ||
|
||
public static void Run(ref SetImageArraySeparateCommand command, ThreadedRenderer threaded, IRenderer renderer) | ||
{ | ||
renderer.Pipeline.SetImageArraySeparate(command._stage, command._setIndex, command._array.GetAs<ThreadedImageArray>(threaded)?.Base); | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetTextureArraySeparateCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Ryujinx.Graphics.GAL.Multithreading.Model; | ||
using Ryujinx.Graphics.GAL.Multithreading.Resources; | ||
using Ryujinx.Graphics.Shader; | ||
|
||
namespace Ryujinx.Graphics.GAL.Multithreading.Commands | ||
{ | ||
struct SetTextureArraySeparateCommand : IGALCommand, IGALCommand<SetTextureArraySeparateCommand> | ||
{ | ||
public readonly CommandType CommandType => CommandType.SetTextureArraySeparate; | ||
private ShaderStage _stage; | ||
private int _setIndex; | ||
private TableRef<ITextureArray> _array; | ||
|
||
public void Set(ShaderStage stage, int setIndex, TableRef<ITextureArray> array) | ||
{ | ||
_stage = stage; | ||
_setIndex = setIndex; | ||
_array = array; | ||
} | ||
|
||
public static void Run(ref SetTextureArraySeparateCommand command, ThreadedRenderer threaded, IRenderer renderer) | ||
{ | ||
renderer.Pipeline.SetTextureArraySeparate(command._stage, command._setIndex, command._array.GetAs<ThreadedTextureArray>(threaded)?.Base); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.