Commit 1b50c55d by Alexis Hetu Committed by Alexis Hétu

Fixed condition too strict in glBindSampler

glBindSampler's sampler check was too strict, as the sampler needed to exist, but not necessarily to have been allocated yet, so the condition was fixed. Change-Id: Ia8301028dbf35efa16bfc6cb74a69e105d8a505d Reviewed-on: https://swiftshader-review.googlesource.com/3965Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent 3f1d0b76
......@@ -3436,14 +3436,9 @@ GL_APICALL void GL_APIENTRY glBindSampler(GLuint unit, GLuint sampler)
if(context)
{
if(sampler != 0)
if(sampler != 0 && !context->isSampler(sampler))
{
es2::Sampler *samplerObject = context->getSampler(sampler);
if(!samplerObject)
{
return error(GL_INVALID_OPERATION);
}
return error(GL_INVALID_OPERATION);
}
context->bindSampler(unit, sampler);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment