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 ...@@ -201,7 +201,7 @@ struct ShaderVariable
bool isSameVaryingAtLinkTime(const ShaderVariable &other) const; bool isSameVaryingAtLinkTime(const ShaderVariable &other) const;
// If the variable is a sampler that has ever been statically used with texelFetch // If the variable is a sampler that has ever been statically used with texelFetch
bool texelFetchInvoked; bool texelFetchStaticUse;
protected: protected:
bool isSameVariableAtLinkTime(const ShaderVariable &other, bool isSameVariableAtLinkTime(const ShaderVariable &other,
......
...@@ -48,7 +48,7 @@ ShaderVariable::ShaderVariable(GLenum typeIn) ...@@ -48,7 +48,7 @@ ShaderVariable::ShaderVariable(GLenum typeIn)
index(-1), index(-1),
interpolation(INTERPOLATION_SMOOTH), interpolation(INTERPOLATION_SMOOTH),
isInvariant(false), isInvariant(false),
texelFetchInvoked(false), texelFetchStaticUse(false),
flattenedOffsetInParentArrays(-1) flattenedOffsetInParentArrays(-1)
{} {}
...@@ -80,7 +80,7 @@ ShaderVariable::ShaderVariable(const ShaderVariable &other) ...@@ -80,7 +80,7 @@ ShaderVariable::ShaderVariable(const ShaderVariable &other)
index(other.index), index(other.index),
interpolation(other.interpolation), interpolation(other.interpolation),
isInvariant(other.isInvariant), isInvariant(other.isInvariant),
texelFetchInvoked(other.texelFetchInvoked), texelFetchStaticUse(other.texelFetchStaticUse),
flattenedOffsetInParentArrays(other.flattenedOffsetInParentArrays) flattenedOffsetInParentArrays(other.flattenedOffsetInParentArrays)
{} {}
...@@ -106,7 +106,7 @@ ShaderVariable &ShaderVariable::operator=(const ShaderVariable &other) ...@@ -106,7 +106,7 @@ ShaderVariable &ShaderVariable::operator=(const ShaderVariable &other)
index = other.index; index = other.index;
interpolation = other.interpolation; interpolation = other.interpolation;
isInvariant = other.isInvariant; isInvariant = other.isInvariant;
texelFetchInvoked = other.texelFetchInvoked; texelFetchStaticUse = other.texelFetchStaticUse;
return *this; return *this;
} }
...@@ -120,7 +120,7 @@ bool ShaderVariable::operator==(const ShaderVariable &other) const ...@@ -120,7 +120,7 @@ bool ShaderVariable::operator==(const ShaderVariable &other) const
binding != other.binding || imageUnitFormat != other.imageUnitFormat || binding != other.binding || imageUnitFormat != other.imageUnitFormat ||
offset != other.offset || readonly != other.readonly || writeonly != other.writeonly || offset != other.offset || readonly != other.readonly || writeonly != other.writeonly ||
index != other.index || interpolation != other.interpolation || index != other.index || interpolation != other.interpolation ||
isInvariant != other.isInvariant || texelFetchInvoked != other.texelFetchInvoked) isInvariant != other.isInvariant || texelFetchStaticUse != other.texelFetchStaticUse)
{ {
return false; return false;
} }
......
...@@ -68,7 +68,7 @@ class FlagSamplersWithTexelFetchTraverser : public TIntermTraverser ...@@ -68,7 +68,7 @@ class FlagSamplersWithTexelFetchTraverser : public TIntermTraverser
if (samplerVariable.name() == uniform.name) if (samplerVariable.name() == uniform.name)
{ {
ASSERT(gl::IsSamplerType(uniform.type)); ASSERT(gl::IsSamplerType(uniform.type));
uniform.texelFetchInvoked = true; uniform.texelFetchStaticUse = true;
break; break;
} }
} }
......
...@@ -889,7 +889,7 @@ void WriteShaderVar(BinaryOutputStream *stream, const sh::ShaderVariable &var) ...@@ -889,7 +889,7 @@ void WriteShaderVar(BinaryOutputStream *stream, const sh::ShaderVariable &var)
stream->writeInt(var.offset); stream->writeInt(var.offset);
stream->writeInt(var.readonly); stream->writeInt(var.readonly);
stream->writeInt(var.writeonly); stream->writeInt(var.writeonly);
stream->writeInt(var.texelFetchInvoked); stream->writeInt(var.texelFetchStaticUse);
ASSERT(var.fields.empty()); ASSERT(var.fields.empty());
} }
...@@ -907,11 +907,11 @@ void LoadShaderVar(BinaryInputStream *stream, sh::ShaderVariable *var) ...@@ -907,11 +907,11 @@ void LoadShaderVar(BinaryInputStream *stream, sh::ShaderVariable *var)
var->structName = stream->readString(); var->structName = stream->readString();
var->setParentArrayIndex(stream->readInt<int>()); var->setParentArrayIndex(stream->readInt<int>());
var->imageUnitFormat = stream->readInt<GLenum>(); var->imageUnitFormat = stream->readInt<GLenum>();
var->offset = stream->readInt<int>(); var->offset = stream->readInt<int>();
var->readonly = stream->readBool(); var->readonly = stream->readBool();
var->writeonly = stream->readBool(); var->writeonly = stream->readBool();
var->texelFetchInvoked = stream->readBool(); var->texelFetchStaticUse = stream->readBool();
} }
// VariableLocation implementation. // VariableLocation implementation.
......
...@@ -469,11 +469,11 @@ class FlattenUniformVisitor : public sh::VariableNameVisitor ...@@ -469,11 +469,11 @@ class FlattenUniformVisitor : public sh::VariableNameVisitor
LinkedUniform linkedUniform(variable.type, variable.precision, fullNameWithArrayIndex, LinkedUniform linkedUniform(variable.type, variable.precision, fullNameWithArrayIndex,
variable.arraySizes, getBinding(), getOffset(), mLocation, variable.arraySizes, getBinding(), getOffset(), mLocation,
-1, sh::kDefaultBlockMemberInfo); -1, sh::kDefaultBlockMemberInfo);
linkedUniform.mappedName = fullMappedNameWithArrayIndex; linkedUniform.mappedName = fullMappedNameWithArrayIndex;
linkedUniform.active = mMarkActive; linkedUniform.active = mMarkActive;
linkedUniform.staticUse = mMarkStaticUse; linkedUniform.staticUse = mMarkStaticUse;
linkedUniform.outerArraySizes = arraySizes; linkedUniform.outerArraySizes = arraySizes;
linkedUniform.texelFetchInvoked = variable.texelFetchInvoked; linkedUniform.texelFetchStaticUse = variable.texelFetchStaticUse;
if (variable.hasParentArrayIndex()) if (variable.hasParentArrayIndex())
{ {
linkedUniform.setParentArrayIndex(variable.parentArrayIndex()); linkedUniform.setParentArrayIndex(variable.parentArrayIndex());
......
...@@ -597,7 +597,7 @@ void SerializeShaderVariable(gl::BinaryOutputStream *bos, const sh::ShaderVariab ...@@ -597,7 +597,7 @@ void SerializeShaderVariable(gl::BinaryOutputStream *bos, const sh::ShaderVariab
bos->writeInt(shaderVariable.index); bos->writeInt(shaderVariable.index);
bos->writeEnum(shaderVariable.interpolation); bos->writeEnum(shaderVariable.interpolation);
bos->writeInt(shaderVariable.isInvariant); bos->writeInt(shaderVariable.isInvariant);
bos->writeInt(shaderVariable.texelFetchInvoked); bos->writeInt(shaderVariable.texelFetchStaticUse);
} }
void SerializeShaderVariablesVector(gl::BinaryOutputStream *bos, void SerializeShaderVariablesVector(gl::BinaryOutputStream *bos,
......
...@@ -1428,7 +1428,7 @@ angle::Result ProgramExecutableVk::updateTexturesDescriptorSet(ContextVk *contex ...@@ -1428,7 +1428,7 @@ angle::Result ProgramExecutableVk::updateTexturesDescriptorSet(ContextVk *contex
vk::ImageHelper &image = textureVk->getImage(); vk::ImageHelper &image = textureVk->getImage();
bool shouldUseLinearColorspace = textureVk->shouldUseLinearColorspaceWithTexelFetch( bool shouldUseLinearColorspace = textureVk->shouldUseLinearColorspaceWithTexelFetch(
linearColorspaceWithSampler, samplerUniform.texelFetchInvoked); linearColorspaceWithSampler, samplerUniform.texelFetchStaticUse);
imageInfos[arrayElement].sampler = samplerHelper.get().getHandle(); imageInfos[arrayElement].sampler = samplerHelper.get().getHandle();
imageInfos[arrayElement].imageLayout = image.getCurrentLayout(); 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