-
-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #618 from Sergio0694/dev/graphics-resources-loading
Rework IShader APIs to load constant buffer and resources
- Loading branch information
Showing
32 changed files
with
652 additions
and
1,026 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
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
16 changes: 16 additions & 0 deletions
16
src/ComputeSharp/Core/Interfaces/__Internals/IConstantBufferLoader.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,16 @@ | ||
using System; | ||
|
||
namespace ComputeSharp.__Internals; | ||
|
||
/// <summary> | ||
/// A type representing a data loader for the constant buffer of a compute shader. | ||
/// </summary> | ||
public interface IConstantBufferLoader | ||
{ | ||
/// <summary> | ||
/// Loads the constant buffer of a compute shader. | ||
/// </summary> | ||
/// <param name="data">The constant buffer for the compute shader (the size must be a multiple of the size of a DWORD value).</param> | ||
/// <exception cref="ArgumentException">Thrown if the size of <paramref name="data"/> is not a multiple of the size of a DWORD value).</exception> | ||
void LoadConstantBuffer(ReadOnlySpan<byte> data); | ||
} |
24 changes: 0 additions & 24 deletions
24
src/ComputeSharp/Core/Interfaces/__Internals/IDispatchDataLoader.cs
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
src/ComputeSharp/Core/Interfaces/__Internals/IGraphicsResourceLoader.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,19 @@ | ||
using System; | ||
|
||
namespace ComputeSharp.__Internals; | ||
|
||
/// <summary> | ||
/// A type representing a loader object for <see cref="IGraphicsResource"/> values used in compute shaders. | ||
/// </summary> | ||
public interface IGraphicsResourceLoader | ||
{ | ||
/// <summary> | ||
/// Loads a resource used by the shader to be dispatched. | ||
/// </summary> | ||
/// <param name="resource">The input resource to be loaded.</param> | ||
/// <param name="index">The index to use to bind the resource to the shader.</param> | ||
/// <exception cref="ArgumentNullException">Thrown if <paramref name="resource"/> is <see langword="null"/>.</exception> | ||
/// <exception cref="ArgumentException">Thrown if <paramref name="resource"/> is not a valid resource object.</exception> | ||
/// <exception cref="GraphicsDeviceMismatchException">Thrown if the resource isn't associated with the same device used to dispatch the shader.</exception> | ||
void LoadGraphicsResource(IGraphicsResource resource, uint index); | ||
} |
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.