[Mesa-dev] [PATCH v2 16/25] spirv_extensions: i965: initialize SPIR-V extensions
Eduardo Lima Mitev
elima at igalia.com
Thu Nov 30 17:28:29 UTC 2017
From: Alejandro PiƱeiro <apinheiro at igalia.com>
v2: Rebase update after changes on previous patches.
---
src/mesa/drivers/dri/i965/brw_context.c | 6 ++++++
src/mesa/main/context.c | 2 ++
2 files changed, 8 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index d90b7797a7a..6afc18bcf6e 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -76,6 +76,7 @@
#include "isl/isl.h"
#include "compiler/spirv/nir_spirv.h"
+#include "compiler/spirv/spirv_extensions.h"
/***************************************
* Mesa's Driver Functions
***************************************/
@@ -716,6 +717,11 @@ brw_initialize_context_constants(struct brw_context *brw)
/* GL_ARB_gl_spirv */
if (ctx->Version >= 33)
brw_initialize_spirv_supported_capabilities(brw);
+
+ /* GL_ARB_spirv_extensions */
+ ctx->Const.SpirVExtensions = MALLOC_STRUCT(spirv_supported_extensions);
+ spirv_fill_supported_spirv_extensions(ctx->Const.SpirVExtensions,
+ &ctx->Const.SpirVCapabilities);
}
static void
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 3fa9f69f883..b48481d4372 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1377,6 +1377,8 @@ _mesa_free_context_data( struct gl_context *ctx )
if (ctx == _mesa_get_current_context()) {
_mesa_make_current(NULL, NULL, NULL);
}
+
+ free(ctx->Const.SpirVExtensions);
}
--
2.15.0
More information about the mesa-dev
mailing list