Commit 6341939f by Arun Patole Committed by Olli Etuaho

Fix code duplication in OutputHLSL

While debugging, I came across the piece of code in OutputHLSL::OutputHLSL which is unnecessarily duplicated, this change just fixes it. Change-Id: I0549d58696417ccf651bacfa19f489b290d4ba6e Reviewed-on: https://chromium-review.googlesource.com/259960Reviewed-by: 's avatarOlli Etuaho <oetuaho@nvidia.com> Tested-by: 's avatarOlli Etuaho <oetuaho@nvidia.com>
parent 0110e172
......@@ -143,16 +143,10 @@ OutputHLSL::OutputHLSL(sh::GLenum shaderType, int shaderVersion,
if (mOutputType == SH_HLSL9_OUTPUT)
{
if (mShaderType == GL_FRAGMENT_SHADER)
{
// Reserve registers for dx_DepthRange, dx_ViewCoords and dx_DepthFront
mUniformHLSL->reserveUniformRegisters(3);
}
else
{
// Reserve registers for dx_DepthRange, dx_ViewAdjust and dx_ViewCoords
mUniformHLSL->reserveUniformRegisters(3);
}
// Fragment shaders need dx_DepthRange, dx_ViewCoords and dx_DepthFront.
// Vertex shaders need a slightly different set: dx_DepthRange, dx_ViewCoords and dx_ViewAdjust.
// In both cases total 3 uniform registers need to be reserved.
mUniformHLSL->reserveUniformRegisters(3);
}
// Reserve registers for the default uniform block and driver constants
......
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