Move the implementations of shader var init to the header.
Making the contructors for shader variables inline saves us from
exporting them across DLL boundaries. This makes it easier to use
them in the translator when building the translator as a DLL.
BUG=angle:466
Change-Id: Iee0556e06dc1f9e98fe9eea6577819305de0dd0b
Reviewed-on: https://chromium-review.googlesource.com/198555
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libGLESv2/ProgramBinary.cpp b/src/libGLESv2/ProgramBinary.cpp
index c3924fa..3cb7e0e 100644
--- a/src/libGLESv2/ProgramBinary.cpp
+++ b/src/libGLESv2/ProgramBinary.cpp
@@ -1574,9 +1574,9 @@
// special case for gl_DepthRange, the only built-in uniform (also a struct)
if (vertexShader->usesDepthRange() || fragmentShader->usesDepthRange())
{
- mUniforms.push_back(new LinkedUniform(GL_FLOAT, GL_HIGH_FLOAT, "gl_DepthRange.near", 0, -1, gl::BlockMemberInfo::getDefaultBlockInfo()));
- mUniforms.push_back(new LinkedUniform(GL_FLOAT, GL_HIGH_FLOAT, "gl_DepthRange.far", 0, -1, gl::BlockMemberInfo::getDefaultBlockInfo()));
- mUniforms.push_back(new LinkedUniform(GL_FLOAT, GL_HIGH_FLOAT, "gl_DepthRange.diff", 0, -1, gl::BlockMemberInfo::getDefaultBlockInfo()));
+ mUniforms.push_back(new LinkedUniform(GL_FLOAT, GL_HIGH_FLOAT, "gl_DepthRange.near", 0, -1, BlockMemberInfo::getDefaultBlockInfo()));
+ mUniforms.push_back(new LinkedUniform(GL_FLOAT, GL_HIGH_FLOAT, "gl_DepthRange.far", 0, -1, BlockMemberInfo::getDefaultBlockInfo()));
+ mUniforms.push_back(new LinkedUniform(GL_FLOAT, GL_HIGH_FLOAT, "gl_DepthRange.diff", 0, -1, BlockMemberInfo::getDefaultBlockInfo()));
}
if (!linkUniformBlocks(infoLog, vertexShader->getInterfaceBlocks(), fragmentShader->getInterfaceBlocks()))
@@ -2022,7 +2022,8 @@
}
else
{
- uniform = new LinkedUniform(constant.type, constant.precision, constant.name, constant.arraySize, -1, gl::BlockMemberInfo::getDefaultBlockInfo());
+ uniform = new LinkedUniform(constant.type, constant.precision, constant.name, constant.arraySize,
+ -1, BlockMemberInfo::getDefaultBlockInfo());
uniform->registerElement = constant.elementIndex;
}