[Mesa-dev] [PATCH 4/7] i965/gs: Move the mem_ctx argument to brw_compile_gs

Jason Ekstrand jason at jlekstrand.net
Tue Oct 20 18:10:19 PDT 2015


This makes it better match the other brw_compile_* functions.
---
 src/mesa/drivers/dri/i965/brw_compiler.h          | 2 +-
 src/mesa/drivers/dri/i965/brw_gs.c                | 4 ++--
 src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_compiler.h b/src/mesa/drivers/dri/i965/brw_compiler.h
index 11c485d..8c10495 100644
--- a/src/mesa/drivers/dri/i965/brw_compiler.h
+++ b/src/mesa/drivers/dri/i965/brw_compiler.h
@@ -615,10 +615,10 @@ struct brw_gs_compile
  */
 const unsigned *
 brw_compile_gs(const struct brw_compiler *compiler, void *log_data,
+               void *mem_ctx,
                struct brw_gs_compile *c,
                const struct nir_shader *shader,
                struct gl_shader_program *shader_prog,
-               void *mem_ctx,
                int shader_time_index,
                unsigned *final_assembly_size,
                char **error_str);
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c
index 02f506d..ae7f242 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_gs.c
@@ -303,9 +303,9 @@ brw_codegen_gs_prog(struct brw_context *brw,
    unsigned program_size;
    char *error_str;
    const unsigned *program =
-      brw_compile_gs(brw->intelScreen->compiler, brw, &c,
+      brw_compile_gs(brw->intelScreen->compiler, brw, mem_ctx, &c,
                      shader->Program->nir, prog,
-                     mem_ctx, st_index, &program_size, &error_str);
+                     st_index, &program_size, &error_str);
    if (program == NULL) {
       ralloc_free(mem_ctx);
       return false;
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
index a715cf5..47f2dd8 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
@@ -598,10 +598,10 @@ vec4_gs_visitor::gs_end_primitive()
 
 extern "C" const unsigned *
 brw_compile_gs(const struct brw_compiler *compiler, void *log_data,
+               void *mem_ctx,
                struct brw_gs_compile *c,
                const nir_shader *shader,
                struct gl_shader_program *shader_prog,
-               void *mem_ctx,
                int shader_time_index,
                unsigned *final_assembly_size,
                char **error_str)
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list