Commit e5590288 by Jamie Madill Committed by Commit Bot

Rename "texelFetchInvoked" to "texelFetchStaticUse".

Technically more precise because something could be statically used and never invoked. Also more consistent with the spec. Bug: angleproject:5176 Change-Id: I70dd0787d67d9f046b7359abb24107cb430f5cae Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2483465 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarMohan Maiya <m.maiya@samsung.com> Reviewed-by: 's avatarCourtney Goeltzenleuchter <courtneygo@google.com>
parent 00a49766
......@@ -201,7 +201,7 @@ struct ShaderVariable
bool isSameVaryingAtLinkTime(const ShaderVariable &other) const;
// If the variable is a sampler that has ever been statically used with texelFetch
bool texelFetchInvoked;
bool texelFetchStaticUse;
protected:
bool isSameVariableAtLinkTime(const ShaderVariable &other,
......
......@@ -48,7 +48,7 @@ ShaderVariable::ShaderVariable(GLenum typeIn)
index(-1),
interpolation(INTERPOLATION_SMOOTH),
isInvariant(false),
texelFetchInvoked(false),
texelFetchStaticUse(false),
flattenedOffsetInParentArrays(-1)
{}
......@@ -80,7 +80,7 @@ ShaderVariable::ShaderVariable(const ShaderVariable &other)
index(other.index),
interpolation(other.interpolation),
isInvariant(other.isInvariant),
texelFetchInvoked(other.texelFetchInvoked),
texelFetchStaticUse(other.texelFetchStaticUse),
flattenedOffsetInParentArrays(other.flattenedOffsetInParentArrays)
{}
......@@ -106,7 +106,7 @@ ShaderVariable &ShaderVariable::operator=(const ShaderVariable &other)
index = other.index;
interpolation = other.interpolation;
isInvariant = other.isInvariant;
texelFetchInvoked = other.texelFetchInvoked;
texelFetchStaticUse = other.texelFetchStaticUse;
return *this;
}
......@@ -120,7 +120,7 @@ bool ShaderVariable::operator==(const ShaderVariable &other) const
binding != other.binding || imageUnitFormat != other.imageUnitFormat ||
offset != other.offset || readonly != other.readonly || writeonly != other.writeonly ||
index != other.index || interpolation != other.interpolation ||
isInvariant != other.isInvariant || texelFetchInvoked != other.texelFetchInvoked)
isInvariant != other.isInvariant || texelFetchStaticUse != other.texelFetchStaticUse)
{
return false;
}
......
......@@ -68,7 +68,7 @@ class FlagSamplersWithTexelFetchTraverser : public TIntermTraverser
if (samplerVariable.name() == uniform.name)
{
ASSERT(gl::IsSamplerType(uniform.type));
uniform.texelFetchInvoked = true;
uniform.texelFetchStaticUse = true;
break;
}
}
......
......@@ -889,7 +889,7 @@ void WriteShaderVar(BinaryOutputStream *stream, const sh::ShaderVariable &var)
stream->writeInt(var.offset);
stream->writeInt(var.readonly);
stream->writeInt(var.writeonly);
stream->writeInt(var.texelFetchInvoked);
stream->writeInt(var.texelFetchStaticUse);
ASSERT(var.fields.empty());
}
......@@ -907,11 +907,11 @@ void LoadShaderVar(BinaryInputStream *stream, sh::ShaderVariable *var)
var->structName = stream->readString();
var->setParentArrayIndex(stream->readInt<int>());
var->imageUnitFormat = stream->readInt<GLenum>();
var->offset = stream->readInt<int>();
var->readonly = stream->readBool();
var->writeonly = stream->readBool();
var->texelFetchInvoked = stream->readBool();
var->imageUnitFormat = stream->readInt<GLenum>();
var->offset = stream->readInt<int>();
var->readonly = stream->readBool();
var->writeonly = stream->readBool();
var->texelFetchStaticUse = stream->readBool();
}
// VariableLocation implementation.
......
......@@ -469,11 +469,11 @@ class FlattenUniformVisitor : public sh::VariableNameVisitor
LinkedUniform linkedUniform(variable.type, variable.precision, fullNameWithArrayIndex,
variable.arraySizes, getBinding(), getOffset(), mLocation,
-1, sh::kDefaultBlockMemberInfo);
linkedUniform.mappedName = fullMappedNameWithArrayIndex;
linkedUniform.active = mMarkActive;
linkedUniform.staticUse = mMarkStaticUse;
linkedUniform.outerArraySizes = arraySizes;
linkedUniform.texelFetchInvoked = variable.texelFetchInvoked;
linkedUniform.mappedName = fullMappedNameWithArrayIndex;
linkedUniform.active = mMarkActive;
linkedUniform.staticUse = mMarkStaticUse;
linkedUniform.outerArraySizes = arraySizes;
linkedUniform.texelFetchStaticUse = variable.texelFetchStaticUse;
if (variable.hasParentArrayIndex())
{
linkedUniform.setParentArrayIndex(variable.parentArrayIndex());
......
......@@ -597,7 +597,7 @@ void SerializeShaderVariable(gl::BinaryOutputStream *bos, const sh::ShaderVariab
bos->writeInt(shaderVariable.index);
bos->writeEnum(shaderVariable.interpolation);
bos->writeInt(shaderVariable.isInvariant);
bos->writeInt(shaderVariable.texelFetchInvoked);
bos->writeInt(shaderVariable.texelFetchStaticUse);
}
void SerializeShaderVariablesVector(gl::BinaryOutputStream *bos,
......
......@@ -1428,7 +1428,7 @@ angle::Result ProgramExecutableVk::updateTexturesDescriptorSet(ContextVk *contex
vk::ImageHelper &image = textureVk->getImage();
bool shouldUseLinearColorspace = textureVk->shouldUseLinearColorspaceWithTexelFetch(
linearColorspaceWithSampler, samplerUniform.texelFetchInvoked);
linearColorspaceWithSampler, samplerUniform.texelFetchStaticUse);
imageInfos[arrayElement].sampler = samplerHelper.get().getHandle();
imageInfos[arrayElement].imageLayout = image.getCurrentLayout();
......
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