Implement IsProgramPipeline based on the VAO code.
This was originally included in another patch, but it was split out by
Ian Romanick.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
struct gl_shader_program *ActiveProgram;
GLbitfield Flags; /**< Mask of GLSL_x flags */
+
+ GLboolean EverBound; /**< Has the pipeline object been created */
};
/**
GLboolean GLAPIENTRY
_mesa_IsProgramPipeline(GLuint pipeline)
{
- return GL_FALSE;
+ GET_CURRENT_CONTEXT(ctx);
+
+ struct gl_pipeline_object *obj = lookup_pipeline_object(ctx, pipeline);
+ if (obj == NULL)
+ return GL_FALSE;
+
+ return obj->EverBound;
}
/**