Revert "Fixed FL9_3 shaders that use glPointCoord without glPointSize."
Failing test in angle_end2end_tests:
GLSLTest.MaxMinusTwoVaryingVec4PlusTwoSpecialVariables:
program link failed: C:\fakepath(87,5-18): error X4000: variable 'output' used without having been completely initialized
This reverts commit 73e32ee161b7b613e9e25e3cc393851c430eeb98.
Change-Id: Ie47cb3a92ccfa1271a880a8b7e5a87b05963bab9
Reviewed-on: https://chromium-review.googlesource.com/305530
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/d3d/DynamicHLSL.cpp b/src/libANGLE/renderer/d3d/DynamicHLSL.cpp
index b9fae27..6e386f9 100644
--- a/src/libANGLE/renderer/d3d/DynamicHLSL.cpp
+++ b/src/libANGLE/renderer/d3d/DynamicHLSL.cpp
@@ -775,10 +775,6 @@
bool usesPointCoord = fragmentShader->mUsesPointCoord;
bool usesPointSize = vertexShader->mUsesPointSize;
bool useInstancedPointSpriteEmulation = usesPointSize && mRenderer->getWorkarounds().useInstancedPointSpriteEmulation;
- bool insertDummyPointCoordValue = !usesPointSize && usesPointCoord &&
- mRenderer->getWorkarounds().useInstancedPointSpriteEmulation;
- bool addPointCoord = (useInstancedPointSpriteEmulation && usesPointCoord) ||
- insertDummyPointCoordValue || (!usesPointSize && usesPointCoord);
// Validation done in the compiler
ASSERT(!fragmentShader->mUsesFragColor || !fragmentShader->mUsesFragData);
@@ -815,9 +811,9 @@
// generated pixel shader.
// The Geometry Shader point sprite implementation needs gl_PointSize to be in VS_OUTPUT and GS_INPUT.
// Instanced point sprites doesn't need gl_PointSize in VS_OUTPUT.
- const SemanticInfo &vertexSemantics =
- getSemanticInfo(registers, outputPositionFromVS, usesFragCoord, addPointCoord,
- (!useInstancedPointSpriteEmulation && usesPointSize), false);
+ const SemanticInfo &vertexSemantics = getSemanticInfo(registers, outputPositionFromVS,
+ usesFragCoord, (useInstancedPointSpriteEmulation && usesPointCoord),
+ (!useInstancedPointSpriteEmulation && usesPointSize), false);
storeUserLinkedVaryings(packedVaryings, usesPointSize, linkedVaryings);
storeBuiltinLinkedVaryings(vertexSemantics, linkedVaryings);
@@ -933,18 +929,6 @@
}
}
- // Renderers that enable instanced pointsprite emulation require the vertex shader output member
- // gl_PointCoord
- // to be set to a default value if used without gl_PointSize. 0.5,0.5 is the same default value
- // used in the
- // generated pixel shader.
- if (insertDummyPointCoordValue)
- {
- vertexHLSL +=
- "\n"
- " output.gl_PointCoord = float2(0.5, 0.5);\n";
- }
-
vertexHLSL += "\n"
" return output;\n"
"}\n";