Commit 27776e33 by Olli Etuaho Committed by Commit Bot

Fix member variable masking warning in standalone MSVS build

The patch for initializing output variables introduced a warning that broke MSVS 2015 standalone build. The "shaderType" variable passed to TCompiler::initializeOutputVariables was unnecessary and had the same name as a member variable of TCompiler that stores the shader type. TEST=MSVS 2015 build Change-Id: I9e01f5eae77a88babde21d4864a02c8731a220de Reviewed-on: https://chromium-review.googlesource.com/362550Reviewed-by: 's avatarOlli Etuaho <oetuaho@nvidia.com> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
parent 72111915
...@@ -364,7 +364,7 @@ TIntermNode *TCompiler::compileTreeImpl(const char *const shaderStrings[], ...@@ -364,7 +364,7 @@ TIntermNode *TCompiler::compileTreeImpl(const char *const shaderStrings[],
} }
if (success && (compileOptions & SH_INIT_OUTPUT_VARIABLES)) if (success && (compileOptions & SH_INIT_OUTPUT_VARIABLES))
{ {
initializeOutputVariables(root, shaderType); initializeOutputVariables(root);
} }
} }
...@@ -818,7 +818,7 @@ void TCompiler::initializeGLPosition(TIntermNode* root) ...@@ -818,7 +818,7 @@ void TCompiler::initializeGLPosition(TIntermNode* root)
InitializeVariables(root, list); InitializeVariables(root, list);
} }
void TCompiler::initializeOutputVariables(TIntermNode *root, sh::GLenum shaderType) void TCompiler::initializeOutputVariables(TIntermNode *root)
{ {
InitVariableList list; InitVariableList list;
if (shaderType == GL_VERTEX_SHADER) if (shaderType == GL_VERTEX_SHADER)
......
...@@ -132,7 +132,7 @@ class TCompiler : public TShHandleBase ...@@ -132,7 +132,7 @@ class TCompiler : public TShHandleBase
bool enforcePackingRestrictions(); bool enforcePackingRestrictions();
// Insert statements to initialize output variables in the beginning of main(). // Insert statements to initialize output variables in the beginning of main().
// This is to avoid undefined behaviors. // This is to avoid undefined behaviors.
void initializeOutputVariables(TIntermNode *root, sh::GLenum shaderType); void initializeOutputVariables(TIntermNode *root);
// Insert gl_Position = vec4(0,0,0,0) to the beginning of main(). // Insert gl_Position = vec4(0,0,0,0) to the beginning of main().
// It is to work around a Linux driver bug where missing this causes compile failure // It is to work around a Linux driver bug where missing this causes compile failure
// while spec says it is allowed. // while spec says it is allowed.
......
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