Commit 6372aceb by Nicolas Capens Committed by Nicolas Capens

Drawing without current program is not an error.

The spec states that "If UseProgram is called with program set to zero, then there is no current program object, and the results of vertex and fragment shader execution are undefined. However, this is not an error." Fixes all failures in: dEQP-GLES3.functional.negative_api.vertex_array.* Change-Id: Ia5fbb22a9447b299665db29fc1f564f6de4f202d Reviewed-on: https://swiftshader-review.googlesource.com/14408Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent e4a88b91
...@@ -2477,7 +2477,7 @@ void Context::drawElements(GLenum mode, GLsizei count, GLenum type, const void * ...@@ -2477,7 +2477,7 @@ void Context::drawElements(GLenum mode, GLsizei count, GLenum type, const void *
{ {
if(!mState.currentProgram) if(!mState.currentProgram)
{ {
return error(GL_INVALID_OPERATION); return;
} }
if(!indices && !mState.elementArrayBuffer) if(!indices && !mState.elementArrayBuffer)
......
...@@ -3467,7 +3467,7 @@ void Context::drawArrays(GLenum mode, GLint first, GLsizei count, GLsizei instan ...@@ -3467,7 +3467,7 @@ void Context::drawArrays(GLenum mode, GLint first, GLsizei count, GLsizei instan
{ {
if(!mState.currentProgram) if(!mState.currentProgram)
{ {
return error(GL_INVALID_OPERATION); return;
} }
sw::DrawType primitiveType; sw::DrawType primitiveType;
...@@ -3523,7 +3523,7 @@ void Context::drawElements(GLenum mode, GLuint start, GLuint end, GLsizei count, ...@@ -3523,7 +3523,7 @@ void Context::drawElements(GLenum mode, GLuint start, GLuint end, GLsizei count,
{ {
if(!mState.currentProgram) if(!mState.currentProgram)
{ {
return error(GL_INVALID_OPERATION); return;
} }
if(!indices && !getCurrentVertexArray()->getElementArrayBuffer()) if(!indices && !getCurrentVertexArray()->getElementArrayBuffer())
......
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