You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an input shader includes an integer variable with the minimum possible value, gfauto doesn't handle it properly.
The reason for this behavior is that the visitUnaryExpr method in StandardVisitor passes the integer without the sign to the LiteralToUniformReductionOpportunity class and the positive value goes out of range.
Here's a stacktrace which is the result of having the value -2147483648 in one of the unit tests:
java.lang.NumberFormatException: For input string: "2147483648"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:587)
at java.lang.Integer.parseInt(Integer.java:615)
at com.graphicsfuzz.common.ast.expr.IntConstantExpr.getNumericValue(IntConstantExpr.java:48)
at com.graphicsfuzz.reducer.reductionopportunities.LiteralToUniformReductionOpportunity.applyReductionImpl(LiteralToUniformReductionOpportunity.java:70)
at com.graphicsfuzz.reducer.reductionopportunities.AbstractReductionOpportunity.applyReduction(AbstractReductionOpportunity.java:39)
at java.util.ArrayList.forEach(ArrayList.java:1259)
at com.graphicsfuzz.reducer.reductionopportunities.LiteralToUniformReductionOpportunitiesTest.testReplaceSimpleInt(LiteralToUniformReductionOpportunitiesTest.java:80)
The text was updated successfully, but these errors were encountered:
If an input shader includes an integer variable with the minimum possible value, gfauto doesn't handle it properly.
The reason for this behavior is that the
visitUnaryExpr
method inStandardVisitor
passes the integer without the sign to theLiteralToUniformReductionOpportunity
class and the positive value goes out of range.Here's a stacktrace which is the result of having the value
-2147483648
in one of the unit tests:The text was updated successfully, but these errors were encountered: