Don't use roundEven() to implement round() in DX9 compatibility mode
This commit is contained in:
parent
a5be11bd8b
commit
589aaff11c
7 changed files with 145 additions and 1 deletions
|
|
@ -5492,6 +5492,10 @@ TIntermTyped* HlslParseContext::handleFunctionCall(const TSourceLoc& loc, TFunct
|
|||
|
||||
op = fnCandidate->getBuiltInOp();
|
||||
if (builtIn && op != EOpNull) {
|
||||
// SM 4.0 and above guarantees roundEven semantics for round()
|
||||
if (!hlslDX9Compatible() && op == EOpRound)
|
||||
op = EOpRoundEven;
|
||||
|
||||
// A function call mapped to a built-in operation.
|
||||
result = intermediate.addBuiltInFunctionCall(loc, op, fnCandidate->getParamCount() == 1, arguments,
|
||||
fnCandidate->getType());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue