Program: Fixed unreferenced Samplers.
The calculation for unreferenced was incorrect - it checked the 'used'
flag of the uniform location, but if samplers started at index zero,
all the unused uniforms were to be considered valid samplers. Instead,
initialize the uniform index to INVALID_INDEX.
This bug was uncovered after doing work on the Texture dirty bits.
BUG=angleproject:1387
Change-Id: I5e404e367caed38368bcc0e581699ae2c911bcc9
Reviewed-on: https://chromium-review.googlesource.com/655930
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/Program.cpp b/src/libANGLE/Program.cpp
index fc39b40..0c5ad19 100644
--- a/src/libANGLE/Program.cpp
+++ b/src/libANGLE/Program.cpp
@@ -266,7 +266,8 @@
{
}
-VariableLocation::VariableLocation() : name(), element(0), index(0), used(false), ignored(false)
+VariableLocation::VariableLocation()
+ : name(), element(0), index(GL_INVALID_INDEX), used(false), ignored(false)
{
}