Use the currently bound sampler object combined with the internal texture state to determine the
current filtering and address modes at draw time.
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 b6072f7..3525e89 100644
--- a/src/libGLESv2/Context.cpp
+++ b/src/libGLESv2/Context.cpp
@@ -2244,6 +2244,12 @@
SamplerState samplerState;
texture->getSamplerState(&samplerState);
+ if (mState.samplers[textureUnit] != 0)
+ {
+ Sampler *samplerObject = getSampler(mState.samplers[textureUnit]);
+ samplerObject->getState(&samplerState);
+ }
+
if (texture->isSamplerComplete(samplerState))
{
mRenderer->setSamplerState(type, samplerIndex, samplerState);