Remove symbols from IShaderGenerator pipeline
このコミットが含まれているのは:
1 親
9eac3c779d
コミット
a205efe6fa
9ファイル変更
+283
-203
検索条件に一致するファイルはありません
+7
-8
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Immutable;
|
||||
using System.Collections.Immutable;
|
||||
using ComputeSharp.__Internals;
|
||||
using ComputeSharp.SourceGenerators.Models;
|
||||
using Microsoft.CodeAnalysis.CSharp;
|
||||
@@ -19,13 +18,13 @@ partial class IShaderGenerator
|
||||
/// <summary>
|
||||
/// Creates a <see cref="MethodDeclarationSyntax"/> instance for the <c>LoadDispatchDataMethod</c> method.
|
||||
/// </summary>
|
||||
/// <param name="shaderInterfaceType">The type of shader interface urrently being processed.</param>
|
||||
/// <param name="shaderType">The type of shader interface currently being processed.</param>
|
||||
/// <param name="fieldInfos">The array of <see cref="FieldInfo"/> values for all captured fields.</param>
|
||||
/// <param name="resourceCount">The total number of captured resources in the shader.</param>
|
||||
/// <param name="root32BitConstantsCount">The total number of needed 32 bit constants in the shader root signature.</param>
|
||||
/// <returns>The resulting <see cref="MethodDeclarationSyntax"/> instance for the <c>LoadDispatchDataMethod</c> method.</returns>
|
||||
public static MethodDeclarationSyntax GetSyntax(
|
||||
Type shaderInterfaceType,
|
||||
ShaderType shaderType,
|
||||
ImmutableArray<FieldInfo> fieldInfos,
|
||||
int resourceCount,
|
||||
int root32BitConstantsCount)
|
||||
@@ -51,25 +50,25 @@ partial class IShaderGenerator
|
||||
Parameter(Identifier("x")).WithType(PredefinedType(Token(SyntaxKind.IntKeyword))),
|
||||
Parameter(Identifier("y")).WithType(PredefinedType(Token(SyntaxKind.IntKeyword))),
|
||||
Parameter(Identifier("z")).WithType(PredefinedType(Token(SyntaxKind.IntKeyword))))
|
||||
.WithBody(Block(GetDispatchDataLoadingStatements(shaderInterfaceType, fieldInfos, resourceCount, root32BitConstantsCount)));
|
||||
.WithBody(Block(GetDispatchDataLoadingStatements(shaderType, fieldInfos, resourceCount, root32BitConstantsCount)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a sequence of statements to load the dispatch data for a given shader.
|
||||
/// </summary>
|
||||
/// <param name="shaderInterfaceType">The type of shader interface urrently being processed.</param>
|
||||
/// <param name="shaderType">The type of shader interface currently being processed.</param>
|
||||
/// <param name="fieldInfos">The array of <see cref="FieldInfo"/> values for all captured fields.</param>
|
||||
/// <param name="resourceCount">The total number of captured resources in the shader.</param>
|
||||
/// <param name="root32BitConstantsCount">The total number of needed 32 bit constants in the shader root signature.</param>
|
||||
/// <returns>The sequence of <see cref="StatementSyntax"/> instances to load shader dispatch data.</returns>
|
||||
private static ImmutableArray<StatementSyntax> GetDispatchDataLoadingStatements(
|
||||
Type shaderInterfaceType,
|
||||
ShaderType shaderType,
|
||||
ImmutableArray<FieldInfo> fieldInfos,
|
||||
int resourceCount,
|
||||
int root32BitConstantsCount)
|
||||
{
|
||||
ImmutableArray<StatementSyntax>.Builder statements = ImmutableArray.CreateBuilder<StatementSyntax>();
|
||||
bool isComputeShader = shaderInterfaceType == typeof(IComputeShader);
|
||||
bool isComputeShader = shaderType == ShaderType.ComputeShader;
|
||||
|
||||
// Append the statements for the dispatch ranges:
|
||||
//
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする