Commit fef22a6d by Alexis Hetu Committed by Alexis Hétu

Added missing binary related functions to Program

The spec for GetProgramiv didn't mention anything about PROGRAM_BINARY_LENGTH, but looking at the OpenGL ES 3.0 spec, section 2.11.4 - "Program Binaries", we have: "The number of bytes in the program binary can be queried by calling GetProgramiv with pname PROGRAM_BINARY_LENGTH" Change-Id: Idf652fec34fa1f3cce6cce0e7302ab8d47a6cf74 Reviewed-on: https://swiftshader-review.googlesource.com/3611Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent 60015701
......@@ -2350,6 +2350,12 @@ namespace es2
return validated;
}
GLint Program::getBinaryLength() const
{
UNIMPLEMENTED();
return 0;
}
void Program::release()
{
referenceCount--;
......
......@@ -210,7 +210,9 @@ namespace es2
unsigned int getSerial() const;
bool getBinaryRetrievableHint() const { return retrievableBinary; }
void setBinaryRetrievable(bool retrievable) { retrievableBinary = retrievable; }
GLint getBinaryLength() const;
private:
void unlink();
......
......@@ -3336,7 +3336,15 @@ void GetProgramiv(GLuint program, GLenum pname, GLint* params)
case GL_PROGRAM_BINARY_RETRIEVABLE_HINT:
if(clientVersion >= 3)
{
UNIMPLEMENTED();
*params = programObject->getBinaryRetrievableHint();
return;
}
else return error(GL_INVALID_ENUM);
case GL_PROGRAM_BINARY_LENGTH:
if(clientVersion >= 3)
{
*params = programObject->getBinaryLength();
return;
}
else return error(GL_INVALID_ENUM);
default:
......
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