[Mesa-dev] [PATCH 14/24] spirv_extensions: i965: initialize SPIR-V extensions

Eduardo Lima Mitev elima at igalia.com
Wed Nov 15 13:22:17 UTC 2017


From: Alejandro PiƱeiro <apinheiro at igalia.com>

---
 src/mesa/drivers/dri/i965/brw_context.c | 6 ++++++
 src/mesa/main/context.c                 | 1 +
 2 files changed, 7 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index b85f36cfbbd..15886005cec 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
  ***************************************/
@@ -720,6 +721,11 @@ brw_initialize_context_constants(struct brw_context *brw)
    /* GL_ARB_gl_spirv */
    ctx->Const.SpirVCapabilities =
       brw_initialize_spirv_supported_capabilities(brw);
+
+   /* GL_ARB_spirv_extensions */
+   ctx->Const.SpirVExtensions = MALLOC_STRUCT(spirv_supported_extensions);
+   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 837c1138998..46773acc0ab 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1380,6 +1380,7 @@ _mesa_free_context_data( struct gl_context *ctx )
    }
 
    free(ctx->Const.SpirVCapabilities);
+   free(ctx->Const.SpirVExtensions);
 }
 
 
-- 
2.11.0



More information about the mesa-dev mailing list