Skip to content

Commit a68ec83

Browse files
authored
Merge pull request #15 from slangbot/format-5692-aleino/wgsl-signedness-mismatch-fixes
Format code for PR shader-slang#5692
2 parents 93330ed + 87f61e0 commit a68ec83

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

+3-4
Original file line numberDiff line numberDiff line change
@@ -1516,16 +1516,15 @@ struct LegalizeWGSLEntryPointContext
15161516
builder.replaceOperand(inst->getOperands(), newLhs);
15171517
}
15181518
else if (
1519-
isIntegralType(inst->getOperand(0)->getDataType()) &&
1520-
isIntegralType(inst->getOperand(1)->getDataType()))
1519+
isIntegralType(inst->getOperand(0)->getDataType()) &&
1520+
isIntegralType(inst->getOperand(1)->getDataType()))
15211521
{
15221522
// If integer operands differ in signedness, convert the signed one to unsigned.
15231523
// We're assuming that the cases where this is bad have already been caught by
15241524
// common validation checks.
15251525
IntInfo opIntInfo[2] = {
15261526
getIntTypeInfo(inst->getOperand(0)->getDataType()),
1527-
getIntTypeInfo(inst->getOperand(1)->getDataType())
1528-
};
1527+
getIntTypeInfo(inst->getOperand(1)->getDataType())};
15291528
if (opIntInfo[0].isSigned != opIntInfo[1].isSigned)
15301529
{
15311530
int signedOpIndex = (int)opIntInfo[1].isSigned;

0 commit comments

Comments
 (0)