Commit 0e92ccaa by Alexis Hetu Committed by Alexis Hétu

Fixed program binary failure

Updated glGetProgramBinary and glProgramBinary in order to properly reflect that SwiftShader doesn't support any binary format. Fixes dEQP-GLES3.functional.negative_api.shader.get_program_binary Change-Id: I068ce7eb7ce824719cecca2fdc651a9e6c14190c Reviewed-on: https://swiftshader-review.googlesource.com/15330Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 47e9a0e2
...@@ -3771,7 +3771,8 @@ GL_APICALL void GL_APIENTRY glGetProgramBinary(GLuint program, GLsizei bufSize, ...@@ -3771,7 +3771,8 @@ GL_APICALL void GL_APIENTRY glGetProgramBinary(GLuint program, GLsizei bufSize,
} }
} }
UNIMPLEMENTED(); // SwiftShader doesn't return a program binary and sets the program binay size to 0, so any attempt at getting one is invalid.
return error(GL_INVALID_OPERATION);
} }
GL_APICALL void GL_APIENTRY glProgramBinary(GLuint program, GLenum binaryFormat, const void *binary, GLsizei length) GL_APICALL void GL_APIENTRY glProgramBinary(GLuint program, GLenum binaryFormat, const void *binary, GLsizei length)
...@@ -3784,7 +3785,20 @@ GL_APICALL void GL_APIENTRY glProgramBinary(GLuint program, GLenum binaryFormat, ...@@ -3784,7 +3785,20 @@ GL_APICALL void GL_APIENTRY glProgramBinary(GLuint program, GLenum binaryFormat,
return error(GL_INVALID_VALUE); return error(GL_INVALID_VALUE);
} }
UNIMPLEMENTED(); es2::Context *context = es2::getContext();
if(context)
{
es2::Program *programObject = context->getProgram(program);
if(!programObject)
{
return error(GL_INVALID_OPERATION);
}
}
// Regardless of what the binaryFormat is, it is unrecognized by SwiftShader, since it supports no format.
return error(GL_INVALID_ENUM);
} }
GL_APICALL void GL_APIENTRY glProgramParameteri(GLuint program, GLenum pname, GLint value) GL_APICALL void GL_APIENTRY glProgramParameteri(GLuint program, GLenum pname, GLint value)
......
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