Pass a SamplerState as a parameter to Texture::isSamplerComplete, instead of using the internal SamplerState.

TRAC #23453

Signed-off-by: Nicolas Capens
Signed-off-by: Shannon Woods
Authored-by: Jamie Madill
diff --git a/src/libGLESv2/Context.cpp b/src/libGLESv2/Context.cpp
index b1e51e0..b6072f7 100644
--- a/src/libGLESv2/Context.cpp
+++ b/src/libGLESv2/Context.cpp
@@ -2241,10 +2241,11 @@
             TextureType textureType = programBinary->getSamplerTextureType(type, samplerIndex);
             Texture *texture = getSamplerTexture(textureUnit, textureType);
 
-            if (texture->isSamplerComplete())
+            SamplerState samplerState;
+            texture->getSamplerState(&samplerState);
+
+            if (texture->isSamplerComplete(samplerState))
             {
-                SamplerState samplerState;
-                texture->getSamplerState(&samplerState);
                 mRenderer->setSamplerState(type, samplerIndex, samplerState);
 
                 mRenderer->setTexture(type, samplerIndex, texture);