Clarify code around setting uniform locations
Use the name "uniformLocationBindings" for location information set by
the API instead of "uniformBindings", which can be easily confused
with binding layout qualifiers that can be set for some types of
uniforms. Also use more straightforward names throughout the
indexUniforms function.
BUG=angleproject:1442
Change-Id: I47d504479b36def696305f060e9c9bd3de3ade48
Reviewed-on: https://chromium-review.googlesource.com/445236
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/libANGLE/Program.h b/src/libANGLE/Program.h
index d1d131a..46e749b 100644
--- a/src/libANGLE/Program.h
+++ b/src/libANGLE/Program.h
@@ -447,8 +447,8 @@
bool linkUniformBlocks(InfoLog &infoLog, const Caps &caps);
bool linkVaryings(InfoLog &infoLog) const;
bool validateVertexAndFragmentUniforms(InfoLog &infoLog) const;
- bool linkUniforms(InfoLog &infoLog, const Caps &caps, const Bindings &uniformBindings);
- bool indexUniforms(InfoLog &infoLog, const Caps &caps, const Bindings &uniformBindings);
+ bool linkUniforms(InfoLog &infoLog, const Caps &caps, const Bindings &uniformLocationBindings);
+ bool indexUniforms(InfoLog &infoLog, const Caps &caps, const Bindings &uniformLocationBindings);
bool areMatchingInterfaceBlocks(InfoLog &infoLog,
const sh::InterfaceBlock &vertexInterfaceBlock,
const sh::InterfaceBlock &fragmentInterfaceBlock) const;
@@ -536,7 +536,10 @@
bool mValidated;
Bindings mAttributeBindings;
- Bindings mUniformBindings;
+
+ // Note that this has nothing to do with binding layout qualifiers that can be set for some
+ // uniforms in GLES3.1+. It is used to pre-set the location of uniforms.
+ Bindings mUniformLocationBindings;
// CHROMIUM_path_rendering
Bindings mFragmentInputBindings;