More minor code style tweaks (remove extra blank lines, etc.)
このコミットが含まれているのは:
1 親
8be9203a1c
コミット
f2ed8a2d3b
22ファイル変更
+39
-38
検索条件に一致するファイルはありません
+1
@@ -234,6 +234,7 @@ partial class IShaderGenerator
|
||||
ParseExpression($"global::System.Runtime.CompilerServices.Unsafe.As<uint, {rowTypeName}>(ref global::System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref r0, (nint){matrix.Offsets[j]}))"),
|
||||
ParseExpression($"global::System.Runtime.CompilerServices.Unsafe.Add(ref {rowLocalName}, {j})"))));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -44,7 +44,7 @@ partial class IShaderGenerator
|
||||
.WithType(IdentifierName("TLoader")),
|
||||
Parameter(Identifier("result"))
|
||||
.AddModifiers(Token(SyntaxKind.OutKeyword))
|
||||
.WithType(IdentifierName($"global::System.{typeof(IntPtr).Name}")))
|
||||
.WithType(IdentifierName($"global::System.{nameof(IntPtr)}")))
|
||||
.WithBody(Block(GetDispatchMetadataLoadingStatements(metadataInfo)));
|
||||
}
|
||||
|
||||
@@ -122,7 +122,6 @@ partial class IShaderGenerator
|
||||
statements.Add(ParseStatement($"global::System.Runtime.CompilerServices.Unsafe.WriteUnaligned<int>(ref global::System.Runtime.CompilerServices.Unsafe.Add(ref r0, 0), {metadataInfo.Root32BitConstantCount});"));
|
||||
statements.Add(ParseStatement($"global::System.Runtime.CompilerServices.Unsafe.WriteUnaligned<bool>(ref global::System.Runtime.CompilerServices.Unsafe.Add(ref r0, 4), {metadataInfo.IsSamplerUsed.ToString(CultureInfo.InvariantCulture).ToLowerInvariant()});"));
|
||||
|
||||
|
||||
// Populate the sequence of resource descriptors
|
||||
foreach (ResourceDescriptor descriptor in metadataInfo.ResourceDescriptors)
|
||||
{
|
||||
|
||||
@@ -92,7 +92,7 @@ partial class HlslKnownProperties
|
||||
// Programmatically load mappings for the normalized thread ids
|
||||
foreach (PropertyInfo? property in typeof(ThreadIds.Normalized).GetProperties(BindingFlags.Static | BindingFlags.Public))
|
||||
{
|
||||
string key = $"{typeof(ThreadIds).FullName}{Type.Delimiter}{typeof(ThreadIds.Normalized).Name}{Type.Delimiter}{property.Name}";
|
||||
string key = $"{typeof(ThreadIds).FullName}{Type.Delimiter}{nameof(ThreadIds.Normalized)}{Type.Delimiter}{property.Name}";
|
||||
|
||||
// The normalized value must be in the [0, 1] range, inclusive. As such, the expression is rewritten to be:
|
||||
// 1D: (float)ThreadIds.<XYZ> / (float)(max(1, __<xyz> - 1));
|
||||
@@ -105,11 +105,11 @@ partial class HlslKnownProperties
|
||||
switch (property.Name)
|
||||
{
|
||||
case string name when name.Length == 1:
|
||||
knownProperties.Add(key, $"(float){typeof(ThreadIds).Name}.{char.ToLowerInvariant(name[0])} / (float)(max(1, __{char.ToLowerInvariant(name[0])} - 1))");
|
||||
knownProperties.Add(key, $"(float){nameof(ThreadIds)}.{char.ToLowerInvariant(name[0])} / (float)(max(1, __{char.ToLowerInvariant(name[0])} - 1))");
|
||||
break;
|
||||
case string name when name.Length == 2:
|
||||
{
|
||||
string numerator = $"float2({typeof(ThreadIds).Name}.{char.ToLowerInvariant(name[0])}, {typeof(ThreadIds).Name}.{char.ToLowerInvariant(name[1])})";
|
||||
string numerator = $"float2({nameof(ThreadIds)}.{char.ToLowerInvariant(name[0])}, {nameof(ThreadIds)}.{char.ToLowerInvariant(name[1])})";
|
||||
string denominator = $"float2(max(1, int2(__{char.ToLowerInvariant(name[0])}, __{char.ToLowerInvariant(name[1])}) - 1))";
|
||||
|
||||
knownProperties.Add(key, $"{numerator} / {denominator}");
|
||||
@@ -117,7 +117,7 @@ partial class HlslKnownProperties
|
||||
}
|
||||
case string name when name.Length == 3:
|
||||
{
|
||||
string numerator = $"float3({typeof(ThreadIds).Name}.{char.ToLowerInvariant(name[0])}, {typeof(ThreadIds).Name}.{char.ToLowerInvariant(name[1])}, {typeof(ThreadIds).Name}.{char.ToLowerInvariant(name[2])})";
|
||||
string numerator = $"float3({nameof(ThreadIds)}.{char.ToLowerInvariant(name[0])}, {nameof(ThreadIds)}.{char.ToLowerInvariant(name[1])}, {nameof(ThreadIds)}.{char.ToLowerInvariant(name[2])})";
|
||||
string denominator = $"float3(max(1, int3(__{char.ToLowerInvariant(name[0])}, __{char.ToLowerInvariant(name[1])}, __{char.ToLowerInvariant(name[2])}) - 1))";
|
||||
|
||||
knownProperties.Add(key, $"{numerator} / {denominator}");
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする