Skip to content

Commit c03b9df

Browse files
committed
format code
1 parent d632a8a commit c03b9df

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

source/slang/slang-emit-wgsl.cpp

+4-6
Original file line numberDiff line numberDiff line change
@@ -1506,8 +1506,7 @@ void WGSLSourceEmitter::emitIntrinsicCallExprImpl(
15061506
inOuterPrec);
15071507
}
15081508

1509-
void WGSLSourceEmitter::_maybeEmitInterpolationAttribute(
1510-
IRInterpolationMode mode)
1509+
void WGSLSourceEmitter::_maybeEmitInterpolationAttribute(IRInterpolationMode mode)
15111510
{
15121511
bool interpolationTypeEmitted = true;
15131512
switch (mode)
@@ -1535,12 +1534,11 @@ void WGSLSourceEmitter::_maybeEmitInterpolationAttribute(
15351534
m_writer->emit(", centroid");
15361535
break;
15371536
default:
1538-
break;
1537+
break;
15391538
}
15401539

15411540
m_writer->emit(") ");
1542-
}
1543-
1541+
}
15441542
}
15451543

15461544
void WGSLSourceEmitter::emitInterpolationModifiersImpl(
@@ -1555,7 +1553,7 @@ void WGSLSourceEmitter::emitInterpolationModifiersImpl(
15551553
continue;
15561554
auto decoration = (IRInterpolationModeDecoration*)dd;
15571555
_maybeEmitInterpolationAttribute(decoration->getMode());
1558-
}
1556+
}
15591557

15601558
// TODO: Check the following:
15611559
// "User-defined vertex outputs and fragment inputs of scalar or vector

source/slang/slang-ir-wgsl-legalize.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,8 @@ struct LegalizeWGSLEntryPointContext
675675
auto newKey = builder.createStructKey();
676676
copyNameHintAndDebugDecorations(newKey, oldKey);
677677

678-
if (auto interpolationModeDecoration = oldKey->findDecoration<IRInterpolationModeDecoration>())
678+
if (auto interpolationModeDecoration =
679+
oldKey->findDecoration<IRInterpolationModeDecoration>())
679680
{
680681
interpolationModeDecoration->removeFromParent();
681682
interpolationModeDecoration->insertAtStart(newKey);

0 commit comments

Comments
 (0)