Remove gl::Varying::elementIndex.

We only assigned to elementIndex, and never referenced the value
at any point in our code.

BUG=angle:466

Change-Id: I541a353110bcd1863b07b21bcf21fad38be19ca1
Reviewed-on: https://chromium-review.googlesource.com/199735
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
Jamie Madill 2014-05-14 13:49:09 -04:00
Родитель 11c3b30ffb
Коммит 4f8fcc2416
3 изменённых файлов: 1 добавлений и 9 удалений

Просмотреть файл

@ -106,14 +106,12 @@ struct Varying : public ShaderVariable
InterpolationType interpolation;
std::vector<Varying> fields;
unsigned int registerIndex; // Assigned during link
unsigned int elementIndex; // First register element for varyings, assigned during link
std::string structName;
Varying(GLenum typeIn, GLenum precisionIn, const char *nameIn, unsigned int arraySizeIn, InterpolationType interpolationIn)
: ShaderVariable(typeIn, precisionIn, nameIn, arraySizeIn),
interpolation(interpolationIn),
registerIndex(GL_INVALID_INDEX),
elementIndex(GL_INVALID_INDEX)
registerIndex(GL_INVALID_INDEX)
{}
bool isStruct() const { return !fields.empty(); }
@ -122,7 +120,6 @@ struct Varying : public ShaderVariable
void resetRegisterAssignment()
{
registerIndex = GL_INVALID_INDEX;
elementIndex = GL_INVALID_INDEX;
}
};

Просмотреть файл

@ -118,7 +118,6 @@ static bool packVarying(Varying *varying, const int maxVaryingVectors, const Sha
if (available)
{
varying->registerIndex = r;
varying->elementIndex = 0;
for (int y = 0; y < registers; y++)
{
@ -152,7 +151,6 @@ static bool packVarying(Varying *varying, const int maxVaryingVectors, const Sha
if (available)
{
varying->registerIndex = r;
varying->elementIndex = 2;
for (int y = 0; y < registers; y++)
{
@ -206,8 +204,6 @@ static bool packVarying(Varying *varying, const int maxVaryingVectors, const Sha
}
}
varying->elementIndex = column;
success = true;
}
}

Просмотреть файл

@ -1032,7 +1032,6 @@ bool ProgramBinary::linkVaryings(InfoLog &infoLog, FragmentShader *fragmentShade
}
output->registerIndex = input->registerIndex;
output->elementIndex = input->elementIndex;
matched = true;
break;