Fix IPixelShader<TPixel> lookup, switch GetDispatchId() to incremental
このコミットが含まれているのは:
1 親
fd820a67c7
コミット
4b1180225d
3ファイル変更
+8
-5
検索条件に一致するファイルはありません
+1
-1
@@ -13,7 +13,7 @@ using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory;
|
||||
namespace ComputeSharp.SourceGenerators;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public sealed partial class IShaderGenerator
|
||||
public sealed partial class IShaderGenerator2
|
||||
{
|
||||
/// <summary>
|
||||
/// Extracts the names of all instance fields of a <see cref="System.Delegate"/> type.
|
||||
|
||||
@@ -13,8 +13,11 @@ using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory;
|
||||
|
||||
namespace ComputeSharp.SourceGenerators;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public sealed partial class IShaderGenerator : IIncrementalGenerator
|
||||
/// <summary>
|
||||
/// A source generator creating data loaders for <see cref="IComputeShader"/> and <see cref="IPixelShader{TPixel}"/> types.
|
||||
/// </summary>
|
||||
[Generator]
|
||||
public sealed partial class IShaderGenerator2 : IIncrementalGenerator
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public void Initialize(IncrementalGeneratorInitializationContext context)
|
||||
@@ -91,7 +94,7 @@ public sealed partial class IShaderGenerator : IIncrementalGenerator
|
||||
|
||||
if (interfaceSymbol.IsGenericType &&
|
||||
interfaceSymbol.Name == nameof(IPixelShader<byte>) &&
|
||||
SymbolEqualityComparer.Default.Equals(interfaceSymbol, interfaceSymbol.ConstructUnboundGenericType()))
|
||||
SymbolEqualityComparer.Default.Equals(interfaceSymbol.ConstructedFrom, iPixelShaderSymbol))
|
||||
{
|
||||
return typeof(IPixelShader<>);
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ public sealed partial class IShaderGenerator : ISourceGenerator
|
||||
// Reorder the method declarations to respect the order in the interface definition
|
||||
MethodDeclarationSyntax[] methods =
|
||||
{
|
||||
getDispatchIdMethod,
|
||||
// getDispatchIdMethod,
|
||||
loadDispatchDataMethod,
|
||||
loadDispatchMetadataMethod,
|
||||
buildHlslStringMethod,
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする