st/nir: make st_nir_opts() available externally
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 9 May 2018 03:25:46 +0000 (13:25 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Sat, 12 May 2018 04:48:21 +0000 (14:48 +1000)
The following patch will make use of this for asm style programs.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/state_tracker/st_glsl_to_nir.cpp
src/mesa/state_tracker/st_nir.h

index 3b261cf1b2cea9dae61fc0414758f93621228294..de906e60c39fad9a0a19516b3da460fe7ca40dda 100644 (file)
@@ -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;
index 1c2e32a5e6f3a152deaa3903b87cd04daad5e26f..15f1ce93e5a462ae915ef8944bbf9f2533ebb9d9 100644 (file)
@@ -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);