Minor code style tweaks
このコミットが含まれているのは:
1 親
91f2b09038
コミット
547eff9fd1
5ファイル変更
+25
-25
検索条件に一致するファイルはありません
@@ -16,15 +16,15 @@ public static class ShaderCompiler
|
||||
/// <summary>
|
||||
/// Compiles a new HLSL shader from the input source code.
|
||||
/// </summary>
|
||||
/// <typeparam name="TBytecodeLoader">The type of bytecode loader being used.</typeparam>
|
||||
/// <typeparam name="TLoadeer">The type of bytecode loader being used.</typeparam>
|
||||
/// <typeparam name="T">The type of shader being dispatched.</typeparam>
|
||||
/// <param name="loader">The <typeparamref name="TBytecodeLoader"/> instance to use to load the bytecode.</param>
|
||||
/// <param name="loader">The <typeparamref name="TLoadeer"/> instance to use to load the bytecode.</param>
|
||||
/// <param name="threadsX">The number of threads in each thread group for the X axis.</param>
|
||||
/// <param name="threadsY">The number of threads in each thread group for the Y axis.</param>
|
||||
/// <param name="threadsZ">The number of threads in each thread group for the Z axis.</param>
|
||||
/// <param name="shader">The input <typeparamref name="T"/> instance representing the compute shader to run.</param>
|
||||
public static unsafe void LoadDynamicBytecode<TBytecodeLoader, T>(ref TBytecodeLoader loader, int threadsX, int threadsY, int threadsZ, in T shader)
|
||||
where TBytecodeLoader : struct, IBytecodeLoader
|
||||
public static unsafe void LoadDynamicBytecode<TLoadeer, T>(ref TLoadeer loader, int threadsX, int threadsY, int threadsZ, in T shader)
|
||||
where TLoadeer : struct, IBytecodeLoader
|
||||
where T : struct, IShader
|
||||
{
|
||||
Unsafe.AsRef(in shader).BuildHlslString(out ArrayPoolStringBuilder builder, threadsX, threadsY, threadsZ);
|
||||
|
||||
@@ -39,7 +39,7 @@ public sealed partial class IShaderGenerator
|
||||
|
||||
// This code produces a method declaration as follows:
|
||||
//
|
||||
// readonly void global::ComputeSharp.__Internals.IShader.LoadBytecode<TBytecodeLoader>(ref TBytecodeLoader loader, int threadsX, int threadsY, int threadsZ)
|
||||
// readonly void global::ComputeSharp.__Internals.IShader.LoadBytecode<TLoader>(ref TLoader loader, int threadsX, int threadsY, int threadsZ)
|
||||
// {
|
||||
// <BODY>
|
||||
// }
|
||||
@@ -49,11 +49,11 @@ public sealed partial class IShaderGenerator
|
||||
Identifier("LoadBytecode"))
|
||||
.WithExplicitInterfaceSpecifier(ExplicitInterfaceSpecifier(IdentifierName($"global::ComputeSharp.__Internals.{nameof(IShader)}")))
|
||||
.AddModifiers(Token(SyntaxKind.ReadOnlyKeyword))
|
||||
.AddTypeParameterListParameters(TypeParameter(Identifier("TBytecodeLoader")))
|
||||
.AddTypeParameterListParameters(TypeParameter(Identifier("TLoader")))
|
||||
.AddParameterListParameters(
|
||||
Parameter(Identifier("loader"))
|
||||
.AddModifiers(Token(SyntaxKind.RefKeyword))
|
||||
.WithType(IdentifierName("TBytecodeLoader")),
|
||||
.WithType(IdentifierName("TLoader")),
|
||||
Parameter(Identifier("threadsX")).WithType(PredefinedType(Token(SyntaxKind.IntKeyword))),
|
||||
Parameter(Identifier("threadsY")).WithType(PredefinedType(Token(SyntaxKind.IntKeyword))),
|
||||
Parameter(Identifier("threadsZ")).WithType(PredefinedType(Token(SyntaxKind.IntKeyword))))
|
||||
|
||||
+3
-3
@@ -32,7 +32,7 @@ public sealed partial class IShaderGenerator
|
||||
{
|
||||
// This code produces a method declaration as follows:
|
||||
//
|
||||
// readonly void global::ComputeSharp.__Internals.IShader.LoadDispatchData<TDataLoader>(ref TDataLoader loader, global::ComputeSharp.GraphicsDevice device, int x, int y, int z)
|
||||
// readonly void global::ComputeSharp.__Internals.IShader.LoadDispatchData<TLoader>(ref TLoader loader, global::ComputeSharp.GraphicsDevice device, int x, int y, int z)
|
||||
// {
|
||||
// <BODY>
|
||||
// }
|
||||
@@ -42,11 +42,11 @@ public sealed partial class IShaderGenerator
|
||||
Identifier("LoadDispatchData"))
|
||||
.WithExplicitInterfaceSpecifier(ExplicitInterfaceSpecifier(IdentifierName($"global::ComputeSharp.__Internals.{nameof(IShader)}")))
|
||||
.AddModifiers(Token(SyntaxKind.ReadOnlyKeyword))
|
||||
.AddTypeParameterListParameters(TypeParameter(Identifier("TDataLoader")))
|
||||
.AddTypeParameterListParameters(TypeParameter(Identifier("TLoader")))
|
||||
.AddParameterListParameters(
|
||||
Parameter(Identifier("loader"))
|
||||
.AddModifiers(Token(SyntaxKind.RefKeyword))
|
||||
.WithType(IdentifierName("TDataLoader")),
|
||||
.WithType(IdentifierName("TLoader")),
|
||||
Parameter(Identifier("device")).WithType(IdentifierName("global::ComputeSharp.GraphicsDevice")),
|
||||
Parameter(Identifier("x")).WithType(PredefinedType(Token(SyntaxKind.IntKeyword))),
|
||||
Parameter(Identifier("y")).WithType(PredefinedType(Token(SyntaxKind.IntKeyword))),
|
||||
|
||||
+3
-3
@@ -25,7 +25,7 @@ public sealed partial class IShaderGenerator
|
||||
{
|
||||
// This code produces a method declaration as follows:
|
||||
//
|
||||
// readonly void global::ComputeSharp.__Internals.IShader.LoadDispatchMetadata<TMetadataLoader>(ref TMetadataLoader loader, out global::System.IntPtr result)
|
||||
// readonly void global::ComputeSharp.__Internals.IShader.LoadDispatchMetadata<TLoader>(ref TLoader loader, out global::System.IntPtr result)
|
||||
// {
|
||||
// <BODY>
|
||||
// }
|
||||
@@ -35,11 +35,11 @@ public sealed partial class IShaderGenerator
|
||||
Identifier("LoadDispatchMetadata"))
|
||||
.WithExplicitInterfaceSpecifier(ExplicitInterfaceSpecifier(IdentifierName($"global::ComputeSharp.__Internals.{nameof(IShader)}")))
|
||||
.AddModifiers(Token(SyntaxKind.ReadOnlyKeyword))
|
||||
.AddTypeParameterListParameters(TypeParameter(Identifier("TMetadataLoader")))
|
||||
.AddTypeParameterListParameters(TypeParameter(Identifier("TLoader")))
|
||||
.AddParameterListParameters(
|
||||
Parameter(Identifier("loader"))
|
||||
.AddModifiers(Token(SyntaxKind.RefKeyword))
|
||||
.WithType(IdentifierName("TMetadataLoader")),
|
||||
.WithType(IdentifierName("TLoader")),
|
||||
Parameter(Identifier("result"))
|
||||
.AddModifiers(Token(SyntaxKind.OutKeyword))
|
||||
.WithType(IdentifierName($"global::System.{typeof(IntPtr).Name}")))
|
||||
|
||||
@@ -28,16 +28,16 @@ public interface IShader
|
||||
/// <summary>
|
||||
/// Loads the dispatch data for the shader.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDataLoader">The type of data loader being used.</typeparam>
|
||||
/// <param name="loader">The <typeparamref name="TDataLoader"/> instance to use to load the data.</param>
|
||||
/// <typeparam name="TLoader">The type of data loader being used.</typeparam>
|
||||
/// <param name="loader">The <typeparamref name="TLoader"/> instance to use to load the data.</param>
|
||||
/// <param name="device">The device the shader is being dispatched on.</param>
|
||||
/// <param name="x">The number of iterations to run on the X axis.</param>
|
||||
/// <param name="y">The number of iterations to run on the Y axis.</param>
|
||||
/// <param name="z">The number of iterations to run on the Z axis.</param>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Obsolete("This method is not intended to be called directly by user code")]
|
||||
void LoadDispatchData<TDataLoader>(ref TDataLoader loader, GraphicsDevice device, int x, int y, int z)
|
||||
where TDataLoader : struct, IDispatchDataLoader
|
||||
void LoadDispatchData<TLoader>(ref TLoader loader, GraphicsDevice device, int x, int y, int z)
|
||||
where TLoader : struct, IDispatchDataLoader
|
||||
#if NET6_0_OR_GREATER
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
@@ -49,13 +49,13 @@ public interface IShader
|
||||
/// <summary>
|
||||
/// Loads an opaque metadata handle from the metadata of the current shader.
|
||||
/// </summary>
|
||||
/// <typeparam name="TMetadataLoader">The type of data loader being used.</typeparam>
|
||||
/// <param name="loader">The <typeparamref name="TMetadataLoader"/> instance to use to load the data.</param>
|
||||
/// <typeparam name="TLoader">The type of data loader being used.</typeparam>
|
||||
/// <param name="loader">The <typeparamref name="TLoader"/> instance to use to load the data.</param>
|
||||
/// <param name="result">The resulting opaque metadata handle.</param>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Obsolete("This method is not intended to be called directly by user code")]
|
||||
void LoadDispatchMetadata<TMetadataLoader>(ref TMetadataLoader loader, out IntPtr result)
|
||||
where TMetadataLoader : struct, IDispatchMetadataLoader
|
||||
void LoadDispatchMetadata<TLoader>(ref TLoader loader, out IntPtr result)
|
||||
where TLoader : struct, IDispatchMetadataLoader
|
||||
#if NET6_0_OR_GREATER
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
@@ -85,15 +85,15 @@ public interface IShader
|
||||
/// <summary>
|
||||
/// Loads the bytecode for the current shader.
|
||||
/// </summary>
|
||||
/// <typeparam name="TBytecodeLoader">The type of bytecode loader being used.</typeparam>
|
||||
/// <param name="loader">The <typeparamref name="TBytecodeLoader"/> instance to use to load the bytecode.</param>
|
||||
/// <typeparam name="TLoader">The type of bytecode loader being used.</typeparam>
|
||||
/// <param name="loader">The <typeparamref name="TLoader"/> instance to use to load the bytecode.</param>
|
||||
/// <param name="threadsX">The number of threads in each thread group for the X axis.</param>
|
||||
/// <param name="threadsY">The number of threads in each thread group for the Y axis.</param>
|
||||
/// <param name="threadsZ">The number of threads in each thread group for the Z axis.</param>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Obsolete("This method is not intended to be used directly by user code")]
|
||||
void LoadBytecode<TBytecodeLoader>(ref TBytecodeLoader loader, int threadsX, int threadsY, int threadsZ)
|
||||
where TBytecodeLoader : struct, IBytecodeLoader
|
||||
void LoadBytecode<TLoader>(ref TLoader loader, int threadsX, int threadsY, int threadsZ)
|
||||
where TLoader : struct, IBytecodeLoader
|
||||
#if NET6_0_OR_GREATER
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする