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: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
This commit is contained in:
Jamie Madill 2020-10-18 12:40:14 -04:00 коммит произвёл Commit Bot
Родитель 00a4976630
Коммит e5590288b8
7 изменённых файлов: 19 добавлений и 19 удалений

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

@ -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();