if (attribs->major > 1 || attribs->minor > 0) {
_mesa_compute_version(st->ctx);
- /* is the actual version less than the requested version? */
+ /* Is the actual version less than the requested version? Mesa can't
+ * yet enforce the added restrictions of a forward-looking context, so
+ * fail that too.
+ */
if (st->ctx->VersionMajor * 10 + st->ctx->VersionMinor <
- attribs->major * 10 + attribs->minor) {
+ attribs->major * 10 + attribs->minor
+ || (attribs->flags & ~ST_CONTEXT_FLAG_DEBUG) != 0) {
*error = ST_CONTEXT_ERROR_BAD_VERSION;
st_destroy_context(st);
return NULL;