Use blocks for all if statements
このコミットが含まれているのは:
1 親
7a7f6be038
コミット
d910922ef5
28ファイル変更
+239
-59
検索条件に一致するファイルはありません
@@ -466,7 +466,10 @@ partial class IShaderGenerator
|
||||
// Declare the fields of the current type
|
||||
foreach (IFieldSymbol field in type.GetMembers().OfType<IFieldSymbol>())
|
||||
{
|
||||
if (field.IsStatic) continue;
|
||||
if (field.IsStatic)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
INamedTypeSymbol fieldType = (INamedTypeSymbol)field.Type;
|
||||
|
||||
|
||||
@@ -136,7 +136,10 @@ partial class HlslKnownTypes
|
||||
{
|
||||
// Delegate types just return an empty string, as they're not actually
|
||||
// used in the generated shaders, but just mapped to a function at runtime.
|
||||
if (typeSymbol.TypeKind == TypeKind.Delegate) return "";
|
||||
if (typeSymbol.TypeKind == TypeKind.Delegate)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
string typeName = typeSymbol.GetFullMetadataName();
|
||||
|
||||
|
||||
@@ -55,9 +55,18 @@ partial class ShaderSourceRewriter
|
||||
{
|
||||
string typeName = operation.Member.ContainingType.GetFullMetadataName();
|
||||
|
||||
if (mappedName == $"__{nameof(GroupIds)}__get_Index") IsGroupIdsIndexUsed = true;
|
||||
else if (typeName == typeof(GroupIds).FullName) IsGroupIdsUsed = true;
|
||||
else if (typeName == typeof(GridIds).FullName) IsGridIdsUsed = true;
|
||||
if (mappedName == $"__{nameof(GroupIds)}__get_Index")
|
||||
{
|
||||
IsGroupIdsIndexUsed = true;
|
||||
}
|
||||
else if (typeName == typeof(GroupIds).FullName)
|
||||
{
|
||||
IsGroupIdsUsed = true;
|
||||
}
|
||||
else if (typeName == typeof(GridIds).FullName)
|
||||
{
|
||||
IsGridIdsUsed = true;
|
||||
}
|
||||
|
||||
// Check that the dispatch info types are only used from the main shader body
|
||||
if (!this.isEntryPoint || this.localFunctionDepth > 0)
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする