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/259960
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/OutputHLSL.cpp b/src/compiler/translator/OutputHLSL.cpp
index f3aa556..29ce37b 100644
--- a/src/compiler/translator/OutputHLSL.cpp
+++ b/src/compiler/translator/OutputHLSL.cpp
@@ -143,16 +143,10 @@
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