Commit e73a1e84 by Jamie Madill

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 73e32ee1. Change-Id: Ie47cb3a92ccfa1271a880a8b7e5a87b05963bab9 Reviewed-on: https://chromium-review.googlesource.com/305530Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 72e7013e
......@@ -775,10 +775,6 @@ bool DynamicHLSL::generateShaderLinkHLSL(const gl::Data &data,
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 @@ bool DynamicHLSL::generateShaderLinkHLSL(const gl::Data &data,
// 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 @@ bool DynamicHLSL::generateShaderLinkHLSL(const gl::Data &data,
}
}
// 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";
......
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