Added proper checks for invalid operations.
Fixes all remaining failures in dEQP-GLES3.functional.lifetime*
Change-Id: Ia91ffdb8ced53f1f787b82ada0de22caf9ee9206
Reviewed-on: https://swiftshader-review.googlesource.com/13748
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
return mTransformFeedbackNameSpace.find(transformFeedback);
}
+bool Context::isTransformFeedback(GLuint array) const
+{
+ return mTransformFeedbackNameSpace.isReserved(array);
+}
+
Sampler *Context::getSampler(GLuint sampler) const
{
return mResourceManager->getSampler(sampler);
VertexArray *getCurrentVertexArray() const;
bool isVertexArray(GLuint array) const;
TransformFeedback *getTransformFeedback(GLuint transformFeedback) const;
+ bool isTransformFeedback(GLuint transformFeedback) const;
TransformFeedback *getTransformFeedback() const;
Sampler *getSampler(GLuint sampler) const;
bool isSampler(GLuint sampler) const;
return error(GL_INVALID_OPERATION);
}
+ if(!context->isTransformFeedback(id))
+ {
+ return error(GL_INVALID_OPERATION);
+ }
+
context->bindTransformFeedback(id);
}
}
{
if(ids[i] != 0)
{
+ es2::TransformFeedback *transformFeedbackObject = context->getTransformFeedback(ids[i]);
+
+ if(transformFeedbackObject && transformFeedbackObject->isActive())
+ {
+ return error(GL_INVALID_OPERATION);
+ }
+
context->deleteTransformFeedback(ids[i]);
}
}