From: Timothy Arceri Date: Wed, 9 May 2018 03:25:46 +0000 (+1000) Subject: st/nir: make st_nir_opts() available externally X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0b3e9564bdda575c3956f338454f4f632041e151;p=mesa.git st/nir: make st_nir_opts() available externally The following patch will make use of this for asm style programs. Reviewed-by: Eric Anholt --- diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index 3b261cf1b2c..de906e60c39 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -314,7 +314,7 @@ st_nir_assign_uniform_locations(struct gl_context *ctx, *size = max; } -static void +void st_nir_opts(nir_shader *nir) { bool progress; diff --git a/src/mesa/state_tracker/st_nir.h b/src/mesa/state_tracker/st_nir.h index 1c2e32a5e6f..15f1ce93e5a 100644 --- a/src/mesa/state_tracker/st_nir.h +++ b/src/mesa/state_tracker/st_nir.h @@ -42,6 +42,8 @@ void st_finalize_nir(struct st_context *st, struct gl_program *prog, struct gl_shader_program *shader_program, struct nir_shader *nir); +void st_nir_opts(struct nir_shader *nir); + bool st_link_nir(struct gl_context *ctx, struct gl_shader_program *shader_program);