OSDN Git Service

Sampler object fix
authorAlexis Hetu <sugoi@google.com>
Wed, 28 Sep 2016 21:54:05 +0000 (17:54 -0400)
committerAlexis Hétu <sugoi@google.com>
Thu, 29 Sep 2016 02:57:12 +0000 (02:57 +0000)
The code was not allowing to unset a sampler object from a texture,
so the faulty condition was removed to fix the issue.

Fixes 30 tests in:
dEQP.functional.samplers.*

Change-Id: Ibbc3389d3d6135db7bc5a2f87f0df5527b78c7fd
Reviewed-on: https://swiftshader-review.googlesource.com/7360
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
src/OpenGL/libGLESv2/Context.cpp

index 39374ce..af5c95a 100644 (file)
@@ -1284,10 +1284,7 @@ bool Context::bindSampler(GLuint unit, GLuint sampler)
 
        Sampler* samplerObject = getSampler(sampler);
 
-       if(sampler)
-       {
-               mState.sampler[unit] = samplerObject;
-       }
+       mState.sampler[unit] = samplerObject;
 
        return !!samplerObject;
 }