diff --git a/src/mesa/state_tracker/st_nir.h b/src/mesa/state_tracker/st_nir.h index 28fa476589b..cc603a9db2e 100644 --- a/src/mesa/state_tracker/st_nir.h +++ b/src/mesa/state_tracker/st_nir.h @@ -59,6 +59,8 @@ void st_nir_lower_samplers(struct pipe_screen *screen, struct nir_shader *nir, struct gl_program *prog); void st_nir_lower_uniforms(struct st_context *st, struct nir_shader *nir); +void +st_nir_finish_builtin_nir(struct st_context *st, struct nir_shader *nir); struct pipe_shader_state * st_nir_finish_builtin_shader(struct st_context *st, struct nir_shader *nir); diff --git a/src/mesa/state_tracker/st_nir_builtins.c b/src/mesa/state_tracker/st_nir_builtins.c index bfbe0a939b8..54bfb0dd29c 100644 --- a/src/mesa/state_tracker/st_nir_builtins.c +++ b/src/mesa/state_tracker/st_nir_builtins.c @@ -29,9 +29,8 @@ #include "compiler/glsl/gl_nir_linker.h" #include "tgsi/tgsi_parse.h" -struct pipe_shader_state * -st_nir_finish_builtin_shader(struct st_context *st, - nir_shader *nir) +void +st_nir_finish_builtin_nir(struct st_context *st, nir_shader *nir) { struct pipe_screen *screen = st->screen; gl_shader_stage stage = nir->info.stage; @@ -75,6 +74,13 @@ st_nir_finish_builtin_shader(struct st_context *st, } else { gl_nir_opts(nir); } +} + +struct pipe_shader_state * +st_nir_finish_builtin_shader(struct st_context *st, + nir_shader *nir) +{ + st_nir_finish_builtin_nir(st, nir); struct pipe_shader_state state = { .type = PIPE_SHADER_IR_NIR,