Run dotnet format whitespace
このコミットが含まれているのは:
1 親
228d7d8b7a
コミット
e94636b80c
896ファイル変更
+1511
-1511
検索条件に一致するファイルはありません
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace ComputeSharp.__Internals;
|
||||
@@ -10,4 +10,4 @@ namespace ComputeSharp.__Internals;
|
||||
[Obsolete("This interface is not intended to be used directly by user code")]
|
||||
public interface IShader
|
||||
{
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using TerraFX.Interop.Windows;
|
||||
|
||||
@@ -32,4 +32,4 @@ internal static class HRESULTExtensions
|
||||
throw new Win32Exception(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -53,7 +53,7 @@ public sealed class InvalidComputeContextCopyAnalyzer : DiagnosticAnalyzer
|
||||
if (context.Operation is IArgumentOperation { Parameter.RefKind: RefKind.None } operation)
|
||||
{
|
||||
CheckCopyability(context, operation.Value);
|
||||
}
|
||||
}
|
||||
}, OperationKind.Argument);
|
||||
|
||||
// Returns
|
||||
@@ -358,4 +358,4 @@ public sealed class InvalidComputeContextCopyAnalyzer : DiagnosticAnalyzer
|
||||
kind is (OperationKind.ObjectCreation or OperationKind.DefaultValue or OperationKind.Literal or OperationKind.Invocation) ||
|
||||
(kind is (OperationKind.None or OperationKind.Invalid) && operation.Syntax is InvocationExpressionSyntax); // Workaround for https://github.com/dotnet/roslyn/issues/49751
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis;
|
||||
|
||||
namespace ComputeSharp.SourceGeneration.Diagnostics;
|
||||
|
||||
@@ -729,4 +729,4 @@ partial class DiagnosticDescriptors
|
||||
isEnabledByDefault: true,
|
||||
description: "The ComputeContext type cannot be copied (and values should rather be passed via ref readonly or in instead) and cannot be used as a field of value types (as it could be indirectly copied).",
|
||||
helpLinkUri: "https://github.com/Sergio0694/ComputeSharp");
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.CodeAnalysis.CSharp;
|
||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||
@@ -38,4 +38,4 @@ internal static class SyntaxFactoryHelper
|
||||
LiteralExpression(SyntaxKind.StringLiteralExpression, Literal(group.A)),
|
||||
LiteralExpression(SyntaxKind.StringLiteralExpression, Literal(group.B))))).ToArray()));
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Text;
|
||||
using ComputeSharp.__Internals;
|
||||
@@ -296,4 +296,4 @@ partial class IShaderGenerator
|
||||
return statements.ToImmutable();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
@@ -340,7 +340,7 @@ partial class IShaderGenerator
|
||||
|
||||
using ImmutableArrayBuilder<(string, string)> methods = ImmutableArrayBuilder<(string, string)>.Rent();
|
||||
|
||||
string ? entryPoint = null;
|
||||
string? entryPoint = null;
|
||||
bool isSamplerUsed = false;
|
||||
|
||||
foreach (MethodDeclarationSyntax methodDeclaration in methodDeclarations)
|
||||
@@ -455,7 +455,7 @@ partial class IShaderGenerator
|
||||
{
|
||||
using ImmutableArrayBuilder<(string, string)> builder = ImmutableArrayBuilder<(string, string)>.Rent();
|
||||
|
||||
IReadOnlyCollection <INamedTypeSymbol> invalidTypes;
|
||||
IReadOnlyCollection<INamedTypeSymbol> invalidTypes;
|
||||
|
||||
// Process the discovered types
|
||||
foreach (var type in HlslKnownTypes.GetCustomTypes(types, out invalidTypes))
|
||||
@@ -789,4 +789,4 @@ partial class IShaderGenerator
|
||||
hlslSourceInfo.EntryPoint;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using ComputeSharp.__Internals;
|
||||
using Microsoft.CodeAnalysis.CSharp;
|
||||
@@ -94,4 +94,4 @@ partial class IShaderGenerator
|
||||
return Block(blockStatements);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Immutable;
|
||||
using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
using Microsoft.CodeAnalysis;
|
||||
|
||||
@@ -28,4 +28,4 @@ partial class IShaderGenerator
|
||||
.ToImmutableArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Text;
|
||||
using ComputeSharp.__Internals;
|
||||
using ComputeSharp.SourceGeneration.Helpers;
|
||||
@@ -251,4 +251,4 @@ partial class IShaderGenerator
|
||||
return builder.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Immutable;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
@@ -276,4 +276,4 @@ partial class IShaderGenerator
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Immutable;
|
||||
using System.Collections.Immutable;
|
||||
using ComputeSharp.__Internals;
|
||||
using ComputeSharp.SourceGeneration.Helpers;
|
||||
using ComputeSharp.SourceGenerators.Models;
|
||||
@@ -264,4 +264,4 @@ partial class IShaderGenerator
|
||||
return statements.ToImmutable();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
@@ -185,4 +185,4 @@ partial class IShaderGenerator
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Immutable;
|
||||
using System.Globalization;
|
||||
using ComputeSharp.__Internals;
|
||||
@@ -135,4 +135,4 @@ partial class IShaderGenerator
|
||||
return statements.ToImmutable();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Immutable;
|
||||
using System.Collections.Immutable;
|
||||
using ComputeSharp.SourceGeneration.Helpers;
|
||||
using ComputeSharp.SourceGeneration.Mappings;
|
||||
using ComputeSharp.SourceGenerators.Models;
|
||||
@@ -63,4 +63,4 @@ partial class IShaderGenerator
|
||||
descriptors.ToImmutable());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using ComputeSharp.SourceGeneration.Models;
|
||||
using ComputeSharp.SourceGenerators.Models;
|
||||
@@ -94,4 +94,4 @@ partial class IShaderGenerator
|
||||
|
||||
return hierarchyInfo.GetSyntax(methodDeclaration.AddAttributeLists(attributes.ToArray()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
@@ -136,7 +136,7 @@ public sealed partial class IShaderGenerator : IIncrementalGenerator
|
||||
});
|
||||
|
||||
// Get the LoadDispatchData() info (hierarchy and dispatch data info)
|
||||
IncrementalValuesProvider<((HierarchyInfo Hierarchy, DispatchDataInfo DispatchData) Info, bool CanUseSkipLocalsInit) > dispatchDataInfo =
|
||||
IncrementalValuesProvider<((HierarchyInfo Hierarchy, DispatchDataInfo DispatchData) Info, bool CanUseSkipLocalsInit)> dispatchDataInfo =
|
||||
shaderInfoWithErrors
|
||||
.Select(static (item, _) => (item.Hierarchy, item.DispatchData))
|
||||
.Combine(canUseSkipLocalsInit);
|
||||
@@ -244,4 +244,4 @@ public sealed partial class IShaderGenerator : IIncrementalGenerator
|
||||
context.AddSource($"{item.Info.Hierarchy.FilenameHint}.{nameof(LoadBytecode)}.g.cs", text);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ComputeSharp.SourceGeneration.Mappings;
|
||||
|
||||
@@ -14,4 +14,4 @@ internal static partial class HlslKnownKeywords
|
||||
knownKeywords.Add(nameof(GroupSize));
|
||||
knownKeywords.Add(nameof(GridIds));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,4 +27,4 @@ partial class HlslKnownMethods
|
||||
[$"ComputeSharp.IReadOnlyNormalizedTexture3D`1.Sample({typeof(Float3).FullName})"] = null
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
@@ -170,4 +170,4 @@ partial class HlslKnownProperties
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using ComputeSharp.SourceGeneration.Extensions;
|
||||
@@ -38,8 +38,8 @@ partial class HlslKnownTypes
|
||||
{
|
||||
return typeName switch
|
||||
{
|
||||
"ComputeSharp.ConstantBuffer`1" or
|
||||
"ComputeSharp.ReadOnlyBuffer`1" or
|
||||
"ComputeSharp.ConstantBuffer`1" or
|
||||
"ComputeSharp.ReadOnlyBuffer`1" or
|
||||
"ComputeSharp.ReadWriteBuffer`1" => true,
|
||||
_ => false
|
||||
};
|
||||
@@ -210,4 +210,4 @@ partial class HlslKnownTypes
|
||||
// Construct the HLSL type name
|
||||
return $"RWTexture2D<unorm {mappedElementType}>";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using ComputeSharp.SourceGeneration.Extensions;
|
||||
@@ -49,4 +49,4 @@ internal sealed record DispatchDataInfo(
|
||||
x.Root32BitConstantCount == y.Root32BitConstantCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using ComputeSharp.SourceGeneration.Extensions;
|
||||
@@ -35,4 +35,4 @@ internal sealed record DispatchIdInfo(ImmutableArray<string> Delegates)
|
||||
return x.Delegates.SequenceEqual(y.Delegates);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using ComputeSharp.SourceGeneration.Extensions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using ComputeSharp.SourceGeneration.Extensions;
|
||||
@@ -45,4 +45,4 @@ internal sealed record EmbeddedBytecodeInfo(int X, int Y, int Z, ImmutableArray<
|
||||
x.Bytecode.SequenceEqual(y.Bytecode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using ComputeSharp.SourceGeneration.Extensions;
|
||||
@@ -139,4 +139,4 @@ internal abstract record FieldInfo
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using ComputeSharp.SourceGeneration.Extensions;
|
||||
@@ -53,4 +53,4 @@ internal sealed record HlslMethodSourceInfo(
|
||||
x.DependentMethods.SequenceEqual(y.DependentMethods);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using ComputeSharp.SourceGeneration.Extensions;
|
||||
@@ -89,4 +89,4 @@ internal sealed record HlslShaderSourceInfo(
|
||||
x.Delegates.SequenceEqual(y.Delegates);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace ComputeSharp.SourceGenerators.Models;
|
||||
namespace ComputeSharp.SourceGenerators.Models;
|
||||
|
||||
/// <summary>
|
||||
/// A resource descriptor for a captured resource in a shader.
|
||||
@@ -6,4 +6,4 @@
|
||||
/// <param name="TypeId">The type id for the resource.</param>
|
||||
/// <param name="RegisterOffset">The offset of the resource in its containing register.</param>
|
||||
/// <param name="Offset">The offset of the resource descriptor in the shader root signature.</param>
|
||||
internal sealed record ResourceDescriptor(int TypeId, int RegisterOffset, int Offset);
|
||||
internal sealed record ResourceDescriptor(int TypeId, int RegisterOffset, int Offset);
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using ComputeSharp.SourceGeneration.Extensions;
|
||||
@@ -62,4 +62,4 @@ internal sealed record ShaderInfo(
|
||||
x.Diagnostcs.SequenceEqual(y.Diagnostcs);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using ComputeSharp.SourceGeneration.Extensions;
|
||||
@@ -40,4 +40,4 @@ internal sealed record ShaderMethodInfo(HlslMethodSourceInfo HlslMethodSource, I
|
||||
x.Diagnostcs.SequenceEqual(y.Diagnostcs);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace ComputeSharp.SourceGenerators.Models;
|
||||
namespace ComputeSharp.SourceGenerators.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates a type of shader being processed.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace ComputeSharp.SourceGenerators.Models;
|
||||
namespace ComputeSharp.SourceGenerators.Models;
|
||||
|
||||
/// <summary>
|
||||
/// A model representing gathered info on a embedded thread ids.
|
||||
@@ -7,4 +7,4 @@
|
||||
/// <param name="X">The thread ids value for the X axis.</param>
|
||||
/// <param name="Y">The thread ids value for the Y axis.</param>
|
||||
/// <param name="Z">The thread ids value for the Z axis.</param>
|
||||
internal sealed record ThreadIdsInfo(bool IsDefault, int X, int Y, int Z);
|
||||
internal sealed record ThreadIdsInfo(bool IsDefault, int X, int Y, int Z);
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
@@ -188,4 +188,4 @@ public sealed partial class ShaderMethodSourceGenerator : IIncrementalGenerator
|
||||
.NormalizeWhitespace(eol: "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using ComputeSharp.SourceGeneration.SyntaxRewriters;
|
||||
using ComputeSharp.SourceGeneration.SyntaxRewriters;
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.CSharp;
|
||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||
@@ -194,4 +194,4 @@ internal abstract class ExecuteMethodRewriter : CSharpSyntaxRewriter
|
||||
return updatedNode;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using ComputeSharp.SourceGeneration.Extensions;
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.CSharp;
|
||||
@@ -85,4 +85,4 @@ partial class ShaderSourceRewriter
|
||||
{
|
||||
// No special tracking is needed for DX12 compute shaders
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using ComputeSharp.SourceGeneration.Extensions;
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||
@@ -40,4 +40,4 @@ partial class StaticFieldRewriter
|
||||
{
|
||||
// No special tracking is needed for DX12 compute shaders
|
||||
}
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする