Commit 1e1b731a by Jamie Madill Committed by Commit Bot

Vulkan: Clean up point coord translation.

Use - 0.5 instead of + -0.5 in FlipGLPointCoord. Bug: angleproject:2673 Change-Id: I819dcc45f9098ea64085eb71af8920fe99b67c62 Reviewed-on: https://chromium-review.googlesource.com/1194454Reviewed-by: 's avatarTobin Ehlis <tobine@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 47f6dd0d
...@@ -188,12 +188,6 @@ void FlipGLPointCoord(TIntermBlock *root, ...@@ -188,12 +188,6 @@ void FlipGLPointCoord(TIntermBlock *root,
TIntermConstantUnion *pointFive = TIntermConstantUnion *pointFive =
new TIntermConstantUnion(constantValuePointFive, *constantType); new TIntermConstantUnion(constantValuePointFive, *constantType);
// Create a constant "-0.5"
TConstantUnion *constantValueMinusPointFive = new TConstantUnion();
constantValueMinusPointFive->setFConst(-0.5f);
TIntermConstantUnion *minusPointFive =
new TIntermConstantUnion(constantValueMinusPointFive, *constantType);
// ANGLEUniforms.viewportScaleFactor // ANGLEUniforms.viewportScaleFactor
TIntermSymbol *angleUniformsRef = new TIntermSymbol(driverUniforms); TIntermSymbol *angleUniformsRef = new TIntermSymbol(driverUniforms);
TConstantUnion *viewportScaleFactorConstant = new TConstantUnion; TConstantUnion *viewportScaleFactorConstant = new TConstantUnion;
...@@ -211,9 +205,9 @@ void FlipGLPointCoord(TIntermBlock *root, ...@@ -211,9 +205,9 @@ void FlipGLPointCoord(TIntermBlock *root,
// Create the expression "(gl_PointCoord.y - 0.5) * ANGLEUniforms.viewportScaleFactor.y + // Create the expression "(gl_PointCoord.y - 0.5) * ANGLEUniforms.viewportScaleFactor.y +
// 0.5 // 0.5
TIntermBinary *removePointFive = new TIntermBinary(EOpAdd, pointCoordY, minusPointFive); TIntermBinary *removePointFive = new TIntermBinary(EOpSub, pointCoordY, pointFive);
TIntermBinary *inverseY = new TIntermBinary(EOpMul, removePointFive, viewportScaleY); TIntermBinary *inverseY = new TIntermBinary(EOpMul, removePointFive, viewportScaleY);
TIntermBinary *plusPointFive = new TIntermBinary(EOpAdd, inverseY, pointFive); TIntermBinary *plusPointFive = new TIntermBinary(EOpAdd, inverseY, pointFive->deepCopy());
// Create the new vec2 using the modified Y // Create the new vec2 using the modified Y
TIntermSequence *sequence = new TIntermSequence(); TIntermSequence *sequence = new TIntermSequence();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment