summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/common/meta.c11
-rw-r--r--src/mesa/drivers/common/meta.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index e27489d6195..0ffcd9c2c3f 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -449,6 +449,16 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
save->API = ctx->API;
ctx->API = API_OPENGL_COMPAT;
+ /* Mesa's extension helper functions use the current context's API to look up
+ * the version required by an extension as a step in determining whether or
+ * not it has been advertised. Since meta aims to only be restricted by the
+ * driver capability (and not by whether or not an extension has been
+ * advertised), set the helper functions' Version variable to a value that
+ * will make the checks on the context API and version unconditionally pass.
+ */
+ save->ExtensionsVersion = ctx->Extensions.Version;
+ ctx->Extensions.Version = ~0;
+
/* Pausing transform feedback needs to be done early, or else we won't be
* able to change other state.
*/
@@ -1222,6 +1232,7 @@ _mesa_meta_end(struct gl_context *ctx)
ctx->Meta->SaveStackDepth--;
ctx->API = save->API;
+ ctx->Extensions.Version = save->ExtensionsVersion;
}
diff --git a/src/mesa/drivers/common/meta.h b/src/mesa/drivers/common/meta.h
index d742eaa9f67..d4bf0b65524 100644
--- a/src/mesa/drivers/common/meta.h
+++ b/src/mesa/drivers/common/meta.h
@@ -72,6 +72,7 @@ struct save_state
/* Always saved/restored with meta. */
gl_api API;
+ uint8_t ExtensionsVersion;
/** MESA_META_CLEAR (and others?) */
struct gl_query_object *CurrentOcclusionObject;