Re-re-land "Move sampler validation to the GL layer."
This previously was D3D-only, but is required for every draw call.
This completes the work of removing the D3D-specific Impl methods
from ProgramImpl.
Also add several regression tests to cover texture and sampler
validation.
Re-land with a fix for duplicate sampler active uniforms.
Re-re-land with a fix for a test comparison warning on Linux.
BUG=angleproject:1123
Change-Id: Iaf7b33861c07b9ceed4bd53ac2f010d35f05df45
Reviewed-on: https://chromium-review.googlesource.com/301712
Tryjob-Request: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/State.cpp b/src/libANGLE/State.cpp
index 752f995..d51015a 100644
--- a/src/libANGLE/State.cpp
+++ b/src/libANGLE/State.cpp
@@ -633,6 +633,7 @@
{
const auto it = mSamplerTextures.find(type);
ASSERT(it != mSamplerTextures.end());
+ ASSERT(sampler < it->second.size());
return it->second[sampler].get();
}
@@ -640,6 +641,7 @@
{
const auto it = mSamplerTextures.find(type);
ASSERT(it != mSamplerTextures.end());
+ ASSERT(sampler < it->second.size());
return it->second[sampler].id();
}